Setting up Home Assistant on Raspberry Pi to Control Zigbee IoT Devices
In this article, we will introduce how to set up Home Assistant OS on a Raspberry Pi 3 B+ and configure Zigbee2MQTT to connect and control the Zigbee based IoT devices. The entire process takes around 1 hour to finish.
This is fairly simple and straight forward, thanks to the nice support provided by the Raspberry Pi Imager.
Hardware Platform
An pretty old Raspberry Pi 3 B+ is used.
Some people reported that the Zigbee dongle does not work well with USB3.0 ports due to interference, so maybe using 3 B+ with all USB 2.0 ports is a good option?
Setting up Pi
Follow this tutorial on flashing the firmware
After opening homeassistant.local:8123, it takes some time to set everything up
Setting up Home Assistant
Follow the prompt on the webpage to set up admin account, home location, and data sharing settings.
Setting up MQTT Integration
In Settings -> integrations, add MQTT integration
Select MQTT
We will use the provided mosquitto broker to connect the MQTT to Home Assistant service.
It takes a while to install the integration service. After installation, it will automatically start the service.
Setting up Zigbee2MQTT
Install the addon following this tutorial
Click Add
After adding, refresh the page, and it should appear in the Add-on Store list under section "Home Assistant Add-on: Zigbee2MQTT"
Click into the panel, and click Install.
After installation, start the service.
In this case, it fails to find the Zigbee dongle.
Then we need to manually tell it.
The dongle path can be seen at Settings -> System -> Hardware -> All Hardware
Put this information in the configuration, save and restart the addon.
Now it should be started correctly
Adding Zigbee Devices
In the Addon panel, click the "Open WebUI" button.
Click the "Permit Join (All)" to allow pairing with devices.
Now enable pairing mode on the IoT devices, it should then be paired to the service fairly quickly.
I observed that the pairing time is much faster than when using ZHA.
Configuring Apple HomeKit
Last updated