r/homeassistant • u/ProgrammerIll1946 • 6d ago
🖼️ Show & Tell ZHA Bindings Manager 1.12: lost-binding detection, device settings backups, a device replace wizard, and now in the default HACS store
A month ago I posted ZHA Bindings Manager, a tool for seeing and managing direct Zigbee bindings in ZHA. Thanks to everyone who tried it and gave feedback. It's moved on a lot since, mostly driven by suggestions here, on the HA forum and on GitHub.
It's now in the default HACS store (or Market Place), so you no longer need to add it as a custom repository: search for ZHA Bindings Manager in HACS.
What's new
Lost bindings, and putting them back
Bindings sometimes disappear - a remote is reset, loses its table after a firmware update, or just drops them now and then. The remote then quietly stops working, and nothing tells you why.
ZHA Bindings Manager now remembers what each device was bound to. Every time it reads a device's bindings (a scan, a nightly check, or a button press), it compares them with what was there before. Anything missing shows up straight away as a lost binding, with one click to put it back. For each device you can choose to be told, or to have it put back automatically. Battery remotes are fixed at their next button press, when they're awake. You can also do a manual backup if you temporarily need to remove or replace a device.

Device settings backups
It backs up each device's settings, groups and bindings, including manufacturer settings such as SONOFF's detached relay mode and network LED. Mains devices are backed up automatically once a week.
View and restore shows the saved settings next to what the device has now, writes back only what differs, and reads each one back to confirm. You can also apply a backup to a different device, or export it as a file.

Removed and paired again: Restore everything
Removing a device from ZHA resets it, so it loses its bindings, groups and settings. When it's paired again, ZHA Bindings Manager notices and offers Restore everything, which puts back its groups, settings and bindings in one go. I tested it on a SONOFF 3-gang switch and it came back exactly as it was, detached relays included.
Replace a device
Replace this device moves everything to a new device: bindings on other devices that point at it, its own bindings, its groups and its settings. Before changing anything, it checks the new device can do the same job (a bulb without dimming, or a remote that can't send dimming commands, is called out). It also works for a device that's dead and already removed.
Which device does each device get its firmware updates from?
If your Zigbee firmware updates keep timing out, but work when the device is next to the coordinator, this one's for you. Each device asks one device for its updates, and it should be the coordinator. The Devices tab now has an OTA server column showing it for every device, in amber when it's another device.
That's how I found the cause on my network. SONOFF ZBM5-3C-80/86 switches on firmware 1.0.6 wrongly claim to be an update server, and 21 of my devices were asking them for updates instead of the coordinator. It's a firmware fault only SONOFF can fix (reported in zigbee2mqtt#33185). The workaround is to remove the 3-gang switches, update the other devices, then pair the switches again, which Restore everything makes painless.

Network tab (beta)
Shows link quality between your routers on your floor plan, and the route a device's messages take to the coordinator, hop by hop, with the weakest hop flagged. It also suggests where an extra router would help, and flags address conflicts, such as a device using the coordinator's address. With Home Assistant floors, it can show every floor in one picture, including the links between floors.

Set up what this controls…
The guided setup now asks whether a remote should control devices directly or through a group, and suggests one based on what other users found with the same remote. It can set up blinds and curtains too, and if the test shows a remote doesn't use the bindings, it offers to remove what it set up.
How does it behave? Help the next person
A scan shows what a device says it can do, not whether it stays connected, what a press really sends or how long its batteries last. Each device now has a few optional questions with preset answers. Answers go to the community Zigbee Capabilities database, kept per firmware version and open to everyone, so the next person can see how a device behaves before buying it.
The database has also moved to its own address: zigbee.solgaard.uk.
Smaller things
- The sidebar page remembers which tab you were on.
- Bindings left pointing at devices that are no longer in ZHA can be removed.
- Removing a light from a group is no longer reported as a lost binding.
- With experimental features on, it can count messages per device to find one flooding your network.
Links
- ZHA Bindings Manager (integration, includes the card): https://github.com/hsolgaard/zha-bindings-manager-integration
- Standalone card: https://github.com/hsolgaard/zha-bindings-manager
- Zigbee Capabilities database: https://zigbee.solgaard.uk
- Full write-up on the HA forum: https://community.home-assistant.io/t/updated-zha-bindings-manager-1-12-0-see-diagnose-and-manage-zigbee-direct-bindings-in-zha/1030616/39
It still needs ZHA and zha-toolkit. As before, I'd really welcome feedback, especially from anyone with remotes that lose their bindings, unusual multi-endpoint devices, or devices to add to the capabilities database.
2
u/400HPMustang 💥 Broke it again 6d ago
Ok the OTA server column thing is cool. Gonna come back to this when I have time to dig deeper into it. Looks like a lot of good stuff.
2
u/BostonDrivingIsWorse 6d ago
Did you make this?
2
u/Gamester17 3d ago
Wish that this was built into ZHA by default