The Future of Z-Wave in HA - QT-OpenZWave

We are discussing the beta integration.

There are two major components at play here, 1) the OpenZWave Daemon and 2) the beta integration. They are developed by two different groups/people. The daemon is what actually runs the open z-wave, handles communications with all of the devices, etc. The daemon publishes information it gets from the devices to mqtt.

The Integration (which is what is in beta) takes the information from mqtt and turns it into entities in HA.

To-date, the integration did not know how to support cover devices, even though the daemon publishes the info to mqtt. That is why, if you know how to do it, you could an mqtt cover and still use it by publishing to mqtt directly.

The PR in discussion is to add cover entity support to the beta integration

But the PR link says it is for HA Core not the ozw beta integration. At least I assume so since the ozw beta integration hasn’t been incorporated into HA core yet. Or has it and I missed something major?

The ozw beta is part of core.

:flushed:

Well that explains it. I don’t know how I missed that part of the announcement. I know I read it but I guess since they call it “beta” I never realized it was actually in core now.

Never mind…

It happens, we skim over bits we’re not that interested in :wink:

1 Like

I have an interesting situation using the new qt-openzwave in HA that has popped up a few times now over the past weeks, most likely because my configuration is a little bit different then most.

I have a macmini running Ubuntu 18.04, docker, and containers with HA Core, MQTT and some more unrelated stuff.
I have a raspberrypi running docker with just one container: qt-openzwave.

When I reboot my macmini (so, HA and MQTT are unavailable for some time), qt-openzwave loses connection to MQTT (obviously), but it doesn’t seem to reconnect itself if the mqtt server is back online.

Only after I also restart qt-openzwave things start working again. This is exactly what I’m trying to avoid: I only want to restart qt-openzwave if I update qt-openzwave and not for any other updates.

Is there something I’m doing wrong? Or can the qt-openzwave docker-container not handle getting disconnected from the mqtt broker?

Correct it doesn’t like MQTT going away.

On my instance it crashes when MQTT broker goes down, but having restart: always in my docker-compose.yml makes it go back up automatically.

I’m a little bit afraid to put "restart: always" in my docker-compose file, what if ozwdaemon is restarted before my mqtt broker is available again? Will it crash immediately again or in that case, wait for connection and continue starting up just fine?

It is coded so that if the MQTT broker isn’t available it exits.

That’s not a very resilient implementation.

Configurable retries delays and timeouts would be nice.

Feel free to submit a request on the github issue page :slight_smile:

It’s not crashing. It’s exiting orderly. If the ozwdaemon tries to start and cant contact the broker, it will exit. If you have restart: always or restart: unless-stopped then it will just keep trying until the broker comes back. It’s not like it will “wear out” :slight_smile:

Yes, it would be better if it was robust to mqtt outages, but for now it isn’t. What you could do is run the broker on the same pi as ozwdaemon. Then you can reboot your mac/HA all day, no issues. MQTT broker is super lightweight.

1 Like

I’d suggest running a seperate MQTT broker on the qt-openzwave host and bridge it to your main broker. My bridging config looks something like this:

connection main-broker
address main-broker.example.com
remote_username pi-username
remote_password pi-password
cleansession false
topic # both 2

You should be able to change the # to be OpenZWave/# if this additional broker is only used for proxying qt-openzwave.

2 Likes

Let’s see if I have some time next week, I may have a look at it. My profession is enterprise application integration, so why not at least give it a shot :grinning:

That’s actually a really good idea! Thanks! I think I will try this out.

I have to say, I’m relatively new to HA and started with the normal z-wave integration. I finally got everything setup and then saw the news of the new component and wasn’t looking forward to migrating in the future if I wanted OZW 1.6. I bit the bullet this weekend due to various things not working in regards to devices not being in 1.4 and my new locks having issues. I have to say, I’m impressed even with this being a beta. It works so much better with my locks and with the various devices. I knew nothing about mqtt and with some research and tinkering, I was able to figure it out. Just wanted to say I’m excited for what the future of this integration will bring and wanted to thank the developers for the hard work they have put in so far. Thank you.

3 Likes

I have a quick question. I have two instances of HA, my primary usage instance, and a testing instance. I have the older 1.4 ozw running on my primary, because it works fully for me at the moment. I am definitely interested in checking out the ozw beta. If I plug my zwave controller (using same network key) into another computer (my testing instance), and dont add/remove any devices, just do some testing, will it make changes on my controller that will cause issues when I put it back into my primary instance.

I was thinking I could see what works/does not work, learn a few things for a few hours at a time, and then put it back when done until I was ready to dedicate the time to making the official plunge.

Anyone else done this?

Nothing gets changed.

Nope I went full beta after cover support was announced, but found it was only for blinds/roller shutters :stuck_out_tongue: Garage door support is merged in the latest dev version.

I will tell you what doesn’t work off the top of my head, no light RGBW color support as of yet, no usercode support for locks yet (PR pending), no set_config_parameters support yet for changing LED indicators (PR pending).

Ok, since a while (I think since update to 0.112 I have this weird issue I never had before.

zwave stops responding. In home assistant I do not see anything happen. via VNC I do not see any zwave logging.

I have:
image

it might also possibly have to do with an update of hassos (4.10 --> 4.11).

I see in logging:

And when I restart the openzwave addon it starts working instantly. I have had this now for the 3rd day in a row at the end of the day/begin of the evening…

Help!?