zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

Aubess Mini Smart Switch Zigbee 3.0, "Unsupported", not working

Open topreece opened this issue 4 years ago • 65 comments

What happened?

Aubess Mini Smart Switch Zigbee 3.0 shows as "Unsupported" and is not interviewing correctly hence not working. Im using a SONOFF ZB Dongle -E coordinator (i have like 20 sensors working without a hitch with it)

Link: https://www.aliexpress.com/item/1005003637851837.html?spm=a2g0o.order_list.0.0.4dda1802oyL3ti

The pictures display a WHD02 as selling unit, but when you recieve the item it is not labeled as WHD02, only a generic name "Mini Smart Switch" (i don't know if this is a "cheaper" alternative to a WHD02 -which is supported by zigbee2mqtt- or there is something different in the firmware) A27c0d965762b44d497f5d02e459b6db7N Ad5e8a386a006482399758672ce09762cn Aee56ed80318e4195a8a0edf546d4d7feZ Capture Capture2

What did you expect to happen?

I expect to connect and expose his attributes as intended

How to reproduce it (minimal and precise)

Buy one and try to connect it to zigbee2mqtt

Zigbee2MQTT version

1.27.2-1

Adapter firmware version

6.10.3.0 build 297

Adapter

SONOFF ZB Dongle -E

Debug log

log.txt

Here you can check i tried to join and delete the device several times without success.

topreece avatar Sep 09 '22 02:09 topreece

I am having the same problem, hope the device can be supported

Davidpollemans avatar Sep 27 '22 19:09 Davidpollemans

This problem is still exist. This device is not recognized by Zigbee2MQTT (Conbee 2 dongle, same problem than described above). Can it be added please ?

Caillema avatar Oct 21 '22 08:10 Caillema

Can you provide the data/database.db entry of this device?

Koenkk avatar Oct 21 '22 14:10 Koenkk

Sorry I'm a newbie. How should I found that ? Thanks a lot for your support.

Caillema avatar Oct 21 '22 14:10 Caillema

It is next to the z2m configuration.yaml file

Koenkk avatar Oct 21 '22 14:10 Koenkk

Ok. I think you need that (extract of my database.db) : {"id":24,"type":"Router","ieeeAddr":"0xa4c138331a1497de","nwkAddr":49351,"manufId":4417,"manufName":"_TZ3000_xkap8wtb","powerSource":"Mains (single phase)","modelId":"TS000F","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":256,"inClusterList":[0,3,4,5,6,10,57344,1794,2820,4096,6280],"outClusterList":[25],"clusters":{"57344":{"attributes":{"53251":"AAAA"}},"genOnOff":{"attributes":{"32768":0,"tuyaBacklightMode":1,"onOff":0,"moesStartUpOnOff":2,"onTime":0,"offWaitTime":0}},"genBasic":{"attributes":{"modelId":"TS000F","manufacturerName":"_TZ3000_xkap8wtb","powerSource":1,"zclVersion":3,"appVersion":65,"stackVersion":2,"hwVersion":0,"swBuildId":"0122052017"}},"haElectricalMeasurement":{"attributes":{"rmsVoltage":241,"rmsCurrent":78,"activePower":0}},"seMetering":{"attributes":{"currentSummDelivered":[0,0]}},"manuSpecificTuya_3":{"attributes":{"switchType":0}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":65,"stackVersion":2,"hwVersion":0,"swBuildId":"0122052017","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1666352032109,"defaultSendRequestWhen":"immediate"}

Caillema avatar Oct 21 '22 14:10 Caillema

_TZ3000_xkap8wtb will be supported in the next release (1 November) and is already supported in the dev branch (https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html)

Koenkk avatar Oct 22 '22 07:10 Koenkk

Perfect, thank you so much for your update and your reactivity ! I will wait and test it with the next release in November.

Caillema avatar Oct 24 '22 12:10 Caillema

Just got one of these also, Aubess again but only one switch point (Sw) on the right (two Neutral Nin instead). In the meantime, you can use this as an external converter:

const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const e = exposes.presets;
const ea = exposes.access;
const tuya = require('zigbee-herdsman-converters/lib/tuya');

const definition = {
    fingerprint: [{modelID: 'TS000F', manufacturerName: '_TZ3000_xkap8wtb'}],
    model: 'WHD02',
    vendor: 'TuYa',
    whiteLabel: [{vendor: 'TuYa', model: 'iHSW02'}],
    description: 'Wall switch module',
    toZigbee: extend.switch().toZigbee.concat([tz.moes_power_on_behavior, tz.tuya_switch_type]),
    fromZigbee: extend.switch().fromZigbee.concat([fz.moes_power_on_behavior, fz.tuya_switch_type]),
    exposes: extend.switch().exposes.concat([e.power_on_behavior(), e.switch_type_2()]),
    configure: async (device, coordinatorEndpoint, logger) => {
        await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);},
};

module.exports = definition;

callacomp avatar Oct 25 '22 14:10 callacomp

_TZ3000_xkap8wtb will be supported in the next release (1 November) and is already supported in the dev branch (https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html)

Perfect, device supported like a WHD02. Switch_type, Power_on_behavior and Linkquality work. But this device could also provide the entities for Power, Current, Voltage and Energy. How can I catch them?

Caillema avatar Nov 02 '22 08:11 Caillema

@Caillema does the power monitoring work with the following external converter?

const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const ota = require('zigbee-herdsman-converters/lib/ota');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const utils = require('zigbee-herdsman-converters/lib/utils');
const e = exposes.presets;
const ea = exposes.access;

const definition = {
    fingerprint: tuya.fingerprint('TS000F', ['_TZ3000_xkap8wtb']),
    model: 'TS000F_power',
    description: 'Switch with power monitoring',
    vendor: 'TuYa',
    fromZigbee: [fz.on_off, fz.electrical_measurement, fz.metering, fz.ignore_basic_report],
    toZigbee: [tz.on_off],
    configure: async (device, coordinatorEndpoint, logger) => {
        const endpoint = device.getEndpoint(1);
        await endpoint.read('genBasic', ['manufacturerName', 'zclVersion', 'appVersion', 'modelId', 'powerSource', 0xfffe]);
        await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement', 'seMetering']);
        await reporting.rmsVoltage(endpoint, {change: 5});
        await reporting.rmsCurrent(endpoint, {change: 50});
        await reporting.activePower(endpoint, {change: 10});
        await reporting.currentSummDelivered(endpoint);
        endpoint.saveClusterAttributeKeyValue('haElectricalMeasurement', {acCurrentDivisor: 1000, acCurrentMultiplier: 1});
        endpoint.saveClusterAttributeKeyValue('seMetering', {divisor: 100, multiplier: 1});
        device.save();
    },
    exposes: [e.switch(), e.power(), e.current(), e.voltage().withAccess(ea.STATE), e.energy()],
};

module.exports = definition;

  • save this as file next to configuration.yaml as ext_converter.js
  • add it to configuration.yaml:
external_converters:
  - ext_converter.js
  • start z2m, check if issue is fixed

Koenkk avatar Nov 02 '22 18:11 Koenkk

I tried the external converter above. Now the voltage, current, power and energy meter is displayed. The power and voltage might be a good value (load is a LED light), the current is not good because it shows 83 amps continuously (even if I turn the switch off) and the switch setting options are gone (like 'power_outage_memory'), only the switch on/off is left.

sdalee avatar Nov 03 '22 17:11 sdalee

@sdalee I think these device doesn't support current. Can you provide the data/database.db entry of your device?

Koenkk avatar Nov 03 '22 18:11 Koenkk

I tried the external converter above. Now the voltage, current, power and energy meter is displayed. The power and voltage might be a good value (load is a LED light), the current is not good because it shows 83 amps continuously (even if I turn the switch off) and the switch setting options are gone (like 'power_outage_memory'), only the switch on/off is left.

Confirmed. Screenshot_20221103_191612_io homeassistant companion android~2

Caillema avatar Nov 03 '22 19:11 Caillema

@sdalee I think these device doesn't support current. Can you provide the data/database.db entry of your device?

Devices #24 & #26 :

{"id":24,"type":"Router","ieeeAddr":"0xa4c138331a1497de","nwkAddr":49351,"manufId":4417,"manufName":"_TZ3000_xkap8wtb","powerSource":"Mains (single phase)","modelId":"TS000F","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":256,"inClusterList":[0,3,4,5,6,10,57344,1794,2820,4096,6280],"outClusterList":[25],"clusters":{"57344":{"attributes":{"53251":"AAAA"}},"genOnOff":{"attributes":{"32768":0,"tuyaBacklightMode":1,"onOff":0,"moesStartUpOnOff":1,"onTime":0,"offWaitTime":0}},"genBasic":{"attributes":{"modelId":"TS000F","manufacturerName":"_TZ3000_xkap8wtb","powerSource":1,"zclVersion":3,"appVersion":65,"stackVersion":2,"hwVersion":0,"swBuildId":"0122052017"}},"haElectricalMeasurement":{"attributes":{"rmsVoltage":90,"rmsCurrent":95,"activePower":0}},"seMetering":{"attributes":{"currentSummDelivered":[0,0]}},"manuSpecificTuya_3":{"attributes":{"switchType":0}}},"binds":[{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0x00212effff05f8c2","endpointID":1}],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":65,"stackVersion":2,"hwVersion":0,"swBuildId":"0122052017","zclVersion":3,"interviewCompleted":true,"meta":{"configured":1},"lastSeen":1667375592894,"defaultSendRequestWhen":"immediate"}
{"id":26,"type":"Router","ieeeAddr":"0xa4c138825b731585","nwkAddr":62575,"manufId":4417,"manufName":"_TZ3000_xkap8wtb","powerSource":"Mains (single phase)","modelId":"TS000F","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":256,"inClusterList":[0,3,4,5,6,10,57344,1794,2820,4096,6280],"outClusterList":[25],"clusters":{"57344":{"attributes":{"53251":"AAAA"}},"genOnOff":{"attributes":{"32768":0,"onOff":0,"tuyaBacklightMode":1,"moesStartUpOnOff":1,"onTime":0,"offWaitTime":0}},"genBasic":{"attributes":{"modelId":"TS000F","manufacturerName":"_TZ3000_xkap8wtb","powerSource":1,"zclVersion":3,"appVersion":65,"stackVersion":2,"hwVersion":0,"swBuildId":"0122052017"}},"haElectricalMeasurement":{"attributes":{"rmsVoltage":240,"rmsCurrent":91,"activePower":0}},"seMetering":{"attributes":{"currentSummDelivered":[0,0]}},"manuSpecificTuya_3":{"attributes":{"switchType":0}}},"binds":[{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0x00212effff05f8c2","endpointID":1}],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":65,"stackVersion":2,"hwVersion":0,"swBuildId":"0122052017","zclVersion":3,"interviewCompleted":true,"meta":{"configured":1},"lastSeen":1667501438384,"defaultSendRequestWhen":"immediate"}

Caillema avatar Nov 03 '22 19:11 Caillema

Great, added the device!

Changes will be available in the dev branch tomorrow. (https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html)

Koenkk avatar Nov 04 '22 18:11 Koenkk

Hi,

I installed the new Edge some minutes ago , but the part of power and energy measurement is missing. I see now, that this topic and my original topic include two different Devices. The device of this topic is a single switch, while my topic is a switch with power monitoring 1455.

The db row of switch with monitoring :

{"id":107,"type":"Router","ieeeAddr":"0xa4c138e469f1a381","nwkAddr":13553,"manufId":4417,"manufName":"_TZ3000_xkap8wtb","powerSource":"Mains (single phase)","modelId":"TS000F","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":256,"inClusterList":[0,3,4,5,6,10,57344,1794,2820,4096,6280],"outClusterList":[25],"clusters":{"57344":{"attributes":{"53251":"AAAA"}},"genOnOff":{"attributes":{"32768":0,"tuyaBacklightMode":1,"moesStartUpOnOff":2,"onOff":0,"onTime":0,"offWaitTime":0}},"haElectricalMeasurement":{"attributes":{"rmsVoltage":232,"rmsCurrent":66,"activePower":0}},"genBasic":{"attributes":{"modelId":"TS000F","manufacturerName":"_TZ3000_xkap8wtb","powerSource":1,"zclVersion":3,"appVersion":65,"stackVersion":2,"hwVersion":0,"swBuildId":"0122052017"}},"seMetering":{"attributes":{"currentSummDelivered":[0,0]}},"manuSpecificTuya_3":{"attributes":{"switchType":0}}},"binds":[{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0x00124b00216004eb","endpointID":1}],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":65,"stackVersion":2,"hwVersion":0,"swBuildId":"0122052017","zclVersion":3,"interviewCompleted":true,"meta":{"configured":1},"lastSeen":1667665508400,"defaultSendRequestWhen":"immediate"}

sdalee avatar Nov 05 '22 16:11 sdalee

@sdalee but it does work with https://github.com/Koenkk/zigbee2mqtt/issues/13929#issuecomment-1301081046 ?

Koenkk avatar Nov 06 '22 13:11 Koenkk

@sdalee but it does work with #13929 (comment) ?

@Koenk Well, If I use external converter, I will get the same result as in Caillema's comment (current and energy wrong, 'power_on_behavior' and 'swithc_type' don't appear).

If I use zigbee2MQTT add-on, i will get the following result (after permit join): image I've tried the 'power on behavior'. It works. But as you see the power monitoring functions don't appear.

If I use zigbee2MQTT Edge add-on, i will get the following result (after permit join): image In this case, the energy doesn't work and the 'power_on_behavior' and 'swithc_type' don't appear.

Thanks in advance for your help!

sdalee avatar Nov 06 '22 22:11 sdalee

Pushed a fix, please check.

Changes will be available in the dev branch in a few hours from now. (https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html)

Koenkk avatar Nov 07 '22 16:11 Koenkk