Back from Holidays and all my Z-Wave devices are showing unavailable

I came back from 2 weeks away and all my Z-Wave stuff is showing as unavailable. I’ve updated to latest release 0.114.1 (docker) and the latest Openwave. I can see all my devices in ozwadmin and in MQTTExplorer - here is the status message:

{
     "OpenZWave_Version": "1.6.1240",
     "OZWDaemon_Version": "0.1.170",
     "QTOpenZWave_Version": "1.2.0",
     "QT_Version": "5.12.9",
     "Status": "driverAllNodesQueried",
     "TimeStamp": 1597563650,
     "ManufacturerSpecificDBReady": true,
     "homeID": 4272292198,
     "getControllerNodeId": 1,
     "getSUCNodeId": 1,
     "isPrimaryController": true,
     "isBridgeController": false,
     "hasExtendedTXStatistics": false,
     "getControllerLibraryVersion": "Z-Wave 3.95",
     "getControllerLibraryType": "Static Controller",
     "getControllerPath": "/dev/serial/by-id/usb-0658_0200-if00"
 }

But in HA everything is showing as unavailable:

I would like to help get this resolved as its not the first time this has happened to me. I am not sure where to start.

I have just noticed I have one device - the last node in the network (Node 15) is available.

Hi,

I can’t help you directly as I am still using the original Zwave integration not OZW, however I thought I would share the yaml I created to send me a notification if there is a Zwave problem. The configuration below relates to all my heating automations but you can see how any zwave entity not being in the “ready” state would cause a binary_sensor.heating_fault to be activated:

heating_fault:
  friendly_name: "Heating Fault"
  device_class: problem
  # Added additional checks in case zones fail to turn off/on
  value_template: >-
    {% if states('sensor.z1_level') == 'None' or
          states('sensor.z2_level') == 'None' or
          states('sensor.z2_level') == 'None' or
          states('zwave.qubino_pilot_wire_module_01') != 'ready' or
          states('zwave.qubino_pilot_wire_module_02') != 'ready' or
          states('zwave.qubino_pilot_wire_module_03') != 'ready' or
          states('switch.ensuite_radiator')  == 'unavailable' or
          states('switch.bathroom_radiator') == 'unavailable' or
        ((states('binary_sensor.z1_timer') == "off") and (states('input_select.z1_operation') == "Automatic") and (states('sensor.z1_preset_act') != "Anti-Freeze")) or
        ((states('binary_sensor.z2_timer') == "off") and (states('input_select.z2_operation') == "Automatic") and (states('sensor.z2_preset_act') != "Anti-Freeze")) or
        ((states('binary_sensor.z1_timer') == "on")  and (states('input_select.z1_operation') == "Automatic") and (states('sensor.z1_preset_act') != "Comfort")) or
        ((states('binary_sensor.z2_timer') == "on")  and (states('input_select.z2_operation') == "Automatic") and (states('sensor.z2_preset_act') != "Comfort")) %}  true
    {% else %} false
    {% endif %}
  delay_on: "00:10:00"
  delay_off: "00:00:30"

I then have an alert to send a notification to my phone:

heating_fault:
  name: "Heating Fault"
  title: "Warning - Heating system fault detected"
  message: "Check system for zone in abnormal state or module unavailable"
  entity_id: binary_sensor.heating_fault
  state: 'on'
  repeat: 1440
  can_acknowledge: true
  skip_first: false
  notifiers:
    - mobile_app_sm_g970f

Sorry I can’t help but this may be useful in case it happens again.

I had this too! I manually woke all devices by hand. Thus open it and wake it. It does not work to just detect motion or etc. I really needed to wake them. Altnatively I think it would have also worked to wait for the configured wakeup time.

I never had the kind of issues with vera (although lots of other issues). And I think this must be solved…

I have power cycled some mains powered switches and this does not seem to have made a difference. I can understand this behaviour for battery powered devices but not the mains ones which are essentially never sleeping.

I have turned on ozw and Matt debug logging in logger. I can see device information in MQTT messages like these:

2020-08-16 14:13:40 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on OpenZWave/1/node/10/instance/1/commandclass/113/value/1970325010792468/: b'{\n    "Label": "Home Security",\n    "Value": {\n        "List": [\n            {\n                "Value": 0,\n                "Label": "Clear"\n            },\n            {\n                "Value": 8,\n                "Label": "Motion Detected at Unknown Location"\n            }\n        ],\n        "Selected": "Motion Detected at Unknown Location",\n        "Selected_id": 8\n    },\n    "Units": "",\n    "ValueSet": true,\n    "ValuePolled": false,\n    "ChangeVerified": false,\n    "Min": 0,\n    "Max": 0,\n    "Type": "List",\n    "Instance": 1,\n    "CommandClass": "COMMAND_CLASS_NOTIFICATION",\n    "Index": 7,\n    "Node": 10,\n    "Genre": "User",\n    "Help": "Home Security Alerts",\n    "ValueIDKey": 1970325010792468,\n    "ReadOnly": true,\n    "WriteOnly": false,\n    "Event": "valueChanged",\n    "TimeStamp": 1597583620\n}'
2020-08-16 14:13:40 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on OpenZWave/1/node/10/instance/1/commandclass/48/value/172752912/: b'{\n    "Label": "Sensor",\n    "Value": true,\n    "Units": "",\n    "ValueSet": true,\n    "ValuePolled": false,\n    "ChangeVerified": false,\n    "Min": 0,\n    "Max": 0,\n    "Type": "Bool",\n    "Instance": 1,\n    "CommandClass": "COMMAND_CLASS_SENSOR_BINARY",\n    "Index": 0,\n    "Node": 10,\n    "Genre": "User",\n    "Help": "Binary Sensor State",\n    "ValueIDKey": 172752912,\n    "ReadOnly": true,\n    "WriteOnly": false,\n    "Event": "valueChanged",\n    "TimeStamp": 1597583620\n}'

In startup I can see nodes being added - node 2 is one one of my Z-Wave Smart Plugs:

2020-08-16 10:51:00 DEBUG (MainThread) [homeassistant.components.ozw] [NODE ADDED] node_id: 2
2020-08-16 10:51:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on OpenZWave/1/node/2/instance/1/commandclass/37/ (retained): b'{\n    "Instance": 1,\n    "CommandClassId": 37,\n    "CommandClass": "COMMAND_CLASS_SWITCH_BINARY",\n    "CommandClassVersion": 1,\n    "TimeStamp": 1597563167\n}'
2020-08-16 10:51:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on OpenZWave/1/node/2/instance/1/commandclass/37/value/38354960/ (retained): b'{\n    "Label": "Switch",\n    "Value": false,\n    "Units": "",\n    "ValueSet": true,\n    "ValuePolled": false,\n    "ChangeVerified": false,\n    "Min": 0,\n    "Max": 0,\n    "Type": "Bool",\n    "Instance": 1,\n    "CommandClass": "COMMAND_CLASS_SWITCH_BINARY",\n    "Index": 0,\n    "Node": 2,\n    "Genre": "User",\n    "Help": "Turn On/Off Device",\n    "ValueIDKey": 38354960,\n    "ReadOnly": false,\n    "WriteOnly": false,\n    "Event": "valueChanged",\n    "TimeStamp": 1597563252\n}'
2020-08-16 10:51:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on OpenZWave/1/node/2/instance/1/commandclass/39/ (retained): b'{\n    "Instance": 1,\n    "CommandClassId": 39,\n    "CommandClass": "COMMAND_CLASS_SWITCH_ALL",\n    "CommandClassVersion": 1,\n    "TimeStamp": 1597563167\n}'
2020-08-16 10:51:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on OpenZWave/1/node/2/instance/1/commandclass/39/value/46776340/ (retained): b'{\n    "Label": "Switch All",\n    "Value": {\n        "List": [\n            {\n                "Value": 0,\n                "Label": "Disabled"\n            },\n            {\n                "Value": 1,\n                "Label": "Off Enabled"\n            },\n            {\n                "Value": 2,\n                "Label": "On Enabled"\n            },\n            {\n                "Value": 255,\n                "Label": "On and Off Enabled"\n            }\n        ],\n        "Selected": "On and Off Enabled",\n        "Selected_id": 255\n    },\n    "Units": "",\n    "ValueSet": true,\n    "ValuePolled": false,\n    "ChangeVerified": false,\n    "Min": 0,\n    "Max": 0,\n    "Type": "List",\n    "Instance": 1,\n    "CommandClass": "COMMAND_CLASS_SWITCH_ALL",\n    "Index": 0,\n    "Node": 2,\n    "Genre": "System",\n    "Help": "Switch All Devices On/Off",\n    "ValueIDKey": 46776340,\n    "ReadOnly": false,\n    "WriteOnly": false,\n    "Event": "valueChanged",\n    "TimeStamp": 1597563252\n}'
2020-08-16 10:51:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on OpenZWave/1/node/2/instance/1/commandclass/50/ (retained): b'{\n    "Instance": 1,\n    "CommandClassId": 50,\n    "CommandClass": "COMMAND_CLASS_METER",\n    "CommandClassVersion": 3,\n    "TimeStamp": 1597563167\n}'
2020-08-16 10:51:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on OpenZWave/1/node/2/instance/1/commandclass/50/value/38567954/ (retained): b'{\n    "Label": "Electric - kWh",\n    "Value": 0.024000000208616258,\n    "Units": "kWh",\n    "ValueSet": true,\n    "ValuePolled": false,\n    "ChangeVerified": false,\n    "Min": 0,\n    "Max": 0,\n    "Type": "Decimal",\n    "Instance": 1,\n    "CommandClass": "COMMAND_CLASS_METER",\n    "Index": 0,\n    "Node": 2,\n    "Genre": "User",\n    "Help": "",\n    "ValueIDKey": 38567954,\n    "ReadOnly": true,\n    "WriteOnly": false,\n    "Event": "valueChanged",\n    "TimeStamp": 1597563252\n}'
2020-08-16 10:51:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on OpenZWave/1/node/2/instance/1/commandclass/50/value/562949991989266/ (retained): b'{\n    "Label": "Electric - W",\n    "Value": 0.0,\n    "Units": "W",\n    "ValueSet": true,\n    "ValuePolled": false,\n    "ChangeVerified": false,\n    "Min": 0,\n    "Max": 0,\n    "Type": "Decimal",\n    "Instance": 1,\n    "CommandClass": "COMMAND_CLASS_METER",\n    "Index": 2,\n    "Node": 2,\n    "Genre": "User",\n    "Help": "",\n    "ValueIDKey": 562949991989266,\n    "ReadOnly": true,\n    "WriteOnly": false,\n    "Event": "valueRefreshed",\n    "TimeStamp": 1597570598\n}'
2020-08-16 10:51:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on OpenZWave/1/node/2/instance/1/commandclass/50/value/1125899945410578/ (retained): b'{\n    "Label": "Electric - V",\n    "Value": 239.89999389648438,\n    "Units": "V",\n    "ValueSet": true,\n    "ValuePolled": false,\n    "ChangeVerified": false,\n    "Min": 0,\n    "Max": 0,\n    "Type": "Decimal",\n    "Instance": 1,\n    "CommandClass": "COMMAND_CLASS_METER",\n    "Index": 4,\n    "Node": 2,\n    "Genre": "User",\n    "Help": "",\n    "ValueIDKey": 1125899945410578,\n    "ReadOnly": true,\n    "WriteOnly": false,\n    "Event": "valueChanged",\n    "TimeStamp": 1597563252\n}'
2020-08-16 10:51:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on OpenZWave/1/node/2/instance/1/commandclass/50/value/1407374922121234/ (retained): b'{\n    "Label": "Electric - A",\n    "Value": 0.0,\n    "Units": "A",\n    "ValueSet": true,\n    "ValuePolled": false,\n    "ChangeVerified": false,\n    "Min": 0,\n    "Max": 0,\n    "Type": "Decimal",\n    "Instance": 1,\n    "CommandClass": "COMMAND_CLASS_METER",\n    "Index": 5,\n    "Node": 2,\n    "Genre": "User",\n    "Help": "",\n    "ValueIDKey": 1407374922121234,\n    "ReadOnly": true,\n    "WriteOnly": false,\n    "Event": "valueChanged",\n    "Time...skipping...

Does the OZW finish initialization after 30 minutes? If so restart HA (just HA, nothing else) and that should bring it all back into sync. Happens to me from time to time as well.

Thanks for the suggestion - I’ve tried multiple restarts and no joy

I’ve isolated this to something with ozwdaemon - the MQTT topic that gets published is missing node data for all nodes except for node 15. I currently can’t see why. I have opened an issue on the ozwdaemon GitHub

So had another go this evening…

  1. I rolled my ozwdaemon docker back to build allinone-150 deleted the MQTT topic and restarted, no good same issues with missing data

  2. I then decided to try deleting the ozwcache file. I shutdown the ozdaemon and renamed the cache file and for good measure made it read only. I also deleted the MQTT topic. Upon restart the cache file was rebuilt and the OpenZWave topic was recreated complete with the missing node data.

After a suitable time for the mesh to stabilise I can now see wave devices again in HA

1 Like

They’ve gone again!

I can get them back by deleting the cache file inside ozwdaemon container and restarting. I have done this twice now. I can’t see any pattern to how and when this happens. I have an issue open over on the qt-openzwave GitHub: