I have a couple of Aeotec zw112 door/contact sensors, they seem to have some issue reporting battery level. However it does have some sort of low battery alarm but I don’t know how to get this in a channel or trigged in a rule?
The only indication I get is in the Z-wave log like this:
The low battery warning is the same channel as the battery reading. If the device reports a level of 255 (from memory) then the battery is considered in alarm. This isn’t reported as a separate channel - it’s reported as a 0% battery so you should trigger any rules off the battery level.
Just be aware that once you cross your low battery threshold the rule will keep firing. The approach I took was to do a daily battery check and only report if below my threshold (I have it at 20%). You could also use a fire once until back above threhold system variable / check
would it be possible to post the rule you implemented here because I want to have a better implementation for this. My current implementation simply checks for every battery item on change if it is 0.
@chris: Would be great to have an option to activate a push notification via myopenhab ore something like this if you trigger the Log message ("logger.warn(“NODE {}: BATTERY LOW!”, this.getNode().getNodeId());). Because it’s a really central problem if you have a lot of battery devices. What do yout think.
Of course you can do this if you want. The battery level is provided as an item - from this you can generate whatever notification you like. As I say above, the battery low notification is exactly the same as the battery voltage.
Sorry - I’m obviously missing something - what is the “central problem”?
A central problem for me is the monitoring of the battery level because it feels like one of the devices always wants a n new one. So no central problem of the Z-wave implementation. I was thinking about having something hardcoded for battery alerts in the binding. But after thinking one more time about it it makes no sense because it contradicts the general paradigm of openHAB. I will do it with the rule provided by vzorglub.
Quick disclaimer
This rule was plucked out of the old 1.8 wiki
It has changed a bit since then due to OH version changes but not much
Credit where it’s due