Zigbee devices have been running throughout my home for a few years now. Overall, they are pretty reliable however even a basic setup entails a significant chain of dependencies. In my case, I use Home Assistant (HA) as a hub with a Zigbee dongle attached. Everything pairs to HA via the dongle and can be interacted with via Siri and the Home App. The catch is if anything in the chain fails (network, WiFi, Raspberry Pi, etc) the automated experience breaks in weird and wonderful ways.

With so many potential points of failure, a home can quickly start to feel like a production environment and you are the unhappy customer if it fails! Expectations quickly get set that your smart home will take care of all the trivial tasks and it’s a rough time when it doesn’t. This is partly because you lose muscle memory for tasks like turning on the lights so you’re forced to think about them when reverting to the old fashion way. It's valuable to remember that as our smart home dependency increases and so does our expectation of availability.

As someone who enjoys introducing unnecessary changes into my home network, there's no surprise availability can sometimes be a problem. As you can imagine it’s no fun making a last-minute, sleep-deprived change right before bed that requires an extra hour for recovery.

Solving for this my mind jumped immediately to adding redundancy. Routers, switches and deploying k3s but besides cost, this approach results in substantial maintenance overhead. I don't want to spend my time keeping things alive. What I’m trying to solve here is the ability to control a few key devices when Home Assistant is degraded. Enter Zigbee bindings.

There are two regular options when connecting Zigbee devices (like a remote to a bulb). Firstly, you can pair them directly with each other. In this configuration, they only talk to each other and you have no visibility or control within Home Assistant. Alternatively, you pair them with Home Assistant and create automation between them. As you might imagine, this can increase latency as a button press from a remote needs to find its way to HA and back to the light. That said, you gain the significant feature set available in HA (mobile apps, voice assistants, etc).

Instead, Zigbee bindings give you the best of both worlds! You can pair both devices to HA and then use it to configure an additional direct link between the devices. This way it’s possible to maintain visibility and control of the devices within HA and also benefit from the fast response times and reliability offered by a direct connection. This means I'm free to accidentally `rm -rf /` the Raspberry Pi running HA right before bed and worry about it in the morning because I can still turn off my bedside lamp using the paired remote!

Set it up

Getting this setup in HA is pretty straightforward once you know where to look. Some of the menus are hidden away so it’s not super intuitive although it's reasonable given the niche nature of the config. For reference, I’m using the ZHA integration to manage my Zigbee network but other integrations such as zigbee2mqtt also appear to offer device binding configurations.

Binding Support

It’s important to note that not all Zigbee devices will support bindings and it can differ according to the manufacturer and even the device firmware version. An easy way to get concrete information is to look up the device docs on zigbee2mqtt. As an example, looking at my Ikea remote we can see the type of binding support varies based on the firmware version. I was able to identify the firmware version by opening Zigbee management for the device (see "Device Management") and selecting read attributes with the following options:

  • Tab: Clusters
  • Clusters: Basic
  • Attributes of the selected cluster: sw_build_id

Note: You may be required to activate the device (e.g. button press) to see the value.

Device Management

You can reach Zigbee device management by:
Open a device > Ellipses under “Device info” > Manage Zigbee device

This device management menu can be used to read/write device settings. Importantly if you’re using a battery-operated device like my Ikea remote you might need to activate the device (mine was via a button press) to see the result appear after requesting it in HA. This was necessary because the battery-operated remote disconnects after each request to save power. This means HA can’t initiate the request to retrieve the value and instead must wait to receive a request.

Configure a binding

From a configuration standpoint, you’ll likely want to set your bindings on a controlling device (like a remote). If you’d like to target a group of devices you can create one by going to Settings > Devices & Services > Open ZHA Integration > Groups Tab > Create Group.

Once you’re ready to link a remote, open the device's Zigbee management menu. From here we can get under the hood and configure the remote without disconnecting from ZHA. Select a bindable device or group from the dropdown menu and use the associated bind button. If you go with a group you’ll need to select the checkboxes.

Reminder: Don’t forget, once clicking the bind button to activate the device (e.g. button press) so it receives the new configuration.

Once complete you're ready to go! You can now temporarily disable the ZHA plugin and test whether the device can control another via the binding!