Battery Status Rules

Has anyone created a rule that will give you a low battery status for your battery operated devices? I want to create a rule that when any battery based device drops to 20% or lower, I get a text or Hubitat app notification so I know to change the battery. I checked a few of the older threads and didn't see a way to do something like this by device type. Maybe I missed it.

You could do this with Rule Machine, but there are lots of easier options. Hubitat Safety Monitor can monitor battery levels, but if you prefer to keep this separate from that, the Notifications app would be an easy alternative: just select that you want to get notified about battery, choose your devices, type in the level and other options, and choose your notification device.

That being said, an app I frequently recommend instead is Device Watchdog. It can monitor battery levels, but I don't use it for that; I just use it to monitor device activity--something it can do that no built-in option I know of can do. I know battery-level monitoring sounds nice and proactive, but the reality is that it's hard to make work well for most devices. First, Zigbee devices (and probably others; I just don't know as much about them) report battery level as belonging to a specific tier/range, which you can read about in this helpful post on the ST forum (different platform, but same here because it's the device that does this). Second, the lithium batteries that many current sensors take do not have a linear discharge curve (if graphing voltage); they generally plateau then quickly fall as they reach end of life, so estimating level based on voltage is tricky in the first place. If you haven't looked at your battery levels and the recent history when they are dead, you might be surprised by how tricky it would be to come up with a rule or battery level that works well for even one device every time, much less all your devices. Monitoring activity also requires some knowledge--how long you're willing to wait before you think a device must have died or fallen off (most of my devices check in at least once every few hours, and I have a few instances of DW installed to accommodate differences)--but I find it to be more reliable. It is, of course, not as proactive, so you certainly could combine this with battery monitoring if you want to, as well--just thought I'd mention that battery alone isn't as good as it sounds in many people's experience. :slight_smile:


I use the built in Notification app for this purpose. You may have to install it if you haven't yet. Under Apps click the "Add built in App" button. The notification is really easy to set up.

Yes What @bertabcd1234 said LOL. I'm not fast enough.

You guys rock. That is way simpler than building a new rule for this. Didnt even know it was an option. I will check it out. :+1:


This has been my experience. I have almost never found battery life reported by devices to be reliable/useful with both smartthings and hubitat.


Mark what are you using then?

I have found @bptworld's device watchdog to be more useful, like @bertabcd mentioned.

I have a few different instances of that app installed as well, based roughly on type of device I want to monitor. For example, if a motion detector or contact sensor hasn't had some activity at least once a day, I know something must be wrong with it so I'll go check it out. My battery powered smoke detectors, on the other hand, don't check in as often even when they're working fine, so I have a different device watchdog instance monitoring those that doesn't alert me until a longer period of time elapses.

1 Like

There is also the famous, last-resort, manual method.

For example, checking if the water leak sensors work, manually, once a month. At the same time, checking their batteries. I hate to even suggest this approach on a site dedicated to Home Automation, but ...

It would be very useful if we could record new battery install dates for devices to determine more readily if a device is consuming too much. I have had cases with door locks that would make this very convenient. It is a matter of having the time to find a piece of tape and write the date on it and the tape comes off and you loose track of when you changed the batteries last.

I've been considering writing an app that does this to more accurately predict battery percentage. If there's enough interest I'll go ahead with it.

How do you accurately predict battery percentage?

An old installer with a lot of experience once told me to check a brand new battery of the same type that I was looking at. If the battery in the sensor is less than 10% less, then replace the battery in the sensor.
Most of these sensors, should have 3.3V. (I presume).

(Drain * time) / capacity should get pretty close once an appropriate cutoff voltage is found. I'd need to include several options for the user such as starting voltage and voltage cutoff if known, battery chemistry, as well as some canned configs for popular brands of batteries and sensors. Just about anything would be better than what we currently have though.

1 Like

I agree that (almost) anything would be better than what we have.
I've also found out, (much to my chagrin) that although you might tell a zigbee sensor to report every N hours on battery status, it doesn't have to respond! You may have to take that into account.