Configuration for HA -QT-OpenZWave

I’ve previously successfully set up my z-wave network using the built-in z-wave integration as well as zwave2mqtt. Now trying to integrate the new qt-open z-wave integration but not having a whole lot of luck.

Things I’ve tried:

  • I’ve verified my MQTT integration is working via Developer Tools
  • Disabled user/pw authentication on the default listener for the MQTT broker
  • Numerous combinations of restarting hass, adding/removing the hacs integration, restarting the MQTT client

But I seem to get the same error:

[20200130 22:01:59.893 UTC] [ozw.library] [info]: Info - Node: 0 Queuing Lookup on mfs.db.openzwave.com for Node 0
[20200130 22:01:59.894 UTC] [ozw.library] [info]: Info - Node: 0   Opening controller /dev/ttyACM2
[20200130 22:01:59.894 UTC] [ozw.library] [info]: Info - Node: 0 Trying to open serial port /dev/ttyACM2 (attempt 1)
[20200130 22:01:59.894 UTC] [ozw.library] [info]: Info - Node: 0 Timer: thread starting
[20200130 22:01:59.894 UTC] [ozw.library] [debug]: Detail - Node: 0 Timer: waiting with timeout -1 ms
[20200130 22:01:59.894 UTC] [ozw.library] [info]: Info - Node: 0 Starting DNSThread
[20200130 22:01:59.894 UTC] [ozw.library] [info]: Info - Node: 0 mgr,     Added driver for controller /dev/ttyACM2
[20200130 22:01:59.894 UTC] [ozw.manager] [debug]: AddDriver Completed
[20200130 22:01:59.894 UTC] [ozw.library] [info]: Info - Node: 0 Serial port /dev/ttyACM2 opened (attempt 1)
[20200130 22:01:59.894 UTC] [ozw.library] [info]: Info - Node: 0 LookupTxT Checking mfs.db.openzwave.com
[20200130 22:01:59.894 UTC] [qt.mqtt.connection] [debug]: void QMqttConnection::transportError(QAbstractSocket::SocketError) QAbstractSocket::HostNotFoundError
[20200130 22:01:59.894 UTC] [ozw.mqtt.publisher] [debug]: MQTT State Change 0
[20200130 22:01:59.894 UTC] [ozw.library] [debug]: Detail - Node: 255 Queuing (Command) FUNC_ID_ZW_GET_VERSION: 0x01, 0x03, 0x00, 0x15, 0xe9
[20200130 22:01:59.894 UTC] [ozw.mqtt.publisher] [warning]: Exiting on Failure

Anything else I need to do?

Didn’t want to pollute the thread, but this one is most relevant:

your mqtt connection is not correct; your message socket conenction failure indicates that the service was not able to connect to the mqtt system.

this is my docker command

docker run -it --security-opt seccomp=unconfined --device=/dev/ttyACM0 -v /tmp/ozw:/opt/ozw/config -e MQTT_SERVER="172.16.1.249" -e USBPATH=/dev/ttyACM0 openzwave/ozwdaemon:latest

This container was running 9 days solid; pretty good for an early build. I just pulled the latest version, to see how this one runs; so far its up and running.

Note - that MQTT server must accept unauthenticed connections currently.

2 Likes

Thanks for the tip! Not sure which one of these things was the culprit but I finally got it working by doing the following:

  • using docker run instead of docker-compose
  • setting MQTT_SERVER to the docker container IP address (e.g., 172.17.0.#) instead of 0.0.0.0, 127.0.0.1., localhost, host LAN IP address, MQTT server FQDN, etc.
  • running both mqtt and ozwdaemon in bridge mode in the same bridge network (the default bridge and not a user-defined one)
  • configuring mqtt in homeassistant using the loopback address, 127.0.0.1, instead of localhost, host LAN IP address, etc.
  • removing mqtt, ozwdaemon integrations; restarting hass; and adding back mqtt, ozwdaemon

For docker compose, I needed to set tty: true, otherwise the application seemed to get stuck. I noticed w/o a tty allocated the logs are never output.

Hi!
I need a sample for qt-OpenZwave client “setValue” command line so I switch on the node 4. For ex what I need to repeat zwave.setValue(4, 37, 1, 0, true); ?
Publish packet
topic: OpenZWave/1/command/setValue/…?
payload: … ?
Thank you in advance!