In this video I’m going to compare two different methods
for using Zigbee directly with Home Assistant.
I’ll be comparing Zigbee Home Assistant, also known as ZHA,
with Zigbee2MQTT and I’ll give you my reasoning for why I think
ZHA is the better choice if you’re starting fresh with Home Assistant and Zigbee.
So why do we need ZHA and Zigbee, and what does it do for us?
Well normally you need to buy a different smart hub for almost every
different smart home vendor that you use in your home.
I use these Philip Hue lights, Sonoff Door Sensors and Aqara Motion Sensors
in my house and if I wasn’t using Home Assistant I’d need to buy three
different smart hubs and control them using three different companies apps
Instead, I prefer to plug one of these $30 USB Zigbee dongles into the computer
running Home Assistant, in this case a Raspberry Pi, and I can now use all
these devices without buying any extra hubs or signing up to any new cloud services.
But before you can pair your Zigbee devices with Home Assistant you’ll need
something in the middle to bridge the gap, and that is where ZHA and Zigbee2mqtt come in.
I have personally used both of these integrations.
I use Zigbee2mqtt for the Home Assistant that controls this actual house that I live
in and I use ZHA for my test Home Assistant, which I use for demoing things on this channel.
This video is based on my experiences and use cases and I’ll be evaluating
the two integrations through four different categories.
Zigbee Device Compatibility Functionality
Performance and Stability Ease of Use
The first area I will focus on is compatibility with Zigbee devices - does
ZHA or Zigbee2MQTT work with more Zigbee devices that exist in the market today?
Thankfully a guy called Blakadder maintains a list of Zigbee devices and which platforms
they work with. You can see on this list a blue Home Assistant icon for when a device
is supported by ZHA and the yellow Zigbee2MQTT for when a device is supported by that platform.
As we scroll down the list we can clearly see more yellow icons than blue icons.
In fact counted them all, and at the time of recording there
were three times as many devices supported by Zigbee2MQTT than ZHA.
I personally have also noticed that some individual devices
have more features and functionality when used with Zigbee2MQTT rather than ZHA.
For example, this Aqara Magic Cube, which I’ve previously made a video about, behaves differently
depending on which platform you’re using. With ZHA you can trigger automations based on which
side of the cube is facing up, taps and double taps, shake and drop. But it doesn’t support
triggering different automations when you twist the cube depending on what side is facing up.
However, Zigbee2MQTT does support this. This means I can twist the cube left and right with
this Light Bulb side showing up and it will dim and brighten the lights in my office. If I put
the speaker side to the top and twist the cube it lowers and raises the volume of my Google speaker.
This type of multi-twist functionality doesn’t work with ZHA and I’m sure
there are other Zigbee devices that work differently on each platform.
For these reasons, I declare Zigbee2MQTT the winner of this first “Compatibility” category.
The second category is Functionality - does ZHA
or Zigbee2MQTT support more functionality as a platform?
Both of them offer tons of features,
but I’ll focus on the parts that I think are most useful to the majority of Zigbee users.
Firstly, they both support Zigbee groups.
Zigbee groups are really useful and it’s important to note that
these are different from Home Assistant groups.
Imagine you’ve got three Zigbee light bulbs in a light fitting.
If you add these to a Home Assistant group called “Living room lights”,
and then turn it on via Home Assistant, it will send three different On signals over the Zigbee
network - one to each light - because they are addressed as three different Zigbee devices.
Now if you create a Zigbee Living Room Light group,
and ask Home Assistant to turn the group on, it will only send one zigbee On signal.
This decreases the congestion on your zigbee network, keeping the network clear for other
signals to get through. It also makes it more likely that all three lights
will turn on simultaneously rather than a fraction of a second after each other.
Either way - both ZHA and Zigbee2MQTT both
support Zigbee Groups, so they both get a point for that one.
Both platforms also support modifying the device type if it was incorrectly detected.
I once paired a generic Zigbee lightbulb and for some reason
it appeared in Home Assistant as a Switch entity instead of a Light.
I used this feature to change the detected device type and make it work properly.
Both platforms also support the ability to change the wireless channel that the
Zigbee network is using, which is useful for improving your Zigbee network performance if
other Wifi or Zigbee networks in your area are all using the same channel.
So far, this category is a tie, as both platforms support a wide range of Zigbee functionality.
The final piece of functionality is also supported by both platforms, and that is
Over The Air Updates of your Zigbee Devices. Over The Air Updates allow you to wirelessly update the
software that is actually running on your smart devices - just like doing security updates on
your phone or computer. Applying software updates will likely increase the security, performance
and stability of your smart devices so it’s important to do when new updates become available.
At the time of filming, ZHA only supports Over the Air Updates for Ikea Tradfri
and Ledvance Zigbee Devices, whereas Zigbee2MQTT allows you to update Ikea,
Ledvance, Philips Hue, some Xiaomi Devices and several others as well.
A lot of people, including me, use Philips Hue devices so for this reason I am going to declare
Zigbee2MQTT the winner of this category as well…. But not by much!
The third category is Performance and Stability. How well do ZHA
and Zigbee2MQTT work? Do they ever break?
I have over 60 devices connected to my main Zigbee2MQTT and I have
only twice had problems with it since setting it up a year ago.
One of those times was after I had a power failure. I had to re-pair three of my 60
devices because they lost connection with Home Assistant. Another time I had to unplug
and re-plug in my USB stick because my sensors stopped working and the lights stopped coming on.
I have about 10 devices running on ZHA for my other Home Assistant setup, and I’ve only once
had to re-pair a device after I forgot about it and the battery went flat. Other friends of mine
use ZHA exclusively on much larger Zigbee networks and they have had only minor mishaps as well.
Both systems react instantly when I ask the lights to be turned on,
so the performance is great as far as I am concerned.
I am going to declare both of these platforms awesome in this category, so it’s a tie.
The final category is Ease of Use. I’ve broken that into two areas - how easy is it to set up,
and how easy is it to use on a day to day basis.
ZHA is the easiest to install. Once you’ve plugged your USB stick in,
you just need to go to Configuration, Integration and Add New Integrations.
From here you can search for ZHA and click Install. If you have a supported USB stick,
you can now also just plug it in to the device that Home Assistant is installed on and it
will auto detect that you’ve connected a Zigbee coordinator and it will prompt you to install ZHA.
Installing Zigbee2MQTT is a little more complicated.
If you’re using Home Assistant OS, and you see the Supervisor item in
your left hand navigation menu, then you can install it as an unofficial Add On.
You also need to install something called an MQTT broker, which sits
between Zigbee2MQTT and Home Assistant…. *That’s why they call it Zigbee2MQTT*
It’s a bit of a faff to be honest.
Once they are installed though, they are both really easy to use.
Pairing new devices in both ZHA and Zigbee2MQTT is really straightforward - just click the
Permit Join or Add Device button and click the pairing button on whatever device you have.
I am going to have to crown ZHA to be the winner of this
category because it’s just so much easier to set up than Zigbee2MQTT.
In fact, this is the main reason why I recommend ZHA to everyone who wants
to get started with Zigbee and Home Assistant. Once you have a Zigbee USB
dongle and some Zigbee smart devices, you can be up and running in minutes.
You can see that there really isn’t that much difference between the two platforms these days.
Back in the day, ZHA wasn’t as good as it is now and Zigbee2MQTT used to be the
clear choice in terms of functionality and compatibility. The Home Assistant
developers have since put a ton of work into ZHA and it has become an amazing integration.
The only reason I would recommend Zigbee2MQTT is if you find yourself
with a bunch of Zigbee devices that are incompatible with ZHA
or are already familiar with and using MQTT in Home Assistant for other reasons.
If you’re already using either ZHA or Zigbee2MQTT
I would find it difficult to recommend that you switch to the other platform
unless you have a really big reason. As the old saying goes - if it ain’t broke then don’t fix it.
Switching between the two platforms will mean you need to re-pair
and re-setup all your Zigbee devices, all your automations and dashboards as
well. For me this would take days and be a major inconvenience as everything smart in
my house would stop working - so I am not going to be doing it any time soon.
No matter which platform you choose, directly connecting your Zigbee devices
to Home Assistant allows you to unlock really powerful home automations. You can
see some examples of these Zigbee Home Automations here and here.
If this video has made you want to ditch your Zigbee hubs
pair devices directly with ZHA I have a video showing you exactly how to do that here.
I also have a video that shows you how to install Zigbee2MQTT here
If you thought this video was useful, please give it a thumbs up and subscribe
to the channel if you want to see more. Then together, we can make your home smarter!