Installing and configuring Zigbee2MQTT in Home Assistant is one of the best combinations to have a smart home with infinite compatibility of Zigbee devices on the market and advanced functions to have great flexibility when it comes to customising our installation.
How to install Zigbee2MQTT in Home Assistant
As you can see on the official Zigbee2MQTT website, we have multiple compatible Zigbee devices and in addition, each device has different functions and parameters that Zigbee2MQTT can manage.
It is very interesting because you can mix different brands of devices such as Sonoff, Aqara, NodOn, Schneider Electric and much more and have everything from one interface and in this case it is Home Assistant.
We have seen in other content how to install the official Home Assistant hub.
Now, let’s install Zigbee2MQTT in Home Assistant.
The first thing we need to do to enjoy Zigbee2Mqtt in Home Assistant is to install an MQTT broker and for this, we go to “Settings”, “Add-ons”.
Search for “Mosquitto”, and click on “Install”.
We have the possibility to activate the “Watch” feature, which allows us to restart the add-on if it crashes at some point.
Now, we go to our profile and activate the advanced mode.
We go back to “Settings”, “People”, “Users”, and we are going to create a new user which in my example I am going to call MQTT and we must indicate a password.
We can click on “Create”.
Go to “Settings”, “Add-ons”, “Mosquitto Broker” and click on “Start”.
We can follow the logs, and after a few seconds, we see that it has started correctly.
Now go to “Settings”, “Devices and services”.
And click on “Add integration”.
We search for “MQTT”.
And we are going to indicate the IP address of the broker 127.0.0.1 and put our user name and password that we have previously created. Click on “Send” and that’s it.
Now we are going to be able to install Zigbee2MQTT in Home Assistant.
For this, we search for “Zigbee2MQTT installation” and in the Zigbee2MQTT Github we have the instructions on how to install with Home Assistant by copying the web address of the repository where Zigbee2MQTT is located.
In Home Assistant, from the add-on shop under “Settings” and “Add-ons”, go to the top right and click on the “Repositories” option.
Paste the link that we have previously copied and click on “Add”.
We now have Zigbee2MQTT visible in the add-on shop.
So let’s install it and we can activate the “Watch” so that it restarts automatically if it crashes.
Now go to “Settings”, “System”.
Let’s go to “Hardware”.
Go to “All Hardware”.
And we find the TTYUSB0 port where our Skyconnect dongle is connected, so we copy its ID.
Go to “Settings”, “Add-ons”.
We access in “Zigbee2MQTT”.
Now in “Configuration” and in “MQTT”, let’s put: “base_topic: zigbee2mqtt”.
For “Serial”, we are going to identify our Zigbee dongle, which in our case is the Skyconnect dongle from the same company Home Assistant, so we put “port:” and paste the information we have previously copied.
Now, we type “adapter:” and we are going to identify the type of adapter corresponding to our Zigbee dongle so we look for this information on the Zigbee2MQTT page and in the case of the Skyconnect dongle, it is EZSP.
The use of EZSP is currently obsolete with the new versions of Zigbee2MQTT (since version 2.0), so you can try setting EMBER (instead of EZSP), and if it doesn’t work, it’s probably because you also need to update the firmware of your Zigbee dongle.
Copy and paste this information. Click on “Save”.
Now, go back to “Information” and click on “Start”.
We can go to “Registration” to follow the configuration and after a few seconds, we get the information “Zigbee2MQTT started!
We can hit “Start boot” and open the Zigbee2MQTT web interface in Home Assistant and now, we will be able to add our Zigbee devices to our home automation hub.
Linking devices with Zigbee2MQTT in Home Assistant
To do this, we click on “Allow to join” and we have a countdown to add all our Zigbee devices.
In my example, I will include Zigbee plugs from Nous, a presence sensor from Sonoff and a motion sensor and a temperature and humidity sensor from Aqara.
They are different brands and of course, the great interest of this solution is that you can put them all together with a single interface and I invite you to browse the Zigbee2MQTT compatibility page to see all the integrated devices and discover some that can be of great use in your home to manage blinds, heating, lights, irrigation, air conditioning and much more.
By default, some devices will automatically connect to your Zigbee network when you connect them to the power supply, as they go into inclusion mode at this point.
This is the case for the Nous A1Z Zigbee sockets.
The same applies to battery powered devices, when you put this battery in, they will automatically connect to your Zigbee network.
If this is not the case, you should check the documentation of each device to find out how to include it, and it is usually by pressing the physical button on the device for a few seconds until an LED flashes.
That’s it, you can deactivate the inclusion mode when you already have your devices linked and now, you have the information measured by your Zigbee sensors and you can control your devices as Zigbee sockets from the Home Assistant interface.
In the Zigbee2MQTT interface, you have all these options, but you can also customise the parameters of each device, such as configuring the status of a socket after a power cut, activating or deactivating its LED indicator, activating or deactivating child protection.
You can adjust the sensitivity of a presence sensor, change the time of change of state between “presence” and “no presence”.
You can calibrate the temperature and humidity of a sensor.
In short, thanks to Zigbee2MQTT in Home Assistant, you are going to have an advanced smart home experience with the freedom to use your favourite devices on the market and with their different settings.
So it is a very interesting solution.