From version 1.36.0 WXKG01LM single press is passed in MQTT as Long press
What happened?
If i short press the button, Z2M pass in the MQTT topic click with "long" value. Action is correct passed as single.
No problem with long and double click.
What did you expect to happen?
I expect that click is passed as single, as worked before that version.
How to reproduce it (minimal and precise)
Short press the button, Z2M pass in the MQTT topic click with "long" value.
Zigbee2MQTT version
1.36.0
Adapter firmware version
20211217
Adapter
SONOFF Zigbee USB dongle - zStack3x0
Setup
Home Assistant OS container
Debug log
2024-03-03 11:43:15MQTT publish: topic 'zigbee2mqtt/Pulsante ingresso', payload '{"action":"single","battery":100,"click":null,"linkquality":185,"power_outage_count":317,"voltage":3012}' Info 2024-03-03 11:43:15MQTT publish: topic 'zigbee2mqtt/Pulsante ingresso', payload '{"action":"","battery":100,"click":null,"linkquality":185,"power_outage_count":317,"voltage":3012}' Info 2024-03-03 11:43:15MQTT publish: topic 'zigbee2mqtt/Pulsante ingresso/action', payload 'single' Info 2024-03-03 11:43:16MQTT publish: topic 'zigbee2mqtt/Pulsante ingresso', payload '{"action":null,"battery":100,"click":"long","linkquality":185,"power_outage_count":317,"voltage":3012}' Info 2024-03-03 11:43:16MQTT publish: topic 'zigbee2mqtt/Pulsante ingresso', payload '{"action":null,"battery":100,"click":"","linkquality":185,"power_outage_count":317,"voltage":3012}' Info 2024-03-03 11:43:16MQTT publish: topic 'zigbee2mqtt/Pulsante ingresso/click', payload 'long'
herdsman debug log:
2024-03-04T13:30:05.000Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,27,68,129,0,0,6,0,137,182,1,1,0,174,0,179,186,230,0,0,7,24,247,10,0,0,16,0,137,182,29,118] 2024-03-04T13:30:05.000Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,27,68,129,0,0,6,0,137,182,1,1,0,174,0,179,186,230,0,0,7,24,247,10,0,0,16,0,137,182,29,118] 2024-03-04T13:30:05.000Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 27 - 2 - 4 - 129 - [0,0,6,0,137,182,1,1,0,174,0,179,186,230,0,0,7,24,247,10,0,0,16,0,137,182,29] - 118 2024-03-04T13:30:05.000Z zigbee-herdsman:adapter:zStack:znp:AREQ <-- AF - incomingMsg - {"groupid":0,"clusterid":6,"srcaddr":46729,"srcendpoint":1,"dstendpoint":1,"wasbroadcast":0,"linkquality":174,"securityuse":0,"timestamp":15121075,"transseqnumber":0,"len":7,"data":{"type":"Buffer","data":[24,247,10,0,0,16,0]}} 2024-03-04T13:30:05.001Z zigbee-herdsman:controller:log Received 'zcl' data '{"frame":{"Header":{"frameControl":{"frameType":0,"manufacturerSpecific":false,"direction":1,"disableDefaultResponse":true,"reservedBits":0},"transactionSequenceNumber":247,"manufacturerCode":null,"commandIdentifier":10},"Payload":[{"attrId":0,"dataType":16,"attrData":0}],"Command":{"ID":10,"name":"report","parameters":[{"name":"attrId","type":33},{"name":"dataType","type":32},{"name":"attrData","type":1000}]}},"address":46729,"endpoint":1,"linkquality":174,"groupID":0,"wasBroadcast":false,"destinationEndpoint":1}' Zigbee2MQTT:debug 2024-03-04 14:30:05: Received Zigbee message from 'Pulsante ingresso', type 'attributeReport', cluster 'genOnOff', data '{"onOff":0}' from endpoint 1 with groupID 0 2024-03-04T13:30:05.002Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [] 2024-03-04T13:30:05.207Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,27,68,129,0,0,6,0,137,182,1,1,0,178,0,45,237,230,0,0,7,24,248,10,0,0,16,1,137,182,29,173] 2024-03-04T13:30:05.207Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,27,68,129,0,0,6,0,137,182,1,1,0,178,0,45,237,230,0,0,7,24,248,10,0,0,16,1,137,182,29,173] 2024-03-04T13:30:05.207Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 27 - 2 - 4 - 129 - [0,0,6,0,137,182,1,1,0,178,0,45,237,230,0,0,7,24,248,10,0,0,16,1,137,182,29] - 173 2024-03-04T13:30:05.207Z zigbee-herdsman:adapter:zStack:znp:AREQ <-- AF - incomingMsg - {"groupid":0,"clusterid":6,"srcaddr":46729,"srcendpoint":1,"dstendpoint":1,"wasbroadcast":0,"linkquality":178,"securityuse":0,"timestamp":15133997,"transseqnumber":0,"len":7,"data":{"type":"Buffer","data":[24,248,10,0,0,16,1]}} 2024-03-04T13:30:05.208Z zigbee-herdsman:controller:log Received 'zcl' data '{"frame":{"Header":{"frameControl":{"frameType":0,"manufacturerSpecific":false,"direction":1,"disableDefaultResponse":true,"reservedBits":0},"transactionSequenceNumber":248,"manufacturerCode":null,"commandIdentifier":10},"Payload":[{"attrId":0,"dataType":16,"attrData":1}],"Command":{"ID":10,"name":"report","parameters":[{"name":"attrId","type":33},{"name":"dataType","type":32},{"name":"attrData","type":1000}]}},"address":46729,"endpoint":1,"linkquality":178,"groupID":0,"wasBroadcast":false,"destinationEndpoint":1}' 2024-03-04T13:30:05.209Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [] Zigbee2MQTT:debug 2024-03-04 14:30:05: Received Zigbee message from 'Pulsante ingresso', type 'attributeReport', cluster 'genOnOff', data '{"onOff":1}' from endpoint 1 with groupID 0 Zigbee2MQTT:info 2024-03-04 14:30:05: MQTT publish: topic 'zigbee2mqtt/Pulsante ingresso', payload '{"action":"single","battery":100,"click":null,"linkquality":178,"power_outage_count":317,"voltage":3012}' Zigbee2MQTT:info 2024-03-04 14:30:05: MQTT publish: topic 'zigbee2mqtt/Pulsante ingresso', payload '{"action":"","battery":100,"click":null,"linkquality":178,"power_outage_count":317,"voltage":3012}' Zigbee2MQTT:info 2024-03-04 14:30:05: MQTT publish: topic 'zigbee2mqtt/Pulsante ingresso/action', payload 'single' Zigbee2MQTT:info 2024-03-04 14:30:06: MQTT publish: topic 'zigbee2mqtt/Pulsante ingresso', payload '{"action":null,"battery":100,"click":"long","linkquality":178,"power_outage_count":317,"voltage":3012}' Zigbee2MQTT:info 2024-03-04 14:30:06: MQTT publish: topic 'zigbee2mqtt/Pulsante ingresso', payload '{"action":null,"battery":100,"click":"","linkquality":178,"power_outage_count":317,"voltage":3012}' Zigbee2MQTT:info 2024-03-04 14:30:06: MQTT publish: topic 'zigbee2mqtt/Pulsante ingresso/click', payload 'long' 2024-03-04T13:30:20.453Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,5,69,196,180,152,1,113,164,124] 2024-03-04T13:30:20.454Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,5,69,196,180,152,1,113,164,124] 2024-03-04T13:30:20.454Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 5 - 2 - 5 - 196 - [180,152,1,113,164] - 124 2024-03-04T13:30:20.454Z zigbee-herdsman:adapter:zStack:znp:AREQ <-- ZDO - srcRtgInd - {"dstaddr":39092,"relaycount":1,"relaylist":[42097]} 2024-03-04T13:30:20.454Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
Same problem. A short click on the wireless switch (WXKG01LM) is processed as a long click on the wireless switch.
I confirm - the same problem:
After update zigbee2mqtt Addon to v1.36.0, the button Mi wireless switch (WXKG01LM) started to interpret a single click as a long press. Automations triggered by a single click no longer work. The situation occurs on all Mi wireless switch (WXKG01LM) Addon version
v1.36.0
Platform - HomeAssistant Core 2024.2.4 Supervisor 2024.02.1 Operating System 12.0 Logs of the issue (if applicable)
In Z2M log "single click" looks like this (MQTT publish two different action topics) :
info 2024-03-02 19:01:29MQTT publish: topic 'zigbee2mqtt/switch_1', payload '{"action":"single","battery":100,"click":null,"linkquality":54,"power_outage_count":95,"voltage":3022}' info 2024-03-02 19:01:29MQTT publish: topic 'zigbee2mqtt/switch_1', payload '{"action":"","battery":100,"click":null,"linkquality":54,"power_outage_count":95,"voltage":3022}' info 2024-03-02 19:01:30MQTT publish: topic 'zigbee2mqtt/switch_1/action', payload 'single' info 2024-03-02 19:01:30MQTT publish: topic 'zigbee2mqtt/switch_1', payload '{"action":null,"battery":100,"click":"long","linkquality":54,"power_outage_count":95,"voltage":3022}' info 2024-03-02 19:01:30MQTT publish: topic 'zigbee2mqtt/switch_1', payload '{"action":null,"battery":100,"click":"","linkquality":54,"power_outage_count":95,"voltage":3022}' info 2024-03-02 19:01:30MQTT publish: topic 'zigbee2mqtt/switch_1/click', payload 'long'
I confirm with me is the same error. Node Red sees this as a long press.
I confirm - the same problem
Same problem.
Could someone provide the herdsman debug log of this?
See this on how to enable the herdsman debug logging. Note that this is only logged to STDOUT and not to log files.
Fixed!
Note however that the click is deprecated, it's recommended to set legacy: false for this device.
Changes will be available in the dev branch in a few hours from now.
Thank you!
Thanks for the fix. Will need to revert my workaround after this drops.