When new smart home enthusiasts decide to try out Home Assistant, they often have a lot of unanswered questions or binary dilemmas. These new users are frequently migrating from proprietary smart home systems such as Google Home, Amazon Alexa, IFTTT or Apple’s Homekit. If you are one of those people, finding the right answer to your many questions in the Home Assistant community forums can prove troublesome, unfruitful or raise even more questions.
For ZigBee users, some of those questions are:
- How do I bridge my ZigBee devices with Home Assistant?
- What is the best ZigBee bridge or hub for Home Assistant?
- Do I need different hubs for different brands?
- Which Home Assistant Integration should I use?
This is a beginner friendly, yet full and comprehensive guide answering all the questions you could possibly have regarding ZigBee in Home Assistant.
If you’ve reached this article somehow, than you’ve probably already decided to give Home Assistant a try. If you haven’t installed it already, click here and follow the official installation tutorial. For complete beginners, I suggest going the Raspberry Pi + Home Assistant OS route.
To bridge your existing ZigBee devices with Home Assistant, you are going to need a couple of things:
- Home Assistant Instance Installed and Running
- Zigbee Coordinator
- USB 2.0 Extension Cable (Important)
- Zigbee Integration in Home Assistant
This section answers one the questions you might have about ZigBee in Home Assistant: Which hub you should use? Which is the best and universal Zigbee bridge to Home Assistant? And the answer? You don’t need any hubs.
If you already own any proprietary hubs or bridges (Hue Zigbee Hub, Aqara Hub etc.) stash them in a box somewhere as you will be moving all your devices under one single umbrella: Home Assistant with a Zigbee USB dongle and you wont be needing them.
In Home Assistant, Zigbee hubs are referred to as coordinators. Even though they are not the same piece of hardware, they carry out the same function . A coordinator is like the general manager of your ZigBee mesh network. It coordinates your devices when they try to talk to each other so they are always heard when they have something to say (eg. Turn on a light switch, report a temperature reading etc.)
You might wonder, what about my devices from different brands? Will my Phillips HUE motion sensors work with with my Aqara devices on the same coordinator? Although there are exceptions, the answer is YES, they will work without issues, cloud and app dependence or any other manufacturer specific requirement.
For a stable and solidified Zigbee network, you must acquire a good coordinator. We recommend the following as the best Zigbee coordinators for Home Assistant currently on the market:
The Conbee II is one the most used and known pieces of hardware among Home Assistant tinkerers. It’s setup, configuration and firmware updates have been well documented in the community. However, It’s older and has a weaker chip than newer devices. We are listing it here as the safe choice for simple and smaller ZigBee networks.
The Sonoff ZBDongle-P is newer than the Conbee and is based on the Texas Instruments CC2652P chip. The CC2652P is considerably more powerful, capable and compatible with ZHA and Zigbee2MQTT. It’s has been widely reported by the community for having excellent performance, stability and a large number of maximum devices on a single stick.
The Sonoff ZBDongle-E is the latest and greatest kid on the block. It’s based on the Silicon Labs EFR32MG21 chip which is Thread (Matter) capable. Although Matter is not fully released yet, the module supports it and will be rendered Matter compatible with a future firmware update. We suggest picking this USB dongle.
An important thing you would also need is an USB 2.0 extension cable [Amazon, AliExpress]. This is used to stick out your coordinator at least 1 meter from your Home Assistant server to avoid interference. Zigbee is notorious for succumbing to adjacent USB ports chatter, so using an extension cable ensures everything runs smoothly and without obstruction.
NOTE: Don’t skip over this requirement, use an old cable if you have one lying around otherwise you are bound to have problems.
This section answer the main question of this article, which is how to bridge my zigbee devices with Home Assistant? Well, once you have your Home assistant server running with a Zigbee dongle on a USB extension cable, you can pick your Zigbee Integration for Home Assistant. Essentially, you have three options:
- ZHA (Zigbee Home Automation)
ZHA and ZigBee2MQTT are compatible with a bunch of zigbee coordinators, including the top three currently on the market we listed above. Deconz on the other hand, is compatible only with one: the Conbee II stick.
ZHA Zigbee Home Automation
ZHA stands for ZigBee Home Automation and is the built in ZigBee integration in Home Assistant itself. Managing devices in ZHA is the same as managing devices in Home Assistant, it feels farmiliar, easy and native.
Installation and Setup ZHA
First, plug your new coordinator to a USB 2.0 port on an extension cable and restart Home Assistant. From the side menu navigate to Settings > Devices & Services:
- Your new stick should be automatically discovered
- Click Configure
- Click Submit
- Assign an Area if you want and click Finish
To add new devices to your Zigbee Network, click + Add Integration and select Add Zigbee Device. This will put the coordinator in permit mode and allow new devices to join your network. Put your device in pairing mode and it will be automatically discovered.
If you run into any problems, check out the official ZHA documentation for possible solutions.
Zigbee2MQTT is a nodejs Gateway application that connects Zigbee networks to MQTT networks. Z2M allows you to use your Zigbee devices without the vendor’s bridge or gateway. Its as standalone application developed to be used in any smart home infrastructure and not only Home Assistant.
Installation and Setup Zigbee2MQTT
Unlike ZHA, Zigbee2MQTT is not part of the official addon list in Home Assistant. We need to add custom repository to be able to install it. We also need an MQTT broker, which allows Zigbee to communicate through MQTT with Home Assistant. We will also create a user for MQTT in Home Assistant.
Add a new MQTT User in Home Assistant
- Navigate to Settings > People
- Click + Add Person at the bottom right
- Name it however you like
- Toggle Allow person to login
- Set a username and password to be used in Mosquitto broker
- Toggle Can only login from my local network
- Click Create
Installing Mosquitto MQTT Broker
- Navigate to Settings > Add-ons
- Click Add-on Store on the bottom right
- Select Mosquitto Broker from the list and install it
- Select the Watchdog and Start on Boot toggles and click Start
- Navigate to Settings > Devices & Services
- Click + Add Integration on the bottom right
- Search for MQTT and add it
- Click Finish
- Navigate to Settings > Add-ons
- Click Add-on Store on the bottom right
- Click on the three dots in the top right corner and select repositories
- Add the following repo: https://github.com/zigbee2mqtt/hassio-zigbee2mqtt
- Click Close
- Refresh the page and click Zigbe2MQTT
- Click Install
- Select the Watchdog, Start on Boot and Show in sidebar Toggles
- Don’t click start, and click the Configuration tab at the top
- In the MQTT field, put the following data:
- In the Serial field, put the following data
port (General): /dev/ttyACM0
port (By Id): /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2196238-if00
adapter: deconz (for Conbee), ezsp (for Sonoff ZBDongle-E)
- Go back go Info tab
- Click Start
You can find you particular serial id by navigating to: Settings > System > Hardware > Three dots > All system hardware. Search here for “tty” and you can copy your serial ID which starts with “/dev/serial/by-id…”
To add devices to your Zigbee network, click Zigbee2MQTT from the sidebar and click Permit Join (All) from the top. Put your device in pairing mode and it will be discovered and added in Z2M.
ZHA vs Zigbee2MQTT: Which one is for you?
This question has been asked many times in the Home Assistant community and unfortunately there is no definitive answer that would fit most users. Both integrations are very capable and well documented, support a variety of devices and are supported in Home Assistant. However, there are some differences between the two:
- Easier to Setup
- Natively Supported in HA
- Fewer Devices Supported than Z2M
- Slower Support for New Devices than Z2M
- Fewer device entities exposed to Home Assistant
- More suitable for beginners
- Hard to create custom quirks for unsupported devices
- Harder to Setup
- Can run independently from HA
- More Devices Supported than ZHA
- Faster Support For New Devices than ZHA
- Requires MQTT Broker
- Most device entities exposed to Home Assistant
- More suitable for advanced users
- Easy to create herdsman converters for unsupported devices
As you can see from this simple list, both Zigbee integrations have their pros and cons. ZHA is easier to setup and use, but a little limited in device support, especially for obscure and weird devices.
Zigbee2MQTT on the other hand, requires an MQTT Broker to setup which adds complexity, but can run independently from Home Assistant on a spare Raspberry Pi for example. New devices are added almost instantly in Zigbee2MQTT while ZHA usually follows close behind. We suggest following this simple guide:
- If you use weird and unbranded cheap Chinese devices, choose Zigbee2MQTT.
- If you use known brands and manufacturers, choose ZHA
- If you like to experiment and tinker, choose Zigbee2MQTT
- If you like to not be bothered with setup, choose ZHA
- If you like to run your Zigbee network independently from Home Assistant, choose Zigbee2MQTT
Please remember: These bullet points are only suggestions to try and ease your decision, not factual guidelines that you should abide by. There is absolutely no reason why an advanced user should not install ZHA instead of Zigbee2MQTT. At the beginning of things, ZHA crawled behind Zigbee2MQTT by a large margin. Now, things are more or less equal.
Hopefully by reading this article things have become clearer for bridging the Zigbee and Home Assistant gap. With Thread and Matter around the corner, we are looking at all an new generation of devices and products being released in the near future.
People often wonder whether Thread will replace Zigbee and make it obsolete: It probably will, but your existing Zigbee devices can continue to operate for as long as you want them too. Matter is meant to streamline the “all devices under one umbrella” process and make things easier.
SmartHomeScene.com is a participant in the Amazon Services LLC Associates Program & AliExpress Portals Affiliate Program.
We may earn a small commission on qualifying purchases from these websites, which incurs no additional cost to you.
SmartHomeScene © 2023 All rights reserved