How to be sure about z-wave device state?

I recently discovered one of my z-wave switches had gone faulty …

It was stuck to on… but if I sent an off command the items state actually changed to OFF…although nothing actually happened at the device…

How can this be prevented ?? (I had prefered if the items state hadn’t changed…then it would be more obvious that something had went wrong…)

I thought z-wave devices allways reported back the actual status?

Greatful for some information …

If the device becomes faulty there is no way to predict what it might report.

If this is important (e.g. a freezer supply), you would have to add some other device (a simple relay perhaps) that monitored the switches output so that you could detect a fault situation.
Still wouldn’t detect a broken lamp or failed chiller … so perhaps you could use a photocell to monitor light, or a temperature sensor, or whatever is appropriate.

If you manually change the state using the switch, then yes, it will report back the state. Otherwise, if it acks the message, then zwave standards say that we should assume that the command has been implemented.

Also, as @rossko57 points out, if the device is faulty, then don’t expect it to report correctly :wink:

hm… But now even when I have removed the device physically, the item still can be set to ON and OFF from openhab, and in event.log I get "item changed status from …to "…

Why is this so ?? I would have wanted an error message instead… since the item isnt even physically there any more…

The item is still there yet it no longer has a binding. So you can still update the item, but it no longer sends any commands to a channel/binding.

This is just how openhab works - the GUI still sends the command onto the message bus, and will update the state unless you set an option not to do this (I forget how to configure this option).

ah… will try to find that then … it would be better if the device was disabled I think … instead of “dry-changing” the state…

It still wont disable anything - this setting (autoupdate) just removes the link from the command to the state - it won’t impact the handling of errors which needs to be done independently.

but in my opinion (almost) the whole point of z-wave is to get a certain return of the actual status… so this can’t be achieved? (I mean of course with a working device)

Yes - with a working device it is achieved - most of the time. If there are errors, then there can of course be issues.

ZWave states that if a command is acked by the device, then we can assume that it has implemented the request. If there is doubt about that, then the binding will request an update and this will update the state of the device.

If there’s an error, then it won’t be reflected in the state of the item since we probably don’t know the state of the item in an error condition.

ok! thanks for the clearification :slight_smile:

Each z-wave device is marked online or offline in habmin … is this information that can be used some how ? ie put into an item with state online or offline some how ?

No - this is a common request, but at the moment OH/ESH doesn’t provide any way to use this state information.

Ok thanks anyway !

Resurrecting this thread as it may still be relevant.

On

2.5.0-SNAPSHOT Build #1472
openhab> list -s |grep -i zw
238 │ Active   │  80 │ 2.5.0.201812242048     │ org.openhab.binding.zwave

I removed node 018 more than 2 days ago. (on the 23. Remove=just unplugged the Wall-plug)
Have restarted/upgraded with node removed.
It still registers as Online and receives a Healed time even though it’s not there.

Is this expected behaviour?

@chris, any thoughts on this?

Not really - it doesn’t sound right, but it’s hard to comment without more information (ie logs).

My guess though is the controller still thinks the device is connected to the network - otherwise the binding would not know about the node at all. Clearly it should not be online though