dresden-elektronik / deconz-rest-plugin

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

REST-API sends fake status updates when scene switch is clicked #5573

Closed Redsandro closed 2 years ago

Redsandro commented 2 years ago

Describe the bug

I connected a TS004F aka Tuya ZigBee Wireless 12 Scene Switch found here on Aliexpress to the Raspbee 2.

https://github.com/dresden-elektronik/deconz-rest-plugin/blob/39099c0ae9e078768bf2e18df2844bbd22b6b44c/bindings.cpp#L3072

Without assigning the button to any group, button 1 and 2 toggled every single connected light on and off respectively.

A deCONZ user with an Aqara Opple Switch instructed me to reset the switch again, and upon establishing the connection with deCONZ, quickly hit the reset button one more time to "disable 'master' mode". I never heard this before, but indeed it works. The buttons no longer physically switch everything attached to deCONZ on or off.

The problem is that the REST-API still sends state updates as if everything is switched off and on.

This causes problems when further processing is done by anything consuming the REST-API, such as OpenHAB or other domotics solutions. For example, if you use deCONZ to switch on a Zigbee light, and use deCONZ > REST-API > OpenHAB to switch on a Wifi light when the Zigbee light turns on, the result is now that only the Wifi light erroneously turns on while the Zigbee light properly stays off.

Steps to reproduce the behavior

  1. Hold reset button to bind Tuya 4-gang switch
  2. Observe button 1 and 2 function like a master switch and physically turn all groups on and off
  3. Observe statuses are communicated over REST-API
  4. Hold reset button again, this time after the connection is made (light flash) quickly hit the reset button once more
  5. Observe button 1 and 2 no longer physically turn all groups on and off
  6. Observe REST-API still sends status updates as if all groups turns on and off

Expected behavior

REST-API follows deCONZ behavior exactly.

Environment

Additional context

I don't know this behavior. I don't know if this feature is related to the button itself, to Zigbee or to the deCONZ software. I tried to explain it as best as I could, but if I understood what was going on, I would probably explain it better.

close-issue-app[bot] commented 2 years ago

Hi there.

Thank you for filing this issue. Unfortunately, we cannot help you, as you haven't sticked to the provided template and/or have not provided all information requested. Consequently, this issue has been closed.
We're more than happy to help out where we can once you raise a new issue containing all requested information in the requested format.

In this regard, please take note that:
- read the template thoroughly
- all given header lines (starting with ###) must not be deleted
- everything enclosed by <!-- --> is intended to give you guidance and should be replaced by your input specific to the issue
- Listings regarding your environment must be filled out completely where applicable (bug reports and user questions).
- Not following the template or providing insufficient information can still implicate manual closure.
- Anything that is not clearly a bug can still implicate manual closure. For support we recommend the forum: https://forum.phoscon.de

So please, first help us a bit to help you!