Automate ZwaveJS Ping Dead Nodes?

The only source I’ve seen is the log printout you receive when you use the service. Since there is no date affixed to it, I’m not worried yet.

I did tweak the automation to use the button.service instead and it seems to be working fine.

Updated YAML:

alias: Z-Wave dead node notifier and revive
description: Try to revive Z-wave nodes that are shown as dead by the controller
trigger:
  - alias: When there are Z-wave nodes shown as dead for 10 seconds
    platform: template
    value_template: >-
      {{ expand(integration_entities('Z-Wave JS')) | selectattr("entity_id",
      "search", "node_status") | selectattr('state', 'in', 'dead, unavailable,
      unknown') | map(attribute='entity_id') | list | length() > 0 }}
    for:
      hours: 0
      minutes: 0
      seconds: 10
  - alias: When it's the top of the hour trigger this automation
    platform: time_pattern
    hours: /1
condition:
  - alias: Check that there are Z-wave nodes listed as dead
    condition: template
    value_template: >-
      {{ expand(integration_entities('Z-Wave JS')) | selectattr("entity_id",
      "search", "node_status") | selectattr('state', 'in', 'dead, unavailable,
      unknown') | map(attribute='entity_id') | list | length() > 0 }}
action:
  - alias: >-
      Repeat the actions of notifying Telegram and trying to ping each dead node
      in order to revive it
    repeat:
      for_each: >-
        {{ expand(integration_entities('Z-Wave JS')) | selectattr("entity_id",
        "search", "node_status") | selectattr('state', 'in', 'dead, unavailable,
        unknown') | map(attribute='entity_id') | list }}
      sequence:
        - alias: Send Telegram message via script
          service: script.turn_on
          entity_id: script.notify_handler
          data:
            variables:
              text: >-
                --💀 Z-wave node dead. Trying to revive: {{ repeat.item |
                replace('_node_status','') | replace('_','-') }}
              detail: notice
        - alias: Press the Z-wave ping button to wake the node
          service: button.press
          data: {}
          target:
            entity_id: "{{ repeat.item | replace('sensor.','button.') | replace('_node_status','_ping') }}"
        - alias: >-
            Wait 2 seconds in between each pinged node to prevent flooding of
            network
          delay: "00:00:02"
  - alias: Wait 5 minutes in case this automation is called repeatedly
    delay: "00:05:00"
mode: single
6 Likes

@cbhiii Thanks for sharing your automation.

just as another consideration for the repeated calling at the end, why not ad this condition:

    condition:
      - >
        {{now() - this.attributes.last_triggered > timedelta(minutes=5) if
          this.attributes.last_triggered is not none else true}}

it would simply prevent if from firing. Seems just a bit neater than the wait that is now registering the automation to still be ‘on’/in the process

That’s a great idea. Thanks for that!

OK so I asked the new Bing (which is based on GPT4) when I faced the same problem just now and it gave me the answer.
if you have a variable called entity that contains the entity_id, you can use {{entity}} in the entity_id field
If you are using flow.mediaplayer as a variable that contains the entity_id, you can use {{flow.mediaplayer}} in the entity_id field

Well it’s been fun (not really), but this 700 series software is just half-baked, and change is too slow. I’m now seeing motion sensors that are triggering, but not getting their reports acknowledged for up to 6 seconds which is delaying automations. I don’t need this kind of headache, so I’m moving my entire network back to a 500 series stick. I guess I’ll hang on to this 700 stick in case they ever make it into a reliable piece of tech. Until then, best of luck to you all. -Signed slightly bitter. :joy:

3 Likes

Let us know if all the issues go away. From what I see, these issues, including ones attributed to 700 series, are all Home Assistant related. I don’t see for example, people in the Indigo forum talking about nodes going offline.

1 Like

Unfortunately, the problems have not been solved. I use the current FW from the aeotec z7 stick. In the last two days, all nodes went offline…

I have to restart home assistant…

Do you have any S0 nodes? If you can, try removing and re-adding them without security see if that helps.

I think this is on point. Based on Al Cazone’s advice from another thread, I “upgraded” from the Aeotec 700 stick to the Zooz 700 series stick. I still have problems, but they are different problems. I still have the 500 stick and regularly entertain the idea of going back to it. I’d love to know if going back to the 500 fixes your problems.

1 Like

Yes @bretton.wade, I’m back to a reliable (and mostly carefree) Z-Wave installation again using a 500 series stick. It just works.

I did choose this time to go to a Aeotec Z-Stick Gen5 stick since it could easily be updated to handle the S2 stuff I already had in place on the Zooz 700 stick (vs. my old Nortek GoControl HUSBZB-1 that is stuck without).

In hindsight, it just feels like the 700 stick (or its implementation in either software or hardware) has some issues that can’t easily be overcome; like a beta release with a bug vs. something that should just work. I know everyone’s installation/experiences are different, but for me rolling back was the right way to go and I don’t have any regrets.

2 Likes

Anyone pull the trigger on an 800 series stick, and are those any “better” when it comes to these problems?

I have been using the Zooz 800 USB for the last few weeks and it has been working well for me. I had the Zooz 700 before and had nothing but issues with it even after the firmware upgrade. I did have to exclude each device from the 700 and then include in the 800 as I was not able to get the restore backup function from PC Controller to work.

If you decide to go with the 800 note that there is a firmware upgrade available for it. I recommend upgrading before switching over.

Been using an 800 for a couple weeks and have added 65 out of 120 devices back. Noticing that I am still getting some devices that don’t respond. Oddly though they don’t show as dead nor does a ping help. They have been switches so a manual on/off beings them back. Still adding devices so haven’t done any real troubleshooting but wanted to mention it.

7.18.3 is the latest for the 800, right?

FWIW, I’m having this issue with a Nortek HUSBZB-1. So it seems to affect that device as well.

I am also using the Zooz 800 stick. I just started with Home Assistant maybe 4 weeks ago after deciding to move from SmartThings. I currently have 66 devices on ZWave which are almost all exclusively Zooz Scene controllers, switches, and motions. The other stuff is sensitive contact strips and some zwave outlets.

Now when I first set this up I had issues with Zwave2mqtt sometimes hanging up on adding a device. After the firmware update everything worked without a hitch. Most of my devices have 1 hop or less across 4300 sqft of living space so that has also been a decent experience.

Not sure if it helps but I am also running HAOS on a Dell Optiplex SFF (Intel i3)

Thanks for your experience. Maybe it is worth attempting to get on an 800 stick while thread/matter gets sorted out. Getting the hops down is definitely a good improvement despite these ongoing issues.