New OpenZWave (beta) for Home Assistant

This post may contain affiliate links. Please read my disclaimer for more info.

If you’re a Z-Wave user and been following the latest Home Assistant news, you might have noticed a new “OpenZWave (beta)” integration that keeps getting mentioned. This Home Assistant integration aims to improve the Z-Wave experience within Home Assistant by controlling your Z-Wave network over MQTT.

In today’s article I’m going to be discussing how to move your existing Z-Wave devices over to the new integration and some advantages of this new architecture.

Background

Historically, a version of OpenZWave (an open source Z-Wave library) has been integrated directly into Home Assistant. This allowed Home Assistant to integrate with a USB Z-Wave controller stick to manage Z-Wave devices.

There were a couple downsides to this architecture though. First off, the OpenZWave project was updating and adding new devices and new classes of devices faster than Home Assistant could integrate the new versions. This meant that certain devices were supported in OpenZWave, but not Home Assistant.

Also, rebooting Home Assistant required the whole Z-Wave network to be rebooted. This is problematic because larger Z-Wave networks take some to boot up as all devices need to talk to each other to create the mesh network. So it would be minutes before you could control your Z-Wave devices.

Somewhere along the way, the Zwave2MQTT project was born. This was a community project that looked to separate out the Z-Wave daemon to control it over MQTT. I wrote an article about this in the past if you’re interested. This allowed Home Assistant to be updated and rebooted independently.

The latest development in this saga is Home Assistant’s new OpenZWave integration. This works similar to Zwave2MQTT in that it talks to an OpenZWave service over MQTT. But it’s being developed closer with the Home Assistant project to ensure tight integration. Today’s article is about trying out this new service as it looks to be where Home Assistant is headed.

Migrating to New Service

Prerequisites

There are a few things you’ll need before you try and migrate to the new integration. First off you’ll need an MQTT broker running and the MQTT integration running. One of my first articles on this blog was about MQTT and it still works today. And there are a lot of other resources on the web for installing your own MQTT broker.

You’ll also need a supported Z-Wave controller. Home Assistant provides a list in their documentation. I’m using the Aeotec Z-Stick Gen 5.

Installation Types

Depending on how you have Home Assistant installed, there are various different ways to migrate to the new OpenZWave integration. If you’re using the Home Assistant supervisor, there is an official add-on named “OpenZWave” in the add-on store.

If you’re like me and use Home Assistant Core through docker, you need to create a new Docker container that will run the OpenZWave service. You can read more about the image options on the GitHub page, but I’m going to be using the “allinone” image that contains a GUI to manage the Z-Wave network.

Moving to the New Container

First off, only one piece of software should be accessing your Z-Wave controller at once. So I had to shut down my Home Assistant instance and stop passing in the Z-Wave device to the Home Assistant docker container. After removing the Z-Wave USB stick from the “devices” section of the container, I rebooted Home Assistant. Not surprisingly it gave me some errors about not being able to find my Z-Wave devices.

Next, I started the new OpenZWave container. Here’s my docker-compose file to get it working:

Some things you’ll want to change:

  • The Z-Wave USB device to add to your container. Check out my article on Z-Wave Tips and Tricks to use the device id instead of a path that could change (like /dev/ttyACM0).
  • The IP address of your MQTT broker. You can also use the environment variables MQTT_USERNAME and MQTT_PASSWORD for setting your username/password if you need to.
  • Your Z-Wave network key. If you used one in Home Assistant, make sure to bring it with you to OZWDaemon.

After writing out your docker-compose.yml file, just docker-compose up ozwd to start up the service.

Using OZWDaemon Admin

To OZWDaemon Admin interface is actually a desktop GUI rather than a web application. To use the GUI though you can actually connect to a virtual desktop through a web browser. So essentially you use your web browser to connect to a virtual desktop over VNC running in your docker container to use the GUI.

If that sounds hard, it really isn’t. Just point your browser to port 7800 on the IP Address that is running the container.

From there you can connect to the VNC session. You’ll be able to choose which VNC client to connect with, I just went with the basic version of the client.

At that point, the GUI will pop up and you will be able to type in your serial port and where OZWDaemon is running. I named my Z-Stick /dev/zwave when mounting into the device so I renamed it here. The OZWDaemon is running within the container, so no need to change anything in the second section.

When you’re done, click the second “start” button. You should now see a GUI with your devices listed:

Configure Devices

If that all worked, you now have OZWDaemon running. You can connect Home Assistant to OZWDaemon by using the integrations tab. It should automatically find your OZWDaemon instance and list all your devices.

The migration does take some manual steps. Home Assistant won’t know what rooms these devices are in and their correct entity names. So you’ll have to do some manual renaming and configuring. At the end of the day though you’ll have all your entities now in Home Assistant.

Performance and Impressions

I talked about some of the benefits about moving to OZWDaemon at the beginning of the article. But one thing I wanted to test out after installing was the performance.

When using my light switches and dimmers I didn’t notice any delay when changing these devices in Home Assistant UI before they updated physically. Same thing also goes for my Z-Wave Fan controller.

One thing that is not supported yet is RGB lights. So my Aeotec RGB light bulb just shows up as a dimmable bulb instead instead of a fully featured RGB bulb. I’m sure this will come down the line, but looks like it’s not supported yet in the new system.

I was also a bit disappointed in the performance of the RGB bulbs just turning on/off. This isn’t really different than when controlled directly through Home Assistant, but I was hoping the new architecture would improve the performance. You can see in the clip below, whenever I turn off/on the light bulb it hesitates and toggles for a second before correctly putting the user interface in the right state.

Closing Thoughts

I’m really glad Home Assistant is investing in improving the Z-Wave experience. The new architecture looks a bit different and still needs to add support for some types of devices, but looks very promising. Z-Wave is an important protocol of the smart home tech world and I want Home Assistant to provide the best experience.

If you’re interested in Z-Wave, you might enjoy some of my other Z-Wave related articles:

If you found this review helpful, please consider supporting the blog by joining my mailing list, following the blog on social media or directly through Buy Me a Coffee. Thanks for reading!