Rule triggered if zwave device disconnects

Hi,

Does anyone know a way to trigger a rule of a zwave mode loses its connection? Would be great to have a way of warning me of something has gone wrong…

Dan

You can set up an item that shows if an item is dead (which I guess is what you mean by “disconnected”?).

Something like -:

zwave="node_num:command=info, item=dead"

should do it.

With this in place, you can use this to trigger a rule if the state is true.

1 Like

cool - thank you!

Beware that this is not straightforward for battery operated Z-Wave devices, as evident from various other threads on the topic. Right, Chris?

I have - with some success - used a setup with rules and timers connected to the lastupdate info element of my Z-Wave devices. Basically every time the lastupdate info element changes (indicating that the binding has been in contact with the device) I set a timer. If the timer expires I consider that device to be offline/disconnected/dead. The timer may need to be tweaked for the particular device.

It should (I think?) be ok with battery devices. No device should go to DEAD state - battery or not. Certainly I don’t have battery devices that go DEAD…

Or…

Do you mean that battery devices can pretty much never get marked as FAILED by the controller? This is certainly true, but FAILED and DEAD are different. Nodes go into a DEAD state when the binding can’t talk to them - they go into a FAILED state when the controller thinks they are failed, and I don’t know if I’ve ever seen a battery device get marked FAILED (for sure, it’s hard to get it to this state).

However, you are right, that using the last update is another method to check a device is healthy.

zwave="node_num:command=info, item=LAST_UPDATE"
1 Like

Hmm… maybe I am confusing the matter but in this thread (1) we had a discussion on the topic of monitoring battery operated Z-Wave devices, and as I understood it the bottom line is the following:

Battery devices (in fact any device) won’t go to DEAD unless they timeout with a transmission. Unless the battery device wakes up, it therefore can’t go dead.

Yes - that’s true. I don’t know what the context of the thread was, but it is correct that devices only go DEAD if they timeout transmissions. But this doesn’t mean that battery devices can’t detect a DEAD state which is what I think you were indicating above?

I was probably a bit imprecise in my inital comment above. The thread I referred to was about how to monitor a collection of Z-Wave devices (mains powered and battery operated) and how to detect possible problems, like a node in some way dropping off the network (i.e. no longer responding or publishing data).

I realize that the “DEAD info item” is relevant also for battery operated devices, but my point was that this is not - IMO - a reliable way of detecting if a battery operated device is gone (e.g. due to an empty battery).

Chris, one quick point I noticed is that this item receives an update on the event bus every five seconds, and that doesn’t change if I include a refresh_interval setting. Is that intentional or a bug?

regards,

Dan

The info variables are updated at a fixed rate - I’m not completely sure why this was done, but that is how it is implemented (before my time).

thanks, Chris.