The three roles
- Coordinator: the one device that forms the network and holds its keys. Your USB stick or Ethernet adapter.
- Routers: mains-powered devices that relay traffic for others (most plugs, in-wall dimmers and bulbs). Almost all AC-powered devices act as routers. The Zigbee2MQTT docs note an exception: most AC relays that do not use a neutral wire.
- End devices: mostly battery sensors and remotes. They sleep, talk only to their parent router or coordinator, and do not relay.
Choosing a coordinator
- ZHA (Home Assistant): the ZHA docs recommend official Home Assistant hardware (the Home Assistant Connect ZBT-2) if you do not have a coordinator yet. ZHA also supports many Silicon Labs EmberZNet, Texas Instruments and deCONZ-based radios via the zigpy libraries.
- Zigbee2MQTT: its adapter page groups hardware as Recommended (zStack/Texas Instruments, EmberZNet/Silicon Labs and deCONZ/Dresden Elektronik), Not recommended (ZiGate-based, marked not maintained), and Experimental (ZBOSS/Nordic). Make sure the adapter has the right coordinator firmware; some come preflashed.
- Only zStack and EmberZNet adapters currently support coordinator backups (coordinator_backup.json), per the Z2M docs. Take one before changing anything.
- Chip suffixes (for TI CC2652/CC1352): per the Z2M docs, "P" parts have a power amplifier (up to 20 dBm versus 5 dBm on R/RB parts). CC1352 versus CC2652 makes no difference for Zigbee, as the sub-1 GHz radio is not used. RB just means no crystal on the board.
- Prefer a USB or UART adapter. Wi-Fi-connected adapters can be unstable because the serial protocol cannot tolerate packet loss. If you need a network adapter, use wired Ethernet.
- Switching adapter models later can require re-pairing every device in some cases (see the Z2M FAQ), so choose with some care. Flashing newer firmware onto an existing adapter generally does not.
- Use a USB extension cable (50 cm is already enough, per Z2M, shielded if possible) so the stick is away from the computer's noise, and try a USB 2 port rather than USB 3.
- Wi-Fi and Zigbee share 2.4 GHz. Z2M's docs suggest using a ZLL channel (11, 15, 20 or 25) and choosing one away from your Wi-Fi channel. Changing channel on an existing network is supported on zStack and Ember adapters, but some devices will not follow and need re-pairing.
- Other 2.4 GHz sources the docs name: Bluetooth, wireless gaming peripherals, wireless audio transmitters and some smart meters. If you also run a Philips Hue bridge, put it on a different channel or move the bulbs to your own network.
- Don't just turn up the coordinator's transmit power. The docs warn it can produce a lopsided network where messages reach a battery device but its replies do not. Add routers instead.
- Hardware matters: Z2M notes a Raspberry Pi 3 running Home Assistant and Z2M together can perform badly.
- Let Zigbee2MQTT generate the pan_id, ext_pan_id and network_key on first start (set to GENERATE). Do not keep the example defaults.
- Changing network_key later means re-pairing every device. Keep a copy of your configuration, and consider keeping the key in a secrets file as the docs show.
- Pair devices where they will live where possible, and pair routers first so battery devices can attach to them.
- Be cautious with permit join: turn it off when not pairing.
The Z2M docs call out that some routers are mediocre (for example some versions of the SONOFF S26R2ZB plug are listed as limited). Cheap noname plugs can route badly. If you have routing trouble, add better routers and re-pair weak devices through them.
Links
Question for the group: what coordinator are you running (and with ZHA or Zigbee2MQTT), how many routers do you have for your house size, and did moving the stick on an extension cable make a difference for you?