Best Practices for Monitoring Battery Devices

Hello, I’d like to avoid reinventing the wheel if at all possible. I currently have several battery-based zwave devices with more on the way. Although I have a solution in place, I’d like to see what others are doing to address the shortcomings in my current approach.

I have a rule setup to monitor the battery level reported by each device in a certain group. The beauty of the rule is that I merely have to add new devices to the group without having to re-write the rule. Once per day, the rule iterates through each member of the group and sends me an email that contains the name of each group member that is below a certain threshold (e.g., 20% remaining battery). But I question the accuracy of the battery measurement and whether this rule will actually be useful for the following reasons:

  • Some of my devices intermittently report values of 0 or 1 for the battery level, then jump back up to 100; and
  • Although I’ve had some of the devices for over a year, they still report 100% battery, which doesn’t seem right.

So my thought is to setup another rule that would maintain a date/time stamp for the last time each device provided an update so that I can send myself an email if a device hasn’t updated in the last 24 hours. Ideally the rule would work the same way - new devices are included in the check by simply adding them to the appropriate group. I would also like to implement this functionality (I think I can do it with maps) without having to use persistence.

I’d appreciate any thoughts on my strategy, as well as best-practice examples of monitoring battery devices.

I just put them in a group and have an alert sent to me when one goes under 20%. I’ve noticed that the battery value gets updated very infrequently (once a week or so) for my devices that support the BATTERY command class at all (darn you Minimotes!). The reported value jumps around a bit but I’ve not had it jump to zero then back up before, at least not yet.

Having a battery device report its battery status much more frequently than that seems mainly to be a way to run down your battery much faster without much real benefit. Maybe sensors that report status more frequently than smoke alarms report more frequently (e.g. door sensors or PIRs).

I don’t see how this is possible. As soon as you reload your file or restart OH you will lose all the Item’s states, your maps, and your timers. So if a device dies and you refresh your rule file before the Timer goes off you will never get an alert.

Also, as I’ve mentioned, not all devices report their battery status that frequently. In my case I’m not sure the battery event gets reported on a set schedule so I don’t know what sort of timer I would set.