Setting up Openzwave (beta), seems to be connecting to an internal MQTT broker. Why?

I’m having trouble setting up Openzwave (beta) on a supervised install on generic Linux
It seems to start and run fine. I can open the Openzwave control tab and the ozwdaemon virtual config window. All my devises are listed in it.

However, when I fully disable the old zwave (from integration and config.yaml) and restart Hass with Openzwave configured all my zwave devices are unavailable.

Looking at the Openzwave log it appers to be starting a internal MQTT broker and connecting to it.
Why?
I have a working Mqtt broker via the add-on, It’s working and all my other intergration and Mqtt devices connect to it just fine.
Log snips from openzwave:

***snip 1***
[services.d] starting services
[01:05:19] INFO: Starting internal MQTT broker...
[services.d] done.
1597467919: mosquitto version 1.6.8 starting
1597467919: Config loaded from /etc/mosquitto.conf.
1597467919: Opening ipv4 listen socket on port 1883.
1597467919: Opening ipv6 listen socket on port 1883.
1597467919: Warning: Mosquitto should not be run as root/administrator.
[01:05:20] INFO: Starting OpenZWave...
1597467920: New connection from 127.0.0.1 on port 1883.
1597467920: Socket error on client <unknown>, disconnecting.
1597467920: New connection from 127.0.0.1 on port 1883.
1597467920: New client connected from 127.0.0.1 as mosq-0JlYZ18zLCVpXMublr (p2, c1, k60, u'ozw').
1597467920: Client mosq-0JlYZ18zLCVpXMublr disconnected.



***snip 2***
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] auth.sh: executing... 
[01:45:46] INFO: Auth database exists
[cont-init.d] auth.sh: exited 0.
[cont-init.d] mqtt.sh: executing... 
[01:45:47] INFO: No internal MqTT service found
[cont-init.d] mqtt.sh: exited 0.
[cont-init.d] network_key.sh: executing... 
[cont-init.d] network_key.sh: exited 0.
[cont-init.d] novnc.sh: executing... 
[cont-init.d] novnc.sh: exited 0.
[cont-init.d] structure.sh: executing... 
[cont-init.d] structure.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[01:45:48] INFO: Starting internal MQTT broker...
1597470348: mosquitto version 1.6.8 starting
1597470348: Config loaded from /etc/mosquitto.conf.
1597470348: Opening ipv4 listen socket on port 1883.
1597470348: Opening ipv6 listen socket on port 1883.
1597470348: Warning: Mosquitto should not be run as root/administrator.
[01:45:48] INFO: Starting OpenZWave...
1597470348: New connection from 127.0.0.1 on port 1883.
1597470348: Socket error on client <unknown>, disconnecting.
1597470348: New connection from 127.0.0.1 on port 1883.
1597470348: New client connected from 127.0.0.1 as mosq-H1rDzfkXEga4azkYTV (p2, c1, k60, u'ozw').
1597470348: Client mosq-H1rDzfkXEga4azkYTV disconnected.

All so where can I find the full log for openzwave?
As the add-on log window has a proclivity to speed by and getting boot info is difficult.

seeing your log prompted me to check if i was getting the same thing. to see the full log i used the “SSH & Web Terminal” addon to access the commandline and use “docker ps” to find the container running openzwave and then “docker logs” to get the full output. turns out i was, and restarting the mosquitto addon and then restarting ha fixed it (for now).

posted some debugging ramblings here: https://www.reddit.com/r/homeassistant/comments/ib8iks/openzwave_addon_stopped_talking_to/

Thanks for the tip.

I attributed my problem from running a unsupported install of HA…Maybe.

So last night I switched back to a Rpi4 w/ssd and HassOS. It was late and I did not have time to try OZW again.

Later this evening I’m going to try on a supported install to see how it go’s

*finger’s crossed :smiley:

Keep us posted how it goes and what to do to get the OZW using the global configured MQTT broker…
I’m hitting the same question mark, running an external MQTT broker on my NAS and having a Pi4 (official has image) connect to it… All works well, but OpenZwave keeps on ignoring the external broker settings…

Tried several config settings in the pursuit to get an external mqtt broker and not using the internal one.

  • Having the mqtt integration installed and set to my external MQTT => ignored
  • Setting up an external broker in the configuration.yaml => ignored
  • Manually change the MQTTServer setting in: /mnt/data/supervisor/addons/data/core_zwave/ozw/config
    this gets overwritten after a restart => not working…

What does work is: Drop the external broker and use the Mosquitto add on and run it locally :slight_smile: So sticking to that for now … It’s a bit overwhelming for a starter but I’m getting there :smiley:

Anyone figured this out already how to fix this?
I also already have a MQTT server running outside of homeassistant, and I also get nothing from the openzwave since it connects to the integrated MQTT server.

If you are using the addon, then there is nothing to fix. By design, it currently requires the mosquitto addon.

See step 4 of the installation instructions:

This add-on currently requires to have the Mosquitto add-on installed. Please make sure to install and set up that add-on before continuing.

You could setup a mqtt bridge between your own broker and the mosquitto add-on.

1 Like

I have the same problem… after a reboot of HA the ZWave is not working.

ADDONS: (I have these installed)
Mosquitto broker - Current version: 5.1
OpenZWave - Current version: 0.5.2

Under INTEGRATIONS - I have these:
MQTT - Mosquitto broker
OpenZWave (beta)
Z-Wave (but this is currently STOPPED… my old zwave).

It worked fine after initial install… but breaks after reboot…
What am I missing?

Mosquitto log before starting ZWAVE addon
[08:03:02] INFO: Setup mosquitto configuration
[08:03:02] WARNING: SSL not enabled - No valid certs found!
[08:03:02] INFO: Found local users inside config
[08:03:02] INFO: Initialize Hass.io Add-on services
[08:03:02] INFO: Initialize Home Assistant discovery
[08:03:02] INFO: Start Mosquitto daemon
1599976982: mosquitto version 1.6.3 starting
1599976982: Config loaded from /etc/mosquitto.conf.
1599976982: Loading plugin: /usr/share/mosquitto/auth-plug.so
1599976982: ├── Username/password checking enabled.
1599976982: ├── TLS-PSK checking enabled.
1599976982: └── Extended authentication not enabled.
1599976982: |-- *** auth-plug: startup
1599976982: Opening ipv4 listen socket on port 1883.
1599976982: Opening ipv6 listen socket on port 1883.
1599976982: Opening websockets listen socket on port 1884.
1599976982: Warning: Mosquitto should not be run as root/administrator.

And when starting ZWAVE addon:
[s6-init] making user provided files available at /var/run/s6/etc…exited 0.
[s6-init] ensuring user provided files have correct perms…exited 0.
[fix-attrs.d] applying ownership & permissions fixes…
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts…
[cont-init.d] auth.sh: executing…
[08:03:59] INFO: Auth database exists
[cont-init.d] auth.sh: exited 0.
[cont-init.d] mqtt.sh: executing…
[08:04:00] INFO: Connected to internal MQTT service
[cont-init.d] mqtt.sh: exited 0.
[cont-init.d] network_key.sh: executing…
[cont-init.d] network_key.sh: exited 0.
[cont-init.d] novnc.sh: executing…
[cont-init.d] novnc.sh: exited 0.
[cont-init.d] structure.sh: executing…
[cont-init.d] structure.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[08:04:00] INFO: Starting internal MQTT broker…
[services.d] done.
1599977040: mosquitto version 1.6.8 starting
1599977040: Config loaded from /etc/mosquitto.conf.
1599977040: Opening ipv4 listen socket on port 1883.
1599977040: Opening ipv6 listen socket on port 1883.
1599977040: Warning: Mosquitto should not be run as root/administrator.
1599977040: Connecting bridge main-mqtt (core-mosquitto:1883)
[08:04:01] INFO: Starting OpenZWave…
1599977041: New connection from 127.0.0.1 on port 1883.
1599977041: Socket error on client , disconnecting.
1599977041: New connection from 127.0.0.1 on port 1883.
1599977041: New client connected from 127.0.0.1 as mosq-0ukhEbwLXUUKT6codF (p2, c1, k60, u’ozw’).
1599977041: Client mosq-0ukhEbwLXUUKT6codF disconnected.

Is there some mixup of the MQTT it uses? I can see the versions are different!?
Please can someone explain what MQTT addons/integrations is needed and the minimum required config of these?

Thanks.

Can’t tell from those logs, but this is not going to work. Stopping the old integration just temporarily stops it. If you restart HA it’s going to start again, and now you have both zwave and ozw integrations running at the same time, a recipe for disaster. Both of the zwave instances will be fighting for the controller.

But the “old” zwave says it is stopped ?

Do you think deleting the “old” zwave and reboot will make it work then?

It might be stopped now because it could have failed to start, due to competition with the addon, but you’ve have to check the logs to know for sure. But you cannot have both the OpenZWave addon installed, and the ZWave integration installed at the same time, using the same USB stick, except for the temporarily stopped scenario.

Do you think deleting the “old” zwave and reboot will make it work then?

Yes, make sure you delete the integration from the UI and from configuration.yaml if you have it enabled there. Just be aware that you might lose all of your zwave based entities (I can’t remember if they get deleted or not), so keep a backup if you’re unsure about committing to ozw.

Also, if you have any securely included devices, don’t forget to transfer your network key over to the ozw addon if you haven’t already done so.

thanks… The culprit here was the old integration that still existed…
Also it had to be removed in config file as well, and then restart.

Things works just fine now - even after restart…
Thanks freshcoast :slight_smile: