ZWave & dead nodes identifying in openHAB2

Hi,

I started migrating to openHAB2. In OH1, there is a way to check, if a ZWave device is dead:
Switch ZWaveNode1Dead "Dead" {zwave="1:command=INFO,item=DEAD"}

Is there a way to do the same in OH2? I don’t know what to put here.
{channel="zwave:serial_zstick:1553934d8ee:???"}

@chris, maybe you can give me a hint? I didn’t find it here in the forums.

Thanks in advance… :slight_smile:

I don’t use zwave, but maybe you have to link this item manually (go to Paper UI -> Configuration -> Things -> Select zwave Thing -> Select More… -> Select the former hidden channel)

Thanks for the idea, Udo. But unfortunately, there are no hidden channels. It should be an option of the ZWave controller, but I couldn’t find it in PaperUI or HABmin.

Currently there’s no channel currently available to do this. If a ZWave device goes DEAD, then the thing is set OFFLINE. I’m a bit hesitant to add channels like this that are ZWave specific as this would seem to be more of a framework issue (ie I guess people might want to know about offline devices in their rules etc - not just for ZWave).

@kai, is there any way to detect this at the moment?

Does DEAD simply translate to “Thing is OFFLINE”?
Then this is really info about the system setup and in OH2 this is not supposed to be modelled through items - instead you should simply check whether the Thing is OFFLINE or not. Currently, this information is not yet available within the textual rules, but this is something we should add.

That’s the way I’ve currently implemented it. DEAD means that the binding can’t currently communicate with the device (all communication timing out), so I mark it OFFLINE. I could change this if it’s not considered correct, but that’s how it’s currently handled.

that the binding can’t currently communicate with the device

This is exactly what OFFLINE is meant for, so yes, your interpretation is fully correct and thus we imho should not have a channel for that (as the information is already on the Thing itself).

That all makes sense. Thanks for the explanation!

FTR, I just created https://github.com/eclipse/smarthome/issues/1654.
If there is any volunteer, please feel free to submit a PR :slight_smile:

Puh, I just took a look at the ESH codebase. The rules stuff seems quite complicated. I’m afraid this is beyond my abilities… :neutral_face:

Is there any progress in this issue? I also would like to write a rule. When a device is offline, I could go to check the device.

@chris, given it seems we are some distance from being able to detect the OFFLINE status of a Thing, if it’s straightforward for you to add an “dead” channel to zwave Things then that would be a fantastic stopgap…

To be honest, since there’s an issue open for ESH I would really prefer this to be solved in the framework rather than having a ZWave specific solution and then having another solution for everything else.

sure - makes sense

have a great Christmas,

Dan

I’m reading through the https://github.com/eclipse/smarthome/issues/1654 posts but I can’t understand if the topic ended up as implemented and added as a function that usable in the rules egine.

I’m trying to figure out what the correct syntax is for calling to see if an item is dead (offline) or not. I want to see if a zwave grid powered device in my garage goes offline. If so I need to take some action.

Erik

I don’t believe it did. My hacky workaround here

1 Like

Just a short question:
How to monitor in a rule if a thing goes offline?
I don’t know the syntax to check if it’s online or offline, because this information is not available as a channel.

1 Like

Options seem to be:

  • my hacky workaround, as linked to above, with an Expect script
  • using REST to query status (beyond my abilities)
  • or it seems there is now a proper method in the latest snapshots (here, but not tested by me)

Dan