After pairing an RWL021 Hue switch and an LCT015 Hue light to HA, I bound them together using TouchLink, which is when you press the On button on the switch while holding it next to the bulb.
Now the switch is able to control the light directly, independently of the coordinator (a ConBee II) or HA. I’m able to toggle and dim the lights, and also cycle through default scenes for the light.
Now just to be clear, those aren’t HA scenes. I’ve paired the devices through ZHA, but I don’t think this is relevant because these scenes exist independently of the coordinator and HA, they are stored on-device.
This can be confirmed with ZigBee cluster attributes on the light device:
- cluster ID 5 (scenes)
- attribute ID:
- 0 (count: 5, although there are 4 scenes)
- 1 (current_scene: 0 to 3 depending which scene is selected)
- 2 (current_group: 4654)
The scenes 0 to 3 seem to correspond, in that order, to the Relax, Read, Concentrate & Energize scenes as seen in the Hue app when using that to pair the lights.
I was hoping to perform CRUD operations on these scenes, but I don’t have the spec…
I’ve been playing a bit, but I got as far as running a command to get details for the scene, i.e.
service: zha.issue_zigbee_cluster_command
data:
ieee: <ieee>
endpoint_id: 11
cluster_id: 5
cluster_type: in
command: 1
command_type: server
args:
- 4654
- 0
This command with ID 1 is called view
.
What I get in the logs from that command is this:
2022-07-31 00:18:18 WARNING (MainThread) [zigpy.zcl] [0x6C53:11:0x0005] Data remains after deserializing ZCL frame: b'\x06\x00\x01\x01\x08\x00\x01\x90\x00\x03\x04k\x80Fj'
That’s good because I expect data to come back from it, but I don’t know what this data means, or what I could change it to use the various other commands in the cluster (I’ve got add
, remove
, store
…). It’s binary data (the characters k
, F
and j
are there just because that binary data accidentally matched with readable ASCII codes).
So I 've got these hex values for the scene ids 0 to 3:
06 00 01 01 08 00 01 90 00 03 04 6b 80 46 6a
06 00 01 01 08 00 01 fe 00 03 04 f9 71 23 68
06 00 01 01 08 00 01 fe 00 03 04 7b 5e 36 5f
06 00 01 01 08 00 01 fe 00 03 04 8a 50 8f 54
The 8th byte with values 90
(144d) and fe
(254d) is almost certainly the brightness. I suspect the last 4 to be RGB plus something? In any case, it doesn’t tell me what the input parameters could be to modify or add scenes…