How can I detect - is a value actual - or maybe the sensor did not send values a long time?
As sample door sensor:
I see (just now):
{"name":"level","type":"bool","value":true,"updateTime":1365743975,"invalidateTime":1364368726}
it means: invalidate time: March,72 7:18:46 GMT
and update time: today, 5:19:35 GMT
Here is now 6:10 GMT - so for me it is not clear - maybe I did not got any values last 50 minutes? Or is the state still valid? How to check it?
Thanks
Michael
how to detect unreachable sensor / invalid values?
The value is valid (means
The value is valid (means reported since last request) when .updateTime > .invalidateTime. When Get is sent, the .invalidateTime is update. On Report the .updateTime is update.
but how to detect then a
but how to detect then a missing device?
UpdateTime - it is the last updated value, will be > invalidateTime (in normal case)
If device is not sending more values (maybe defect or out of range etc) - how can I request the last contact to the device?
I just use:
/ZWaveAPI/Run/devices[xx].instances[0].commandClasses[132].data.lastWakeup.value
Here I get the last actual value (timestamp) - is this a correct way?
Michael
UpdateTime - it is the last updated value, will be > invalidateTime (in normal case)
If device is not sending more values (maybe defect or out of range etc) - how can I request the last contact to the device?
I just use:
/ZWaveAPI/Run/devices[xx].instances[0].commandClasses[132].data.lastWakeup.value
Here I get the last actual value (timestamp) - is this a correct way?
Michael
A mains powered device will
A mains powered device will be marked with devices[X].data.isFailed flag, while for battery you need to look at lastWakeup and compare with wakeupInterval (if Wakeup is supported). For a remote without Wakeup it is just not possible to know if it is still in the appartment or not (unless someone press a button)