How to Bind?

I’m in the same boat too. In my case it is an IKEA remote (E1524) 5 buttons tied to a single lamp (E27 Opal 980l IKEA). Conbee II + ZHA. Repeated the procedures mentioned in the thread countless times without any progress.

The UI for the remote binding don’t provide any feedback (only the groups part is reporting) but I set the debug in the zha components I can check that the bind commands of the group are sended followed by a “SUCESS”. But the lights never came on, I tried with diferents bulbs, diferent remote, repairing them, so far no luck.

Does any of you have success with a tradfri remote + bulb group binding?

Thanks for all the information/images mentioned in the thread!

Yes, I do. I have linked Trådfri remotes directly to Trådfri lights. They work even though HA and Conbee is turned off. I love this setup compared to Deconz, which was horribly unstable.
You need firstly to make a group of the light(s). You need to do this even though there is only one light you want to control.
Then you go into the remote settings for the remote you want to bind to the light.
Click “Manage Clusters” and go to the bottom section: “Group Binding”. Ignore what is above this section.
Select the previously created group in the drop-down, and select all checkboxes, and click “Bind Group”.
Lastly, go into the settings of the light(s), and click “Reconfigure device”. All done.

4 Likes

Thanks erikkt!

I have repeated the proccess with the extra step (reconfigure device) and it doesn’t work for me :frowning:

But… good news! I found another approach that works. When you add a remote, a new group ‘No name group 0xrandom’ is created.

Well… add lamps to that group et voilà! :smiley: . No new groups/bind to group/reconfigure device steps are needed in my case. Hope this helps anothers in my situation too, lost the count of hours that I have expended in this issue…

Thanks to all!

1 Like

Thanx to erikkt for good tips!
Maybe you have some experience wit MANY dimmer? If you have few bulbs and want to add one dimmer for each.
When I follow this instruction, ALL my dimmers manage ALL bulbs!!!
I added new bulb and new dimmer, repeat procedure, and - new dimmer manage my new bulb but old (group) too!! And I can’t “find” new gropup (only one bulb) to binding - only some “no name” group.
Sorry if my question is stupid, I’m extremely new in HA (and maybe just a little to old), but have energy to try.
Thanx in advance

Glad that worked for you. Unfortunately when I added a wall scene controller/remote, this has not created any groups. I still have only the one I manually created. I wonder if there are some special requirements for a remote for a group to be created for it…

Hi!

Did you ever managed to get the left/right buttons working? They should change the color temperature but this seems to do nothing.

Regards
Richard

I’m able to bind my Ikea E1743 and E1766 On Off Remotes to a light group with erikkt’s steps, but it took a lot more debugging to get the Ikea E1745 Motion Sensor working.

Binding on a created group always failed for me. The trick is to find the correct autogenerated No name group by repeatedly binding all clusters and checking the zha logs until you find the correct auto-generated group.

  1. Enable ZHA debug logs in case binding doesn’t work
  2. Add light via ZHA Add Device
  3. Note the existing ZHA groups
  4. Add motion sensor via ZHA Add Device
  5. Check for a new ZHA group No name group 0x****
    • If this motion sensor has been previously added, the group may have already appeared
  6. Add light to the group
  7. Go to motion sensor’s Manage Clusters > Group Binding > Select the identified group > Select all the cluster options
  8. Make sure the motion sensor state is Clear, then trigger the motion to be Detected
  9. Select Bind Group, and keep checking the logs, they should say [<Status.SUCCESS: 0>]
2021-02-28 14:50:48 DEBUG (MainThread) [zigpy.zdo] [0x6c37:zdo] 0x6c37: Bind_req 5c:02:72:ff:fe:50:6a:7a, ep: 1, cluster: 4 to group: 0xb3e8 completed: [<Status.SUCCESS: 0>]
2021-02-28 14:50:48 DEBUG (MainThread) [zigpy.zdo] [0x6c37:zdo] 0x6c37: Bind_req 5c:02:72:ff:fe:50:6a:7a, ep: 1, cluster: 3 to group: 0xb3e8 completed: [<Status.SUCCESS: 0>]
2021-02-28 14:50:48 DEBUG (MainThread) [zigpy.zdo] [0x6c37:zdo] 0x6c37: Bind_req 5c:02:72:ff:fe:50:6a:7a, ep: 1, cluster: 8 to group: 0xb3e8 completed: [<Status.SUCCESS: 0>]
2021-02-28 14:50:48 DEBUG (MainThread) [zigpy.zdo] [0x6c37:zdo] 0x6c37: Bind_req 5c:02:72:ff:fe:50:6a:7a, ep: 1, cluster: 4096 to group: 0xb3e8 completed: [<Status.SUCCESS: 0>]
2021-02-28 14:50:48 DEBUG (MainThread) [zigpy.zdo] [0x6c37:zdo] 0x6c37: Bind_req 5c:02:72:ff:fe:50:6a:7a, ep: 1, cluster: 6 to group: 0xb3e8 completed: [<Status.SUCCESS: 0>]
2021-02-28 14:50:48 DEBUG (MainThread) [zigpy.zdo] [0x6c37:zdo] 0x6c37: Bind_req 5c:02:72:ff:fe:50:6a:7a, ep: 1, cluster: 25 to group: 0xb3e8 completed: [<Status.SUCCESS: 0>]
  • If only one or a few of them say SUCCESS, select all the clusters and Bind Group again to the same group.
  • If all of them say failed, then repeat steps 6 through 9.
  • Once all of the clusters has returned success at least once (they don’t all need to say success at the same time), proceed to step 10.
  1. Reconfigure Device for the motion sensor
  2. Reconfigure Device for the light(s) in the group
  3. Ensure that the motion sensor state is Clear, then trigger motion detection. The lights should now work without Home Assistant running!

Motion Sensor Device signature:

{
  "node_descriptor": "NodeDescriptor(byte1=2, byte2=64, mac_capability_flags=128, manufacturer_code=4476, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=0)",
  "endpoints": {
    "1": {
      "profile_id": 260,
      "device_type": "0x0850",
      "in_clusters": [
        "0x0000",
        "0x0001",
        "0x0003",
        "0x0009",
        "0x0020",
        "0x1000",
        "0xfc7c"
      ],
      "out_clusters": [
        "0x0003",
        "0x0004",
        "0x0006",
        "0x0008",
        "0x0019",
        "0x1000"
      ]
    }
  },
  "manufacturer": "IKEA of Sweden",
  "model": "TRADFRI motion sensor",
  "class": "zhaquirks.ikea.motionzha.IkeaTradfriMotionE1745"
}

Original Debug log:

2021-02-28 11:56:37 DEBUG (MainThread) [zigpy.zdo] [0xfef0:zdo] processing 0xfef0: Bind_req 5c:02:72:ff:fe:50:6a:7a, ep: 1, cluster: 4096 to group: 0x0003
2021-02-28 11:56:37 DEBUG (MainThread) [zigpy.device] [0xfef0] Extending timeout for 0x1b request
2021-02-28 11:56:37 DEBUG (MainThread) [zigpy_deconz.zigbee.application] Sending Zigbee request with tsn 27 under 28 request id, data: b'1b7a6a50feff72025c010010010300'
2021-02-28 11:56:37 DEBUG (MainThread) [zigpy_deconz.api] Command Command.aps_data_request (30, 28, 0, <DeconzAddressEndpoint address_mode=2 address=0xFEF0 endpoint=0>, 0, <ZDOCmd.Bind_req: 0x0021>, 0, b'\x1bzjP\xfe\xffr\x02\\\x01\x00\x10\x01\x03\x00', 2, 0)
2021-02-28 11:56:37 DEBUG (MainThread) [zigpy_deconz.api] APS data request response: [2, <DeviceState.APSDE_DATA_REQUEST_SLOTS_AVAILABLE|2: 34>, 28]
2021-02-28 11:56:37 DEBUG (MainThread) [zigpy_deconz.api] Device state changed response: [<DeviceState.128|APSDE_DATA_REQUEST_SLOTS_AVAILABLE|APSDE_DATA_CONFIRM|2: 166>, 0]
2021-02-28 11:56:37 DEBUG (MainThread) [zigpy_deconz.api] Command Command.aps_data_confirm (0,)
2021-02-28 11:56:37 DEBUG (MainThread) [zigpy_deconz.api] APS data confirm response for request with id 28: 00
2021-02-28 11:56:37 DEBUG (MainThread) [zigpy_deconz.api] Request id: 0x1c 'aps_data_confirm' for <DeconzAddressEndpoint address_mode=ADDRESS_MODE.NWK address=0xfef0 endpoint=0>, status: 0x00
2021-02-28 11:57:05 DEBUG (MainThread) [zigpy.zdo] [0xfef0:zdo] 0xfef0: Bind_req 5c:02:72:ff:fe:50:6a:7a, ep: 1, cluster: 4096 to group: 0x0003 failed:

Regards,
Also Richard

3 Likes

I have the LIDL/Tuya LivarnoLux HG06323 343820_2004 remote control.

I got it working after adding the remote control to the group as well.

According to my tests the binding does not have any effect. I can only control the lightbulbs and the power outlet when the remote is in the group.

The other method that worked was to link the remote to a “LIDL” light bulb after pressing the “1” button during 5 seconds with the light bulb powered which flashes when it is paired to the remote. The remote then controls the bulb.

When configuring the remote, you have to press the buttons during the process so that it wakes up and receives the commands from the coordinator (I have a Zigbee sniffer, so I could see that the remote only responds to the configuration commands then).

More info:

I added the remote to the network by first resetting it (pressing 0+1 button during 5 seconds until the led blinks), then it enters pairing mode. So the Zigbee network should be opened just before or after that action.

The remote then paired properly.

Binding directly through the HA interface did not work. I also tried the group and did not achieve success.

However, the only way to unlink the remote from the bulb that I found was to press the “0” button for five seconds which also removed the bulb from the Zigbee network. So I had to pair the bulb to the network again.

Then I added the remote to the group as well and that fixed the issue. Even the mains plug reacted to the remote.

When you add the remote to the group, it is best that you press the buttons several times while doing it. The same goes when doing the binding process.

FYI, the ZHA docs now finally have some information explain basic concept for binding and unbinding:

https://www.home-assistant.io/integrations/zha#binding-and-unbinding

It would be great if you guys could help improve/extend the ZHA docs by submitting PRs similar to this:

https://github.com/home-assistant/home-assistant.io/pull/16336

For changing the existing docs and submitting a new PR with improvements check out zha.markdown:

https://github.com/home-assistant/home-assistant.io/blob/current/source/_integrations/zha.markdown

Adding more information about bindings limitations could be a good start in improving the ZHA docs.

4 Likes

I have the 2 button IKEA square remote (on/off/dimming). I manage to bind it to an IKEA on/off power outlet. But I have no luck to bind it to an IKEA dimmable lamp. I have createda group with the single lamp and binding the group. Then reconfigure booth the remote and the lamp.

I have tried all different combinations of having OnOff and LevelControl bound or not bounded…

Anyone succeeded with this IKEA devices?

@zamb, group bindings have been disabled for IKEA switch since software update 2.3.0.75

How to tell the software version

How to bind to many devices

1 Like

Again it would be great if you guys could help extend and improve the ZHA documentation on this topic:

https://www.home-assistant.io/integrations/zha#binding-and-unbinding

https://github.com/home-assistant/home-assistant.io/blob/97731860f5401dadef45cf37755281f8a25dc064/source/_integrations/zha.markdown

How did you manage to bind the remote to the outlet? I’ve tried everything but I just can’t can get it to work. Thanks!

ZHA-Toolkit offers several services with regards to binding.

Without that, in HA/ZHA, you can perform certain bindings.

One-to-one bindings are recommended as long as you have no more than 3/4 devices to bind onto the same command.
If you do not know it yet: you actually configure the “remote” when you want make these one-to-one bindings by telling it which other devices to send the command to.

You can also bind using groups: in that case you configure bind the remote’s cluster to a group, and you need to configure the lights to the same group.

To bind, you go to the entity, click on next to Reconfigure, where you click on Manage the Zigbee device (or similar). Then you have a horizontal tab list and the middle one is Bindings. You can the devices to bind to from the list fo devices and (un)bind the device, or the group to be bound.

When you go to the Zigbee Integration, you also have access to the groups in the center tab. There you can create groups and also add or remove devices from a group.

zha-toolkit is “low-level” but allows you to read the bindings that exist on a device, remove all or some of them and make more bindings than ZHA proposes. Of course, I recommend doing it using the internal features if you can.

Personnally I have a remote and a light in group number 2 because there were some limitationd on the remote as far as I remember (so I use a group even with less than 1 device listening).

Thanks for the clear description. The problem is that the above doesn’t work for many people. I used deconz/conbee II before and bound several remotes to groups. But attempting the same with ZHA and a Sonoff zbdongle-E, the same remote and the same lights in the group, it fails. I realize the remote needs to be awake for adding bindings. At the last attempt yesterday, pressing bind resulted in a wait cursor but nothing else. So somehow deconz manages to do something that zha can’t.

You are right, the remote needs to be awake to do the binding.

What you can do is to configure the binding in ZHA and then immediately press on a button on the remote which will wake it up.

I do not know what Domoticz’ method is, but here are a few ways I think it can be done:

  • On network association the remote may be awake for a longer time, allowing the coordinator to configure the device. During that period, the coordinator could assign a unique group to the remote and use it later to configure devices that should act on this remote’s commands;
  • There might not be a direct binding. Instead, the coordinator receives all the commands and then generates new ones to control the “slaves” (lights).
  • The system could remember that the remote still needs to be configured and repeat the command at a later time when the remote wakes up. That is a bit trickier as the remote would also sleep immediately after packet confirmation. Until the remote confirms it’s configured, the system could use the method described above.

With ZHA-Toolkit, several commands already use the “TRIES” parameters which results in commands being repeated until they succeed. Amongst the bind services, this currently is implemented on binds_get and binds_remove_all only. I added an “zha-toolkit issue” as a reminder.

In the mean time, just press the remote’s button just after sending the binding configuration.

Zigbee messages are held on the parent router for about 6 seconds.

Has anyone been able to successfully bind the Phillips hue dimmer switch via a bulb via zha? I’ve tried everything I can find, including the zha toolkit, and it hue won’t take for me.

I suggest that you verify the binding and reporting configurations on your devices.

There are essentially two zigbee only methods to link your devices (without intervention of code running on HA to transfer the command).

  1. Button notifies group, Light listens to group;
  2. Button sends direct to light.

In the first case, you bind the button’s sending cluster to a group, and the light’s receiving cluster to a group. There is no guarantee that the command sent by the button is received by the light.

In the second case, the button is configured to send to the light directly. The light has to acknowledge to the button that the command was received. The button repeats the command a few times in case the acknowledgement is not received. So that gives some guarantee. However, that method is recommended for 3/4 devices maximum.

Whatever method you used to configure the devices (HA or ZHA or ZHA-Toolkit), you can check the configuration on the devices using zha_toolkit.binds_get .

In some cases use zha_toolkit.conf_report_read when attributes need to be communicated to the other device (but for button bindings that is not useful).

In the binds_get results you should see that the relevant cluster(s) on the remote is(are) bound to the group or expected IEEE address.
When using the group method, you should check that the relevant cluster(s) on the receiving device is(are) bound to the relevant group.

Based on those results, it can be determined if the light(s) should react to the buttons or not according to the configuration that is set. If the configuration is not ok, then it can be seen which binding(s) are missing so that they can be configured using one of the available means. In zha-toolkit, this is zha_toolkit.bind_ieee

zha_toolkit.bind_group also exists, but is not documented, it is available though and the target group id must be provided in command_data

1 Like

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!

2 Likes

Good work.

Juste one note regarding:

You can actually also keep the bindings pointing to the controller so that home assitant receives these commands as well so that you can observe when commands were sent and you can use them for something else.

However, this also uses up space in the device’s binding table which can only hold that many entries. When that is the case, you could still use Zigbee groups and notify the group instead of individual devices. The Zigbee controller would need to be a member of these groups (for the relevant clusters).

Howeer groups are less reliable than device-to-device bindings because the latter has a higher guarantee of message delivery.

1 Like