Vera device extended attributes ?
-
Try also update the LastWakeupTime to be the same as LastTrip and reset the sensor failure with the setFailure command in luup code for that device or maybe even waking them up manually. I think these devices may not be waking up at all or may just happen to be waking up when your zwave network is doing something else like a heal or an nnu so it is missing them every time.
-
Try also update the LastWakeupTime to be the same as LastTrip and reset the sensor failure with the setFailure command in luup code for that device or maybe even waking them up manually. I think these devices may not be waking up at all or may just happen to be waking up when your zwave network is doing something else like a heal or an nnu so it is missing them every time.
@rafale77 Looking at one of the motion sensors that has "Can't detect device" on it now, its lastwakeup time is: 1606495613 or Friday, 27 November 2020 16:46:53
Its an Everspring SP816-1 outdoor one. Looking in its user manual it does say its maximum wakeup interval is 1 day, so I should be OK with 86400 seconds I have it set as.
Wonder why its not waking up? It's still detecting motion events perfectly fine. Might have to take it down and check the batteries and wake it up manually.
-
Yep that's the problem. The vera tags its battery operated devices as "can't detect" using this variable. For your information:
WakeupInterval is a parameter of the vera. It is the interval the vera is going to measure to as it expects the device to update.
ConfiguredWakeupInterval is a parameter stored in the device. It is the number the vera got the last time the device was configured and told the vera that's the setting it has.
LastWakeup is the date the last time the vera saw the device to have woken up.The logic in the vera is as I said before, "if os.time() - LastWakeup > WakeupInterval*2 then set Device fail =1"....
Now more funny... The device wakes up to its lifeline associated group. (group 1). It is possible that your device was not completely configured and that the association was not setup correctly. The best way to know is to wake the device up to see if you see the variable. If not then try reconfiguring.
More fun... some devices won't accept any other nodeID than "1" in this association group so if your vera's zwave has a different ID... well it will never report to the vera that it has woken up. -
Yep that's the problem. The vera tags its battery operated devices as "can't detect" using this variable. For your information:
WakeupInterval is a parameter of the vera. It is the interval the vera is going to measure to as it expects the device to update.
ConfiguredWakeupInterval is a parameter stored in the device. It is the number the vera got the last time the device was configured and told the vera that's the setting it has.
LastWakeup is the date the last time the vera saw the device to have woken up.The logic in the vera is as I said before, "if os.time() - LastWakeup > WakeupInterval*2 then set Device fail =1"....
Now more funny... The device wakes up to its lifeline associated group. (group 1). It is possible that your device was not completely configured and that the association was not setup correctly. The best way to know is to wake the device up to see if you see the variable. If not then try reconfiguring.
More fun... some devices won't accept any other nodeID than "1" in this association group so if your vera's zwave has a different ID... well it will never report to the vera that it has woken up.@rafale77 said in Vera device extended attributes ?:
WakeupInterval is a parameter of the vera. It is the interval the vera is going to measure to as it expects the device to update.
ConfiguredWakeupInterval is a parameter stored in the deviceConfiguredWakeupInterval on both of these motion sensor is
86400 I can see this value on each device.The WakeupInterval on both of these motion sensor is
86400 I can see this value on each device.I've just woken up the Neo Cool Cam one that had the missing LastWakeUp value and its still missing. I then polled it OK but still no LastWakeUp field showing up. Might have to try and reconfigure it.
As for the Everspring one outside, Vera says it hasn't woken up since November LOL. I'll have to take it down and have a look also.
-
Idea popping in my head to make this behave more like z-way... have a scene to update the LastWakeup variable every time the Tripped variable changes... That would be a quick patch to overcome the stupidity of the firmware.
-
It's possible to do it on the MSR but this is the version on the vera:
- Create a scene with trigger being your sensor's tripped event (tripped or untripped)
- Add the following lua code as the scene lua:
local dev = --the device id of the sensor-- local t = os.time() luup.variable_set("urn:micasaverde-com:serviceId:ZWaveDevice1", "LastWakeup", t, dev) if luup.variable_get("urn:micasaverde-com:serviceId:HaDevice1", "CommFailure", dev)=="1" then luup.set_failure(false,dev) end
Done...
You could possibly even implement this to all sensors by making it a function and set a variable watch on all the tripped values in the startup lua... After this, you would also have to run
-
I ran the code against the other Neo Cool Cam motion sensor with the missing LastWakeUp field and now that field is present and up to date with that time stamp.
I've setup two functions in the Vera startup for each motion sensor to run this LUA code and two MSR rules to trigger upon their motion being tripped etc.
-
Note that if you don't trip these sensors regularly, you will still see a problem eventually so it is best to fix the wakeup. If they get tripped regularly then you don't need to worry too much about it.
On your last edit: Please ensure to use the code I updated. I made a mistake the first time around using the wrong service ID.
-
This is what I have in the functions:
-- Porch Motion Sensor Fix LastWakeUp and Can't Detect Device Errors function PorchMotionSensorFix() luup.log('VeraScenes.PorchMotionSensorFix') local dev = 304 local t = os.time() luup.variable_set("urn:micasaverde-com:serviceId:ZWaveDevice1", "LastWakeup", t, dev) if luup.variable_get("urn:micasaverde-com:serviceId:HaDevice1", "CommFailure", dev)=="1" then luup.set_failure(false,dev) end end
-- Lounge Motion Sensor Fix LastWakeUp and Can't Detect Device Errors function LoungeMotionSensorFix() luup.log('VeraScenes.LoungeMotionSensorFix') local dev = 331 local t = os.time() luup.variable_set("urn:micasaverde-com:serviceId:ZWaveDevice1", "LastWakeup", t, dev) if luup.variable_get("urn:micasaverde-com:serviceId:HaDevice1", "CommFailure", dev)=="1" then luup.set_failure(false,dev) end end
-
Yup it should work. I don't see why it would flag them as failed again... The firmware checks every 10min so you have to wait 10min to be sure it doesn't come back.
-
OK Ill take it down the Everspring from the Porch and have a look at it.
The Neo Cool Cam is also giving me this same "Can't detect device" error that one never even had a LastWakeUp variable present, until I ran your code.
I have a Fibaro motion sensor and that seems OK though.
-
Ok I now have another recollection of a mechanism by which the vera flags these devices as failed... It is from the database in the zwave chip itself. The only way to reset this on the vera is to get the device reconfigured because a flag was set at the serial level. On Z-way you can remove this flag with a click but the vera doesn't offer this option. So... you should not see these anymore after you have the devices reconfigured. The way I previously addressed this was running the vera on a USB stick and then stick it into a windows PC and use the PC controller software from silabs to reset the failed flag before sticking it back into the vera. there should also be a serial command from the command line to do this on the vera but I forgot...