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.
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"}- 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.
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: 2Part 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.
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?