How to heal network with OpenZwave plugin/MQTT broker

Hi guys,

I am using OpenZWave (beta) integration with the OpenZwave plugin (0.3.0) and a MQTT broker (@Raspberry Pi 4). I would say it works fairly stable except that there’s no control panel YET.

Anyhow. I recently moved my Aeotec ZWave Gen5 stick and I am seriously suspecting that nodes far away from the base unit are not able to communicate with the USB stick anymore.

So I want to execute a heal network command. In lack of a easily installable control panel(?) does anyone know how I can send a heal command to OpenZwave plugin by publishing it to the MQTT broker?

Thank you

/ Henrik

Oh I found the MQTT doc for qt-openzwave. I’ll read it to see if I can publish it to the MQTT broker :slight_smile:

Now I tried this:

mosquitto_pub -h ... -t "OpenZWave/1/command/healnetwork" -m ""

Let’s hope I am on the right track :slight_smile:

Hi @henrik.klang,

I was looking for the healNetworkNode command and I found your post.

Did you get it working ?

Edit : I did.

- id: '1590165766966'
  alias: 'Zwave : Auto Heal Node'
  trigger:
  - at: 00:02:00
    platform: time
  condition: []
  action:
  - data:
      payload: '{"node": 14, "doreturnroute": false}'
      topic: OpenZWave/1/command/healnetworknode/
    service: mqtt.publish
  mode: single
1 Like

Yep my above mosquitto_pub command worked flawlessly. The device “lost” seems to have recalulated its route so i was able to use it.

Did you try mosquitto_pub before trying your script above?

No, I directly started to play with the HA service mqtt.publish

service: mqtt.publish
  payload: '{"node": 14, "doreturnroute": false}'
  topic: OpenZWave/1/command/healnetworknode/

And I have been reading OZW log with

tail -f /opt/openzwave/logs/ozwdaemon.log

I’m not sure you get any feedback on the command being successful. At least I didn’t as far as I can remember.

You can get a feedback from ozwdaemon.log.

This was my first try.

[20200909 11:00:34.166 CEST] [ozw.mqtt.commands] [debug]: Got  "OpenZWave/1/command/healnetworknode/"  Message:  "{\"node\": 14}"
[20200909 11:00:34.166 CEST] [ozw.mqtt.commands] [warning]: Missing Field for  "healnetworknode" :  "doreturnroute" :  "{\"node\": 14}"
1 Like

You will get this same feedback in MQTT, topic OpenZWave/<instance>/event/<topic>/ with a payload indicating whether the command was accepted or if there were errors. https://github.com/OpenZWave/qt-openzwave/blob/89cc0d86c983101aacd89c780bae18bb3dffe9b4/docs/MQTT.md#command-status-and-feedback

I’m not sure if i’m doing this right.
I’ve added en changed the position of some zwave plus devices and used this command to heal my network:

service: mqtt.publish
topic: OpenZWave/1/command/healnetwork/

In the log file i get this:

[ozw.mqtt.commands] [debug]: Got “OpenZWave/1/command/healnetwork/” Message: “”
[ozw.mqtt.commands] [warning]: Json Parse Error for “healnetwork” : The document is empty. : “”

Can someone tell me if i did it right?

Payload needs to be an empty JSON object, {}

1 Like

Thanks! Works for me now :slight_smile: