Method to Poll Device Batteries


I have noticed that when a device battery suddenly dies, my low battery notifications brake. Is there a way to poll devices within Hubitat to alert when they do not respond.


There is a battery monitoring app that I need to lookup the name of, but I primarily use @bptworld 's device watchdog for things like this. It can produce a number of reports and alerts on device status information, including battery status. Alternatively you could also setup some basic RM rules to monitor battery levels and send notifications.

1 Like

[RELEASE] Battery Level Notifications - Developers / Code Share - Hubitat

this one?

Looking at it again, it's actually the notifications built-in app, it includes options to notify on battery levels.

I use a dashboard.

Looks like one of my shades and some motion sensors needs their batteries swapped.

Just pick your device, and select the battery template.

These reports have been mostly accurate. Rechargeable batteries tend to read full then zero rather than tapering down.

Will the built-in app report battery levels if the device in question is not responding because the battery is dead?


My assumption would be no. I am thinking the Notifications app is watching for a change in the battery level and when the updated reading crosses the threshold set in the app, then a notification is sent. So if the physical device is not reporting back to HE, then I wouldn't expect a notification to be sent. I only use this app for monitoring battery levels on devices like my phone and a couple of tablets, where I have setup Tasker to report battery levels via Maker API into a virtual device. These report much more consistently when compared to many battery powered HA sensors, so it is a good, simple option for these phones and tablets.

Thinking about your original question a little more, for other HA devices I would suggest Device Watchdog (or something similar) rather than the Notifications app. Certainly my Samsung contact sensors and some temperature and humidity sensors don't always report a nice gradual decline in the battery level, so activity is probably a better indicator, rather than battery level, in my opinion anyway... Device Watchdog can help keep an eye on this for you, allowing you to set thresholds for the time between updates to a device that may indicate an issue, whether that be battery or comm's. Device Watchdog can also provides the additional benefit of output for display on a dashboard.


Thank you, I am surprised there is not a method for the Hub to ping device response without the need for an external application. This is something the hub is performing internally anyway to initiate communication with each device.

Thank You

1 Like

No worries. A couple of clarifications on my last post...

What I was describing for the use of Device Watchdog was to use it's feature for monitoring the last activity with devices. This is a date/time recorded on every device on the hub, updated (I think) whenever attributes are updated in any way, or possible linked to Events being registered, which may be a larger set of possibilities.

So Device Watchdog itself is not polling the physical device, it is relying on information already being recorded about the device on the HE hub. There is an option to refresh devices leading up to performing some checks in Device Watchdog, but the effect of doing this depends on the driver / device and what effect a device refresh has on updating attribute values or recording Events.

This approach of refreshing a device or even performing some action, such as turning a light on/off to test communications, can work for certain devices, but some, like motion / contact sensors, can be more geared for one-way communication, where the device reports on activity when it detects it, as opposed to responding to commands like a light. So forcing some kind of response from these sensors (I think) can be a difficult thing to achieve across the board.

The reason I was suggesting using Device Watchdog is that, for my setup at least, many of the battery devices such as motion sensors and contact sensors, also report things like temperature or lux, and so have regular activity occurring even when the primary purpose or the sensor has not been activated recently. But again, this may not be the case in all situations, so it is hard to provide an entirely consistent outcome.

All that said, it would be nice to see more features in this space of monitoring device health. There has certainly been huge leaps forward in improving system wide monitoring and alerting, such as those around database size and system load, and RM provides plenty of scope to setup quite advanced monitoring, but more out-of-the-box targeted features are always welcome... I should also add, it would appear there is a general move into this space with things like the ability to perform a ping command and assess the outcome in RM. Not something required for Zigbee / Zwave devices I know, but hopefully an indication of a move in this general direction.



IMO trying to monitor a sleepy device’s battery drain is a losing battle. It never works out anything like what we’ve come to expect from the the rechargeable Li-ion batteries in our phones and laptops. My experience with my smartthings hub before I moved to Hubitat was the same.

Setting notifications based on x time since activity received by the hub has been more reliable for me. Plus that lets me know something might be wrong with a device that’s not specifically related to the battery, but still worth looking into.

I’m no expert in this area, but I think this is a misunderstanding of how the hub and battery powered devices communicate.

Re: why there is no built-in app for monitoring device health, I think this post explains the staff’s reasoning pretty succinctly:


For battery devices like sensors, it’s the other way about,


One more method for you to try, the excellent app developed by Robert, device activity check:

P.S. He has a new version out there...