dresden-elektronik / deconz-rest-plugin

deCONZ REST-API plugin to control ZigBee devices
BSD 3-Clause "New" or "Revised" License
1.9k stars 501 forks source link

Trådfri shortcut button sends 2002 on double press. #6383

Closed ebaauw closed 2 years ago

ebaauw commented 2 years ago

Describe the bug

With recent firmware, the Trådfri shortcut button supports double press, presumably for HomeKit support. However, on double press, deCONZ issues a 2002 instead of 1004.

Steps to reproduce the behavior

Double press Trådfri shortcut button, with firmware 2.3.080.

Expected behavior

1004 on double press.

Screenshots

n/a

Environment

deCONZ Logs

Oct 02 20:48:50 pi5 deCONZ[28310]: 20:48:50:137 APS-DATA.indication srcAddr: 0xed03, srcEp: 0x01 dstAddrMode: 2, profile: 0x0104, cluster: 0x0006, lqi: 255, rssi: -44
Oct 02 20:48:50 pi5 deCONZ[28310]: 20:48:50:138     asdu: 013800
Oct 02 20:48:50 pi5 deCONZ[28310]: 20:48:50:140 APS-DATA.indication from child 0xED03
Oct 02 20:48:50 pi5 deCONZ[28310]: 20:48:50:145 [INFO] - Button 2002 - TRADFRI SHORTCUT Button, unicast to: 0x0000, endpoint: 0x01, cluster: ONOFF (0x0006), action: Off, payload: None, zclSeq: 56
Oct 02 20:48:50 pi5 deCONZ[28310]: 20:48:50:149 Websocket 127.0.0.1:50310 send message: {"e":"changed","id":"59","r":"sensors","state":{"buttonevent":2002,"lastupdated":"2022-10-02T18:48:50.149"},"t":"event","uniqueid":"68:0a:e2:ff:fe:34:91:ec-01-1000"} (ret = -1097568480)

Additional context

The shortcut button shares a button map with the Trådfri on/off switch, which sends Off on single press of the Off button. Apparently, the Shortcut button now sends Off on double press.

ekt- commented 1 year ago

I'm seeing something very similar, though not identical. I use deconz via hassio. as far as i know the double click has always worked for the tradfri shortcut button, only that previously the event was 2002 and since a recent update it has become 2004. so for me there was a (breaking) change of behavior