Zigbee in Home Assistant
Zigbee is a wireless network for smart lights, plugs, sensors, and switches. It works without internet, uses little power, and lets devices relay each other (a mesh), so the range grows with each device you add. For Home Assistant you only need a Zigbee stick.
Choosing the stick
The stick (the coordinator) is the link between your Zigbee devices and Home Assistant. Choose a model that Home Assistant supports well, for example the Home Assistant Connect ZBT-1 (formerly SkyConnect) or a Sonoff Zigbee dongle. For a different stick, first check the list of supported coordinators in the documentation.
Tip: place the stick a bit away from the computer using a USB extension cable. A stick directly next to a USB 3 port, disk, or Raspberry Pi causes interference on 2.4 GHz and many stuttering devices.
ZHA or Zigbee2MQTT?
- ZHA (Zigbee Home Automation) is built into Home Assistant. It’s the simplest to start with: plug in the stick, add the integration, and pair devices.
- Zigbee2MQTT runs separately (for example as an add-on or container) and talks to Home Assistant via MQTT. It supports more devices and has more settings, but you manage an extra component.
Don’t use both at the same time on the same stick. Beginners usually choose ZHA.
Setting up with ZHA
- Plug in the stick. Home Assistant often already reports a discovered device.
- Go to Settings → Devices & Services and add Zigbee Home Automation.
- Select the stick and the serial port and choose Create a new network.
- Click on the integration and choose Add device. Put the device in pairing mode (for most lights and plugs you hold a button for about 5 seconds; for some lights you turn the power on and off a few times, see the guide). The device appears within a minute.
- Give the device a name and a room.
Choose your channel wisely
Zigbee uses the same 2.4 GHz band as wifi. A Zigbee channel that falls in the middle of a busy wifi channel performs poorly. Channels 15, 20, and 25 don’t overlap any of the wifi channels 1, 6, and 11, and are therefore a good choice. In our Wifi channel selector you can see the overlap. You can change a channel later, but some devices then need to be paired again, so it’s better to do it beforehand.
How to build a strong network
- Devices that run on mains power (lights, plugs) act as a router and relay the signal. Battery devices (sensors, buttons) are end devices and don’t do that.
- Make sure there are enough routers distributed throughout your home, and pair a new device in the location where it belongs or near the stick.
- Don’t just unplug a device if you’re routing many others through it; your mesh can then temporarily drop out.
- Make a backup of your Zigbee network (in ZHA under the integration settings), so you don’t have to pair everything again with a new stick.
What next?
Build automations: a light on when there’s motion, a plug off when you’re away, a notification when a door opens. Keep it simple and add something at a time. Want to make your own sensors that also appear in Home Assistant? Read our guide about ESPHome.
Sources and attribution
This article was written in our own words. Further reading:
- Zigbee Home Automation (ZHA) in the Home Assistant documentation;
- Zigbee2MQTT, with a list of supported devices and adapters.