After seeing seen yesterday how to install Zigbee2MQTT on Home Assistant simply, we will continue to improve our home automation installation by adding the Z-Wave protocol. Indeed, if the ZigBee tends little by little to impose itself in our connected houses, the king home automation protocol always remains the very effective Z-Wave which we will integrate very simply on Home Assistant with ZwaveJS2MQTT.
Summary
Use the Z-Wave protocol with Home Assistant
Like the ZigBee, Home Assistant is gradually becoming the benchmark for open source home automation systems. With a dynamic team and a particularly active global community, Home Assistant OS supports almost all protocols on the market and in particular the Z-Wave.
What is Z-Wave?
Created in 1999 by the Danish company Zensys and acquired in 2018 by Silicon Labs, the Z-Wave is a wireless communication protocol allowing devices to be connected to a mesh local network.
This protocol has several advantages:
- excellent range : the Z-Wave protocol uses the 868 MHz band and operates in a mesh network. As you know, the lower the frequency, the greater the range. It is inversely proportional. This range is also extended thanks to a mesh network capable of supporting a large number of devices. We often read that it is limited to 232 devices, but it can theoretically count 28 i.e. 256.
- reduced susceptibility to interference : this is the second advantage of the 868 MHz band which is much less busy than the 2.4 GHz of Wi-Fi / ZigBee / Bluetooth…
- low latency : with messages of only a few bytes, the Z-Wave protocol is particularly fast despite its transmission speed of 100 kbit/s maximum.
- low consumption : thanks to very light messages and controlled energy management, the Z-Wave consumes almost nothing. Thus, small sensors can last 3 to 5 years with a single battery. Some switches are even wireless and able to rely on the kinetic energy generated during use.
- increased security : Z-Wave S2 uses an asymmetric key exchange which involves a public key and a private key. Any command can be encrypted using the public key, but only the private key can unlock it. Thanks to this method, deciphering a key is practically impossible, which is also the reason why connected alarms such as Ring Alarm V2 use this protocol.
- Matter compatibility to come : like ZigBee, Z-Wave will soon be compatible with Matter and therefore with a large number of connected objects. In the meantime, we will also see how it can work with MQTT…
Prerequisites
You won't be surprised to learn that you obviously have to have a installing Home Assistant on Raspberry Pi, Odroid, NUC or NAS. As far as we are concerned, we will use a virtual machine Home Assistant on NAS Synology.
From a hardware point of view, you will obviously need a Z-Wave dongle. We used a Aeotec Z-Stick gen5 (ZW090) renowned for its effectiveness, but you can choose another of course.
Here are some Home Assistant compatible models from our partner Domadoo:
Which you will obviously also find at Amazon :
We will install Z-Wave JS to MQTT because we are already using a Mosquitto MQTT broker et Zigbee2MQTT on Home Assistant. You will need it for what will follow and we invite you to consult the tutorials below if necessary.
Note that however, you can choose not to use MQTT and be satisfied with the integration Z-Wave JS which will be offered to you as soon as you have connected your dongle, in which case you can go directly in point 19 of our tutorial.
Install Z-Wave JS to MQTT on Home Assistant
The first thing to do is obviously to connect your dongle to a USB port on your home automation box. Home Assistant. As far as we are concerned, we will be using the Aeotc Z-Stick Gen5 controller on a USB hub plugged into our Synology DS920+ NAS.
- Home Assistant installation tutorial on Raspberry Pi
- Home Assistant Installation Tutorial on Synology NAS
We will now proceed to theinstalling Z-Wave JS to MQTT in order to send the information to our broker Mosquitto MQTT. The procedure may seem a bit long because we guide you click by click, but rest assured, there is absolutely nothing complicated.
-
Open Home Assistant (http://homeassistant.local:8123/);
-
Go to the Supervisor ou Parameters ;
-
Click on Modules complémentaires and access the Add-ons store via the button located at the bottom right;
-
Search for " Z-Wave » And click Z-Wave JS to MQTT ;
Z-Wave Add-ons on Home Assistant – © Les Alexiens - Click on Installer and wait 2-3 minutes for the installation to complete;
-
Done " To start up ", wait a few seconds, then press the " Open web UI »;
- Go to Menu > Settings (the toothed wheel) and dexpand the tab Z-Wave ;
-
Dance Serial Port, select / dev / ttyACM0 ;
- Below you find 4 fields with keys, click on the buttonsactualization to generate random security keys for S0 Legacy, S2 Authenticated, S2 Unauthenticated and S2 Access control;
-
Click on Save at the bottom right ;
-
Go to the icon"4 squares" located at the very top and check if the driver started correctly.
Our Aeotec Z-Stick Gen5 dongle on Home Assistant – © Les Alexiens -
Go back to Modules complémentaires ;
-
Click on Z-Wave JS to MQTT ;
-
Consult the Documentation the second tab;
-
Look for an address like this: ws://a0d7b954-zwavejs2mqtt:3000 " and copy it. Attention, this address is only valid for the dongle Aeotec Z-Stick Gen5 ;
Copy the dongle address – © Les Alexiens -
Go to Settings or Supervisor > Devices and Services ;
-
Then on the button + Add integration located at the bottom right;
-
Search Z-Wave JS ou click here (direct access link) and do configurator ;
-
uncheck “Use Z-Wave JS Supervisor Add-on” and click Submit ;
- Paste the Z-Wave server address copied above: ws://a0d7b954-zwavejs2mqtt:300 and cconfirm by clicking on Submit ;
Z-Wave JS configuration on Home Assistant – © Les Alexiens -
Assign your Z-Wave dongle to the zone of your choice and click finish.
Pairing a Z-Wave device on Home Assistant
To pair a device, nothing could be simpler, just go to:
Supervisor or Settings > Devices and Services > Z-Wave JS > + Add Device
Within seconds, your device is paired and found in Home Assistant. Here we have chosen the new Zooz ZSE40-700 4-in-1 sensor and we find all its entities: movement, luminosity, temperature and humidity.
Returning to the Z-Wave interface on JS, we find all our devices:
And as on Zigbee2MQTT, we find a graph of our network:
Finally, everything is present on our MQTT broker!
Reply
Comments