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

Hue wall switch new model RDM004 does support hybrid mode #7947

Open ebaauw opened 3 weeks ago

ebaauw commented 3 weeks ago

Does the issue really belong here?

Is there already an existing issue for this?

Describe the bug

Unlike the original model Hue wall switch (RDM001), the new model (RDM004, see #7490) does support hybrid mode, sending both button event notifications from the (server) Hue Button cluster (0xFC00) and On/Off commands from (client) On/Off cluster. As usual, the Hue-specific Configuration attribute (0x0031) on the Basic cluster needs to be set to 0x000B for this. Both unicast and group bindings from the (client) On/Off cluster seem to work.

There is one caveat, however: the On/Off commands are sent for both inputs, when configured as Dual Rocker Switch or Dual Push Button.

Also note that, despite the presence of a (client) Level Control cluster, the module won't sent Level Control commands, even after binding the Level Control cluster configuring the module as Push Button.

Steps to reproduce the behavior

Write 0x000B to Configuration in the Basic cluster, and create a binding from the (client) On/Off cluster to a light or group. Observe that the light state changes and the FC00 button event is received.

Expected behavior

API should expose config/groups on the ZHASwitch sensors resource.

Screenshots

No response

Environment

deCONZ Logs

Sep 28 12:16:33 pi5 deCONZ[1825028]: 12:16:33:205 [INFO] - No button map for: RDM004, broadcast to: 0x006E, endpoint: 0x01, cluster: ONOFF (0x0006), command: OFF_WITH_EFFECT (0x40), payload: 0000, zclSeq: 34
Sep 28 12:16:33 pi5 deCONZ[1825028]: 12:16:33:248 [INFO] - No button map for: RDM004, unicast to: 0x0000, endpoint: 0x01, cluster: 0xFC00, command: 0x00, payload: 0100003000210000, zclSeq: 33

Additional context

No response

pimw1 commented 4 days ago

Hi Erik, what does the hybrid mode mean in practice? Does it mean that the switch can directly switch lights on/off without the use of the zigbee coordinator? I've the old model (RDM001) and i'm wondering whether an upgrade would be worth it.

ebaauw commented 4 days ago

Short answer: yes. Long answer follows:

Normally, wireless switches/buttons/dials/dimmers either work as controller or as sensor.

Some Hue devices (like the Hue dimmer switch, the 2nd gen Hue motion sensors and, as we recently figured out, the 2nd gen Hue wall switch module) can be working in (what I like to call) "hybrid" mode, simultaneously as sensor and as controller. However, we don't (yet?) expose config.group on all these devices (as we don't want to pollute the Zigbee network with unused group messages), so you would need to setup the binding manually (in the GUI). Also, not the limitations of the 2nd gen Hue wall switch module: no dimming (even in push button mode), and only one group (even when in dual mode).

Note that, strictly speaking, the coordinator (the RaspBee or ConBee device) plays no role here. It's the deCONZ software (or more precise: the REST API plugin) that acts as gateway between the Zigbee and IP networks and executes the rules.

pimw1 commented 4 days ago

Got ya, thanks. In my current setup i've combined 2x RDM001 with something like this: https://www.girastore.nl/314700.html

So i've basicaly a left part (up and down buttons) and a right part (up and down buttons). Left side is connected to a RDM001, right side is connected to another RDM001.

In my current setup:

Ideally, i would like to take advantage of the hybrid approach to make the system more robust. I would like to keep it working exactly as described above, unless Deconz/Home Assistant are not responding for whatever reason. In that case, i would like it fall back to the controller mode:

Reading your explanation, i don't think this is possible because the distinction between "lights on" (when lights are off) versus "next scene" (when lights are on) cannot be made?

ebaauw commented 4 days ago

With direct control, the wall switch module will alternatively send On or Off, irrespective of the current light state, similar to the 2nd-gen Hue dimmer switch. Also, it will not take into account of whether you press the up or down button (100x or 200x buttonevent).