Automate ZwaveJS Ping Dead Nodes?

What is the firmware version?

I’ve observed this too, but I am not on a 800 stick. I half suspect this is a change made in either the ZWaveJS UI or in the home assistant integration to not report ZWave devices as unavailable even though they clearly have become unavailable.

1 Like

Firmware on mine is showing v1.2, SDK 7.18.3

I’m using the Zooz 800LR Z-Wave GPIO Module (ZAC93, Firmware v 1.0) with my Home Assistant Yellow and have been seeing Z-wave devices dropping in the manner described in this thread, so it seems the 800-series has similar issues (this is on HA 2023.5.2 on OS 10.1). Thus far it mainly seems to impact wired GE switches and dimmers (Enbrighten brand,all 500-series devices with a mix of S2 and non-S2 devices). Manually pinging the devices seems to recover them. I’ll try the automated pinging in the thread above, but wanted to add an additional data point.

1 Like

I am experiencing the same issue with my ZAC93 and Home Assistant Yellow. I will try the script above. Hopefully, it will keep me from completely abandoning all of my Z-Wave devices and switching to zigbee

1 Like

I’m seeing the exact same issue using the ZAC93 with a variety of switches (GE, Enbrighten, Zooz). I get a dead nodes every few days and pinging works.

2 Likes

Pinging everything once overnight takes care of most problems. I also have “Alexa, run ping”.

My automations that fail also ping,

I agree that something zwave JS specific is the issue. I have a zen 32 that goes unavailable several times a week. This never happened with Homeseer. I suspect Homeseer implements some z-wave management functions that check and wake up unavailable nodes. Why isn’t zwave JS periodically trying to wake up nodes it has marked as unavailable?

Can anyone provide me with an automation with the corresponding script… With me, devices are constantly going offline…

It would be great if someone could provide something working. The thread has now become a bit confusing…

1 Like

Hi @all, can no one help me?

Asking again for helping ……

After making some tweaks to the automation, this is working for me now. The problem with the original automation is that it would run as soon as the device became available and never re-run. So, in my case, it would try to ping the device when it lost power but not retry once power was restore. This mod will ping the device(s) every 30 seconds.

Automation
alias: Ping Dead ZWave Devices
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.dead_zwave_devices
condition:
  - condition: template
    value_template: |
      {{ int(states.sensor.dead_zwave_devices.state) > 0 }}
action:
  - repeat:
      while:
        - condition: template
          value_template: |
            {{ int(states.sensor.dead_zwave_devices.state) > 0 }}
      sequence:
        - service: button.press
          target:
            entity_id: |
              {{ state_attr('sensor.dead_zwave_devices','entity_id') }}
        - delay:
            hours: 0
            minutes: 0
            seconds: 30
            milliseconds: 0
mode: single
Template
template:
  - sensor:
      - name: "Dead ZWave Devices"
        unique_id: dead_zwave_devices
        unit_of_measurement: entities
        state: >
          {% if state_attr('sensor.dead_zwave_devices','entity_id') != none %}
            {{ state_attr('sensor.dead_zwave_devices','entity_id') | count }}
          {% else %}
            {{ 0 }}
          {% endif %}
        attributes:
          entity_id: >
            {% set exclude_filter = ['sensor.700_series_based_controller_node_status'] %}
            {{
              expand(integration_entities('Z-Wave JS') )
              | rejectattr("entity_id", "in", exclude_filter)
              | 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
            }}
3 Likes

Thx , I‘ll test ….cross the fingers

Note that you may have to rename the integration in the template.
For example:

expand(integration_entities(‘zwave_js’) )

2 Likes

After over a year, I can somewhat confidently say this isn’t a Z-Wave 700 issue, this is a Home Assistant Z-Wave JS issue specifically.

I can’t find a single mention of this type of dead node issue for another automation platform I used for years prior. Also, every web search I do on the subject involves someone experiencing this running Home Assistant.

There are definitely some hardware/firmware issues with some products, but the “ping brings it back” dead node issue points only to HA, IMO.

It does appear that way.
Slightly unrelated to the problem plauging this thread but recently I dealt with (for the second time) an entirely unusable zwave network. The kicker is that it would come back for awhile if I restarted the zwavejs add on. So not touching the hardware. There is something not quite clicking but admittedly I don’t know how to provide the devs any direction.

I’ve tried numerous versions of this automation but they all seem to work for a bit and then stop.
Just changed it all to the one @FriedCheese posted (after updating the integration name) and it worked once but now it’s not updating.
Using Dev tools I can see the sensor should have updated since the attribute script returns two items

Then looking at the actual entity, it doens’t even show those items in the array
image

The “template listens for” part looks good as I can see the node status entities there. Unsure why it’s not updating.

I went and ‘pinged’ the bathroom light myself and the sensor still doesn’t update (looks the same as above) but the template editor did update automatically:

*note that the screenshot cut off the bottom and there is a long list of ‘listens for’

Have you reloaded YAML since updating the template? Only thing I can think of. It’s worked reliably for me.

The integration name appears to work in either format.

Yeah, I restarted HA after making the change yesterday. I just now did a reload of YAML (so not full restart) and it did noticed that one dead node and pinged it. Will keep an eye on it to see if I can find a pattern.
That’s really odd that yours works with both integration name and mine doesn’t.
So you see all your zwave entites under ‘listens for’ here:

I do.


You’re not the only one. I also have a “hit or miss” firing on a dead node.