Zigbee project: health-check your mesh, then bind remotes, build groups and do OTA updates safely

Discuss the Implementation and Development of Zigbee Devices
Post Reply
User avatar
ZerOne
Site Admin
Posts: 292
Joined: Sun Dec 13, 2020 8:21 am

A practical follow-up project for a Zigbee2MQTT network that already works but is flaky, slow or fragile. Based on the Zigbee2MQTT docs as at October 2026. I have not run every step on a live system for this post, so try it on a quiet evening and expect to adjust. Home Assistant plus Z2M basics are covered in the Home Assistant forum; this goes beyond that. ZHA users get similar features through the ZHA configuration UI.

Part 1: health check
  • Look at the Z2M frontend for devices with poor link quality or that keep going unavailable. Turn on availability if you have not (it is in the docs under Device Availability).
  • Request a network map from the frontend map tab, or by publishing an MQTT request to zigbee2mqtt/bridge/request/networkmap (see the docs for the payload). Scans generate traffic, so run one when the house is quiet.
  • Look for battery devices attached to a far router or straight to the coordinator through a weak path. Add a mains router midway.
  • Check the basics: USB extension cable, USB 2 port, Wi-Fi channel versus Zigbee channel, and noisy 2.4 GHz neighbours (see the buying guide in this forum).
  • Check your host: a busy Pi 3 can cause trouble.
Part 2: bind a remote to a light

Zigbee binding lets a device control another directly without Z2M or Home Assistant. The docs give the example of an IKEA TRADFRI dimmer bound to a bulb. Benefits: smoother dimming, and it keeps working when Z2M, your broker or the coordinator is down. That is a real reliability win for a bedside switch.

Easiest is the frontend: click the device, Bind tab. Via MQTT, publish to zigbee2mqtt/bridge/request/device/bind:

Code: Select all

{"from": "my_remote", "to": "my_bulb"}
Notes from the docs:
  • By default all supported clusters are bound. Restrict with "clusters", e.g. ["genOnOff"] (others include genLevelCtrl, genScenes, lightingColorCtrl, closuresWindowCovering).
  • If binding a battery device fails, it is usually asleep. Press a button right before sending.
  • When the target is a group, you must use the group's friendly name; the ID will not work.
  • Not every device supports binding. Check the device's page on the supported devices list.
  • Z2M sets up reporting on the target so state updates still reach Home Assistant.
  • Use the clear-bindings request (bridge/request/device/binds/clear) if things get tangled.
Part 3: groups for fewer messages

Z2M groups let one command control several devices at once. The docs say this reduces network stress compared with commanding devices one by one, which also makes lights change together instead of rippling. Create them in the frontend, or in configuration.yaml:

Code: Select all

groups:
    '1':
        friendly_name: lounge_lights
        transition: 2
Group IDs must be unique numerical strings. Add members from the frontend or with a request to zigbee2mqtt/bridge/request/group/members/add using {"group":"lounge_lights","device":"bulb_1"}. A remote bound to the group then controls everything with no Z2M in the loop. Two cautions from the docs: groups are not supported by every device, and broadcasts are limited to roughly one per second on average, so do not hammer a big group in fast loops.

Part 4: OTA firmware updates

OTA is built into Z2M, which by default fetches images from the community Koenkk/zigbee-OTA repository (a mirror of manufacturer updates). The docs' warnings are worth taking seriously:
  • Read the release notes first. Updates can change behaviour and affect compatibility.
  • Battery devices should have a decent charge (the docs suggest 70% or more); OTA is power hungry.
  • The device reboots afterwards, which can trigger power-on behaviour such as a light switching on in the middle of the night.
  • Update one device at a time and wait for it to finish. Do not interrupt power.
  • Check status in the frontend OTA tab, or request a manual check at zigbee2mqtt/bridge/request/device/ota_update/check with {"id":"my_remote"}, then start with bridge/request/device/ota_update/update. Wake sleeping devices first.
  • To reduce chatter you can set ota: update_check_interval or disable_automatic_update_check: true in configuration.yaml.
Take a coordinator backup and keep a copy of configuration.yaml before any big change.

Links
Question for the group: which of your Zigbee remotes and switches do you have bound directly to lights, and have you had any bad (or good) experiences with OTA updates on particular brands?
Post Reply

Return to “Zigbee Wireless Technology”