Build Your Own Zigbee Hub with Zigbee2MQTT
Use cheap Zigbee sensors and bulbs from any brand without their proprietary hubs or cloud accounts.
Zigbee devices are low-power, reliable and inexpensive. A USB coordinator dongle plus Zigbee2MQTT (or Home Assistant's built-in ZHA) lets one Pi control thousands of supported devices locally.
Mission steps
Plug in the coordinator
Use a short USB extension cable to keep the dongle away from the Pi's USB 3 ports and Wi-Fi noise.
Pick the software
In Home Assistant, use ZHA for simplicity or the Zigbee2MQTT add-on for the widest device support.
Set up MQTT
Zigbee2MQTT needs an MQTT broker — the Mosquitto add-on in Home Assistant works out of the box.
Pair devices
Enable 'permit join' and put each device in pairing mode, usually by holding its button.
Build the mesh
Mains-powered devices like plugs and bulbs act as routers and extend range for battery sensors.
Questions
Zigbee or Wi-Fi devices?
Zigbee sensors run for years on a coin cell and do not crowd your Wi-Fi. Wi-Fi devices are easier to start with but drain batteries fast.