Zigbee2MQTT vs ZHA: Battle of the Zigbee hub replacements

Disclosure: This post contains affiliate links. If you click through and make a purchase, I will earn a commission, at no additional cost to you. Read my full disclosure here.

In this article, I will be comparing two of the most popular open-source Zigbee gateways: Zigbee2MQTT and ZHA (Zigbee Home Automation). Just like Home Assistant, ZHA uses an open-source Python library, while Zigbee2MQTT is written in JavaScript/TypeScript. Both applications are used for the same purpose, but their setup and integration with Home Assistant differ greatly.

Zigbee2MQTT has been the long-standing choice for those wanting to replace their Zigbee hubs with a central and self-hosted application. I gave up my Philips Hue Hub and made the switch after I had bought a couple of IKEA bulbs and wanted to use cheap motion sensors from China without having to buy two additional Zigbee hubs.

A lightbulb that is controlled by Zigbee2MQTT and ZHA
Zigbee2MQTT and ZHA can be used to control lights
A power switch for Zigbee2MQTT and ZHA
Switches are popular battery-powered Zigbee devices
An LED strip which can connect to Zigbee2MQTT and ZHA
Everyone likes RGB LED strips, right? Zigbee2MQTT and ZHA support them

Zigbee2MQTT wasn't the easiest thing to get set up, and it did take me some time. To get the application connected to Home Assistant, I needed to also set up an MQTT server and flash the Zigbee adapter I bought from China.

In contrast to Zigbee2MQTT, ZHA (Zigbee Home Automation) is a part of Home Assistant. You won’t need to install any additional applications (not even an add-on) and everything is configured via the Home Assistant dashboard. All of this makes ZHA much easier to get started with. But the ease of use shouldn’t be the only factor when deciding whether to go with Zigbee2MQTT or ZHA.

Zigbee2MQTT vs ZHA: Device support

Services like Zigbee2MQTT and ZHA live and die by the number of Zigbee devices they fully support. If the device you’re trying to integrate with Home Assistant isn’t supported by either ZHA or Zigbee2MQTT, the choice between the two will have already been made for you. Before making your final decision and buying the appropriate hub or USB dongle, I'd suggest that you also take a look at the issues of each project on GitHub. You'll often find that newer devices are already being worked on but aren't yet included in the stable release.

Zigbee2MQTT and ZHA both support smart bulbs

Currently, Zigbee2MQTT supports a broader range of devices than ZHA, as can be seen on this website. While ZHA supports fewer obscure Zigbee devices it does cover the basics. Just about all the popular lights, motion sensors, and buttons from vendors such as Philips, IKEA, and Xiaomi are supported. There are also a few devices to be found that are only supported by ZHA and not Zigbee2MQTT. Despite that, Zigbee2MQTT is the overall winner of this round.

Winner: Zigbee2MQTT

Zigbee2MQTT vs ZHA: Ease of use

This is an easy one that should surprise nobody. Especially those that have ever used Zigbee2MQTT. As already mentioned, ZHA is set up using the Home Assistant dashboard and not a line of code has to be added. Depending on whether you are running Home Assistant or Home Assistant Core, you will either have to set up an additional Docker container or install an add-on to get Zigbee2MQTT up and running.

The integration of Zigbee2MQTT with Home Assistant also isn’t as straight-forward as that of ZHA, as it has to be done using MQTT. Although I am technically minded, I did struggle a bit to get things in working order.

Winner: ZHA

Zigbee2MQTT vs ZHA: Adapters

You will need a Zigbee-compatible adapter for your setup. The Zigbee protocol isn’t the same as Wi-Fi or Bluetooth. ZHA supports both the ConBee and RaspBee adapters from dresden elektronik. There is also support for other easy-to-use adapters such as the ITEAD Sonoff ZBBridge and Digi XBee.

The easiest way of getting started with Zigbee2MQTT is by using the Texas Instruments CC2531. To flash the CC2531, you will also need a CC debugger and CC2531 downloader cable . As you might be able to tell, it isn’t quite as beginner-friendly as ZHA. The CC2531 is very much a tinkerer’s device and doesn’t even come with a case, just the bare PCB attached to a USB plug.

But the CC2531 isn’t the only option when using Zigbee2MQTT. There is now also support for the Electrolama zig-a-zig-ah! (zzh!) and slaesh’s CC2652RB stick, both of which come in a case and have an external antenna for an increased range. There is also experimental support for the ConBee II.

Winner: Tie

Zigbee2MQTT vs ZHA: Stability

Being separate from Home Assistant is both a disadvantage, but also an advantage of Zigbee2MQTT. When using ZHA the Zigbee network is taken down every time you reboot Home Assistant, which can happen quite frequently when testing things. By being separate from Home Assistant, Zigbee2MQTT isn’t affected in any way by reboots. That is when you’re not running Zigbee2MQTT as a Home Assistant add-on.

For that reason, and that reason alone, I’m going to give this category to Zigbee2MQTTT. Obviously, if you don’t restart Home Assistant very often, this won’t matter to you. But if you do want your Zigbee network to have as little downtime as possible, running Zigbee2MQTT in a separate container is the way to go.

Winner: ZIGBEE2MQTT

Zigbee2MQTT vs ZHA: Zigbee Groups

In a recent article, I told you why you should be using Zigbee Groups for your setup. If you’re interested in what Zigbee Groups are and how to get them set up, you can read that article as I won’t go over the details here. Zigbee Groups are important when you’re trying to reduce flooding, which can lead to delays when sending commands to endpoints. You should definitely start using Zigbee Groups as early as possible. Luckily, both Zigbee2MQTT and ZHA support Zigbee Groups.

Winner: Tie

Zigbee2MQTT vs ZHA: OTA firmware updates

Believe it or not, even devices as simple as bulbs and buttons receive firmware updates. I must admit that I’ve never noticed anything different when comparing a bulb before and after an OTA firmware update, so I can’t really vouch for the importance of OTA firmware updates. However, the release notes for Philips Hue bulbs do inform me that there are improvements to deep dimming and device security added in newer versions.

Both Zigbee2MQTT and ZHA support over-the-air (OTA) firmware updates, though ZHA currently only supports IKEA and LEDVANCE. Zigbee2MQTT on the other supports IKEA, Philips Hue, Osram/LEDVANCE, Sengled and more. Because Zigbee2MQTT supports the devices ZHA does and more, I’m crowning it the winner of this category.

Winner: ZIGBEE2MQTT

Summary

As you can see, the decision on whether to go with Zigbee2MQTT or ZHA isn’t an easy one. And in all honesty, I can’t tell you which option will better suit you and your setup. I personally use Zigbee2MQTT and can definitely recommend it. But if you don’t fancy the more complicated installation you might be more inclined to go with ZHA.

The goal of this comparison wasn’t to tell you which application you should definitely go with. There is no clear winner and both ZHA and Zigbee2MQTT have their advantages and disadvantages. But I do hope that it has helped you come to a decision on your own.

As you’re reading this comparison I’m going to assume that you haven’t set up your Zigbee hub replacement yet and are still thinking about it. If you do go through with the project make sure you choose your Zigbee channel before you start connecting your bulbs, switches, and sensor. I have a full article on the importance of choosing the right Zigbee channel.

Zigbee products I recommend

I personally use and love many Zigbee products. Below you will some affiliate links (using them will help me get rid of ads) to the devices I recommend. All of them are integrated into my Zigbee network using Zigbee2MQTT.

A portrait photo oif Liam Alexander Colman, the author, creator, and owner of Home Assistant Guide wearing a suit.

About Liam Alexander Colman

is an experienced Home Assistant user who has been utilizing the platform for a variety of projects over an extended period. His journey began with a Raspberry Pi, which quickly grew to three Raspberry Pis and eventually a full-fledged server. Liam's current operating system of choice is Unraid, with Home Assistant comfortably running in a Docker container.
With a deep understanding of the intricacies of Home Assistant, Liam has an impressive setup, consisting of various Zigbee devices, and seamless integrations with existing products such as his Android TV box. For those interested in learning more about Liam's experience with Home Assistant, he shares his insights on how he first started using the platform and his subsequent journey.

Leave a comment

Share to...