Is It Possible To Automate Detecting Z-Wave Devices Dropping Off The Network And Healing Them

I have a large Z-Wave Network and from time to time devices drop off and become unavailable. If I go to it in the dashboard and try to “heal” it, it usually comes back. Is there a way to create an automation to detect when a device becomes unavailable for a certain period of time and have the automation try to “heal” the device?

Thanks.

Look for ping + ZWave + dead. One of the community members has already done this.

Edit: here

Unless someone proves me wrong, i will contend that the dead devices that can be revived by pings are all just problems of the 700 series generation of zwave sticks. I changed to a 500 series stick (copying and restoring my whole zwave network with the ZWave-JS UI NVRAM features), and i have no more dead zwave devices. Just make sure you get a 500 series device with current SDK firmware, something like 6.81.02 - that will support all the relevant new features that where introduced originally with 700 series chips, but seemingly backported to 500 series.

3 Likes

I have a 500 series stick and I get the odd node going dead every now and then. Don’t really notice it now, I automated pinging and haven’t had an issue since. My automation was last triggered Oct 10th so I guess it doesn’t happen often now though.

I did it a little differently, I created a dead zwave node sensor (that I also use elsewhere) and an automation to press the ping button for dead nodes.

Offline ZWave Device Sensor
    - name: "Offline ZWave Devices"
      unique_id: offline_zwave_devices
      icon: mdi:z-wave
      unit_of_measurement: Devices
      state: >
        {% set devices = state_attr(this.entity_id,'entity_id') %}
        {% if devices != none %} {{ devices|count }}
        {% else %} {{ devices }}
        {% endif %}
      attributes:
        entity_id: >
          {{ expand(integration_entities('Z-Wave JS') )
              |selectattr('entity_id', 'search', 'node_status')
              |selectattr('state','in','dead, unavailable, unknown')
              |map(attribute="object_id")
              |map('regex_replace', find='(.*)_node_status', replace='button.\\1_ping', ignorecase=False)|list }}
Ping Dead Nodes Automation
- id: zwave_ping_dead_devices
  alias: "[ZWave] Ping Dead Devices"
  description: "Auto press ping button for dead zwave nodes."
  mode: queued
  trigger:
    - platform: state
      entity_id: sensor.offline_zwave_devices
      not_to:
        - unknown
        - unavailable
  condition:
    - condition: numeric_state
      entity_id: sensor.offline_zwave_devices
      above: 0
  action:
    - service: button.press
      target:
        entity_id: "{{ state_attr('sensor.offline_zwave_devices','entity_id') }}"

    - delay: 30 # throttle automation, let devices come back online
5 Likes

Where do I create the sensor?

I tried putting it in configuration.yaml but it never showed up. I’m sure I’m doing something wrong somewhere, just not sure where.

Sorry haven’t been on in a couple weeks. Did you figure this out?

I worked out that it needed these two lines in front when pasting it into the configuration.yaml

template:

  • sensor:
1 Like