After many hours of trial and error I finally figured this out.
I have a Philips Hue Dimmer Switch (RWL021) and a Hue Light strip which I wanted to bind together.
Thanks to this thread I found the ZHA toolkit, which is how I got this to work. Another major hint was that people wrote that the dimmer can control only 1 thing at the time. A thing can either be a group or a device.
Firstly, I used zha_toolkit.binds_get
to find out how my dimmer was connected from the get-go.
The important bit of the reply can be found in the cluster-ids. Command:
service: zha_toolkit.binds_get
data:
ieee: 00:17:88:01:08:71:b5:ae
Reply (or well, the important bit):
result:
"0":
src: 00:17:88:01:08:71:b5:ae
src_ep: 1
cluster_id: "0x0008"
dst:
addrmode: 3
dst_ieee: 00:12:4b:00:1c:dc:60:19
dst_ep: 2
"1":
src: 00:17:88:01:08:71:b5:ae
src_ep: 1
cluster_id: "0x0006"
dst:
addrmode: 3
dst_ieee: 00:12:4b:00:1c:dc:60:19
dst_ep: 2
"2":
src: 00:17:88:01:08:71:b5:ae
src_ep: 1
cluster_id: "0x0005"
dst:
addrmode: 3
dst_ieee: 00:12:4b:00:1c:dc:60:19
dst_ep: 2
"3":
src: 00:17:88:01:08:71:b5:ae
src_ep: 2
cluster_id: "0x0001"
dst:
addrmode: 3
dst_ieee: 00:12:4b:00:1c:dc:60:19
dst_ep: 1
"4":
src: 00:17:88:01:08:71:b5:ae
src_ep: 2
cluster_id: "0x000F"
dst:
addrmode: 3
dst_ieee: 00:12:4b:00:1c:dc:60:19
dst_ep: 1
"5":
src: 00:17:88:01:08:71:b5:ae
src_ep: 2
cluster_id: "0xFC00"
dst:
addrmode: 3
dst_ieee: 00:12:4b:00:1c:dc:60:19
dst_ep: 1
Browsing to the device and choosing “Manage Zigbee Device” you can find out what each cluster_id does.
The important ones for me here are 0x0006 (On/Off) and 0x0008 (LevelControl). The first cluster tells the ‘thing’ to turn on or off, while the second tells it to dim. By default, HA binds these to the Zigbee Controller, in my case the ieee number is 00:12:4b:00:1c:dc:60:19. (BTW, the ieee number can be found under Zigbee Info in Device Info:
Knowing all this, I used ZHA toolkit to firstly remove these bindings (but only those, not everything!)
service: zha_toolkit.binds_remove_all
data:
ieee: 00:17:88:01:08:71:b5:ae
command_data: 00:12:4b:00:1c:dc:60:19
cluster: [0x0006, 0x0008]
tries: 100
00:17:88:01:08:71:b5:ae is the ieee number of the dimmer, 00:12:4b:00:1c:dc:60:19 is the coordinator. Don’t forget to wake your device here.
After that, I run the bind command to link the dimmer and the light together:
service: zha_toolkit.bind_ieee
data:
ieee: 00:17:88:01:08:71:b5:ae
command_data: 00:17:88:01:06:d2:2f:80
tries: 100
This then re-creates the bindings with clusters 0x0006 and 0x0008, but now they are pointed at the light instead of the Zigbee controller. To check, you can re-run the first service call zha_toolkit.binds_get
.
Hope this helps!