Koenkk / zigbee-herdsman-converters

Collection of device converters to be used with zigbee-herdsman
MIT License
910 stars 3.03k forks source link

Support for Aqara Wireless Remote Switch H1 - WRS-R02 #2620

Closed brozikcz closed 3 years ago

brozikcz commented 3 years ago

Hi,

I thought that it is the same device as the lumi.remote.b286acn01 but when I changed the xiaomi.js - add lumi.remote.b28ac1 into https://github.com/Koenkk/zigbee-herdsman-converters/blob/54c35f09272d153a1db4336ab83a0d86eb89dc1a/devices/xiaomi.js#L168)

and paired the device I got:

Zigbee2MQTT:debug 2021-05-24 19:52:32: Received Zigbee message from '0x54ef441000065e90', type 'readResponse', cluster 'genBasic', data '{"modelId":"lumi.remote.b28ac1"}' from endpoint 1 with groupID 0
Zigbee2MQTT:debug 2021-05-24 19:52:33: Received Zigbee message from '0x54ef441000065e90', type 'readResponse', cluster 'genBasic', data '{"manufacturerName":"LUMI"}' from endpoint 1 with groupID 0
Zigbee2MQTT:debug 2021-05-24 19:52:34: Received Zigbee message from '0x54ef441000065e90', type 'readResponse', cluster 'genBasic', data '{"powerSource":3}' from endpoint 1 with groupID 0
Zigbee2MQTT:debug 2021-05-24 19:52:35: Received Zigbee message from '0x54ef441000065e90', type 'readResponse', cluster 'genBasic', data '{"zclVersion":3}' from endpoint 1 with groupID 0
Zigbee2MQTT:debug 2021-05-24 19:52:36: Received Zigbee message from '0x54ef441000065e90', type 'readResponse', cluster 'genBasic', data '{"appVersion":21}' from endpoint 1 with groupID 0
Zigbee2MQTT:debug 2021-05-24 19:52:37: Received Zigbee message from '0x54ef441000065e90', type 'readResponse', cluster 'genBasic', data '{"stackVersion":2}' from endpoint 1 with groupID 0
Zigbee2MQTT:debug 2021-05-24 19:52:38: Received Zigbee message from '0x54ef441000065e90', type 'readResponse', cluster 'genBasic', data '{"hwVersion":1}' from endpoint 1 with groupID 0
Zigbee2MQTT:debug 2021-05-24 19:52:39: Received Zigbee message from '0x54ef441000065e90', type 'readResponse', cluster 'genBasic', data '{"dateCode":"20200907"}' from endpoint 1 with groupID 0
Zigbee2MQTT:debug 2021-05-24 19:52:40: Received Zigbee message from '0x54ef441000065e90', type 'readResponse', cluster 'genBasic', data '{"swBuildId":"2019\u0000www."}' from endpoint 1 with groupID 0
Zigbee2MQTT:info  2021-05-24 19:52:41: Successfully interviewed '0x54ef441000065e90', device has successfully been paired
Zigbee2MQTT:info  2021-05-24 19:52:41: Device '0x54ef441000065e90' is supported, identified as: Xiaomi Aqara double key wireless wall switch (2018 model) (WXKG02LM_rev2)
Zigbee2MQTT:info  2021-05-24 19:52:41: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"definition":{"description":"Aqara double key wireless wall switch (2018 model)","exposes":[{"access":1,"description":"Remaining battery in %","name":"battery","property":"battery","type":"numeric","unit":"%","value_max":100,"value_min":0},{"access":1,"description":"Triggered action (e.g. a button click)","name":"action","property":"action","type":"enum","values":["single_left","single_right","single_both","double_left","double_right","double_both","hold_left","hold_right","hold_both"]},{"access":1,"description":"Voltage of the battery in millivolts","name":"voltage","property":"voltage","type":"numeric","unit":"mV"},{"access":1,"description":"Link quality (signal strength)","name":"linkquality","property":"linkquality","type":"numeric","unit":"lqi","value_max":255,"value_min":0}],"model":"WXKG02LM_rev2","supports_ota":false,"vendor":"Xiaomi"},"friendly_name":"0x54ef441000065e90","ieee_address":"0x54ef441000065e90","status":"successful","supported":true},"type":"device_interview"}'
Zigbee2MQTT:info  2021-05-24 19:52:41: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"interview_successful","meta":{"description":"Aqara double key wireless wall switch (2018 model)","friendly_name":"0x54ef441000065e90","model":"WXKG02LM_rev2","supported":true,"vendor":"Xiaomi"},"type":"pairing"}'
Zigbee2MQTT:debug 2021-05-24 19:55:03: Received Zigbee message from '0x54ef441000065e90', type 'commandToggle', cluster 'genOnOff', data '{}' from endpoint 1 with groupID 0
Zigbee2MQTT:debug 2021-05-24 19:55:03: No converter available for 'WXKG02LM_rev2' with cluster 'genOnOff' and type 'commandToggle' and data '{}'
Zigbee2MQTT:debug 2021-05-24 19:55:03: Received Zigbee message from '0x54ef441000065e90', type 'commandToggle', cluster 'genOnOff', data '{}' from endpoint 1 with groupID 0
Zigbee2MQTT:debug 2021-05-24 19:55:03: Received Zigbee message from '0x54ef441000065e90', type 'commandToggle', cluster 'genOnOff', data '{}' from endpoint 1 with groupID 0
Zigbee2MQTT:debug 2021-05-24 19:55:03: Received Zigbee message from '0x54ef441000065e90', type 'commandToggle', cluster 'genOnOff', data '{}' from endpoint 1 with groupID 0
Zigbee2MQTT:debug 2021-05-24 19:55:03: Received Zigbee message from '0x54ef441000065e90', type 'commandToggle', cluster 'genOnOff', data '{}' from endpoint 1 with groupID 0
Zigbee2MQTT:debug 2021-05-24 19:55:03: Received Zigbee message from '0x54ef441000065e90', type 'commandToggle', cluster 'genOnOff', data '{}' from endpoint 1 with groupID 0
Zigbee2MQTT:debug 2021-05-24 19:55:03: Received Zigbee message from '0x54ef441000065e90', type 'commandToggle', cluster 'genOnOff', data '{}' from endpoint 1 with groupID 0
Zigbee2MQTT:debug 2021-05-24 19:55:03: No converter available for 'WXKG02LM_rev2' with cluster 'genOnOff' and type 'commandToggle' and data '{}'
Zigbee2MQTT:debug 2021-05-24 19:55:03: No converter available for 'WXKG02LM_rev2' with cluster 'genOnOff' and type 'commandToggle' and data '{}'
Zigbee2MQTT:debug 2021-05-24 19:55:03: No converter available for 'WXKG02LM_rev2' with cluster 'genOnOff' and type 'commandToggle' and data '{}'
Zigbee2MQTT:debug 2021-05-24 19:55:03: No converter available for 'WXKG02LM_rev2' with cluster 'genOnOff' and type 'commandToggle' and data '{}'
Zigbee2MQTT:debug 2021-05-24 19:55:03: No converter available for 'WXKG02LM_rev2' with cluster 'genOnOff' and type 'commandToggle' and data '{}'
Zigbee2MQTT:debug 2021-05-24 19:55:03: No converter available for 'WXKG02LM_rev2' with cluster 'genOnOff' and type 'commandToggle' and data '{}'

Please could someone help me with adding this device?

Koenkk commented 3 years ago

Just added in https://github.com/Koenkk/zigbee-herdsman-converters/pull/2621.

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

brozikcz commented 3 years ago

Wow, thank you!

Koenkk commented 3 years ago

Don't thank me but @kirovilya :smile:

lukasstanek commented 3 years ago

Hi @Koenkk

it seems I'm not able to bind both buttons to separate lights / groups in command mode.

I had a look and was wondering if this would have something to do with it:

In device definition of the PR above, there's the following todo:

// TODO/BUG:
// Did not understand how to separate the left and right keys in command mode -
// the "toggleCommand" always arrives from the first endpoint

When I researched this I came upon following comment in the deconz github. Would this be something that we are missing in the Z2M coordinator firmware right now? https://github.com/dresden-elektronik/deconz-rest-plugin/issues/4842#issuecomment-845438855

Apologies if I oversaw something there or it's totally unrelated.