Battery monitoring that actually works?

I've had an HSM rule in place to monitor and alert me of low battery conditions for several months, but I've only ever gotten one message from it. I had a generic contact sensor device fail today with no notification, and I'm wondering what can be done about it.

AFAIK my battery level rule is setup in a fairly standard way. It's a custom HSM monitoring rule that monitors "Battery Levels", "All Batteries", Alert below 15 (I assume this is percent?), notify once per day to my pushover device. Again, it notified me once so I assume the pushover notification part actually works.

I have a couple of questions:

  1. how can I test that the rule actually works?
  2. does anybody have this working reliably?
  3. what are best practices for getting this critical piece of the puzzle working?


What was the battery level reported by the device? What did it show as the level in HE?

Yeah I don't know since i just changed it out to get my a/c to come on. I have other devices of a similar type that seem to be reporting correctly, or close enough. They seem to report in increments of 10, 87%, 77%, 37% etc.

I'd really just like to devise a test case of some sort, like a virtual device with a battery level that I can set by hand.

You can see in the event history for the device. You can filter the events listing for battery events also.

oh yeah... well that's interesting. It's got temp and contact state reports going back several weeks, but no battery level. This despite the fact that a battery level of 100 now shows in the device info in hubitat since replacing the battery.

If you don't find any reports in the events for battery that means that the device never reported back the battery level. Not much Hubitat can do about that.

Yeah but that doesn't make sense since I have devices that are reporting a battery level of 77% but I can't find any reports for them either. That has to have come from somewhere. It's using the hubitat generic zigbee driver fwiw.

If you filter for battery events you find none at all? I have one that's first battery report is from back in February.

It actually shows the very first battery event from over a year ago too. Make sure you type it in case sensitive. Has to be "battery".

No I see them now. OK the device that failed had a last report of 77% uh... last year. And then another today at 100% when I changed the battery.

Is it an Iris?

It is difficult to predict battery levels. Devices may not report properly. They generally only report changes. In my experience batteries fail far earlier than 15% and probably a lot closer to 50%. Usable voltage levels for most electronic devices are just a few tenths below full voltage. A 1.5-volt battery will be done at 1.2 volts

No its... this Visonic MCT-340 E Wireless Door Window Temperature Sensor 2.4ghz ZigBee

I seem to have a lot of devices that haven't reported any batter level since the same day last october.

Yeah....unfortunately, in order to be as low-power as possible, there is no heartbeat between the hub and the device and the hub only knows the battery when the device reports it. The device should really wake up and report large changes in battery, but if it falls off suddenly, which happens with cheap batteries, it may not have enough juice once it realizes it's low to still report that. The hub only knows that the device hasn't reported, it can't tell the difference between a device that is asleep or one that is dead. The only thing you can do is institute a check of the devices on a periodic basis either manually or through an app like device watchdog which might catch a device that is dead. But odds are you're going to catch it first.

This is why alarms are either wired, so failure of the sensor is detected, or have a wireless heartbeat to let the hub know it's okay.

1 Like

All of my contact sensors are those same models. I've noticed a few of mine with no activity but I think in my case it was because the zigbee mesh wasn't up to snuff yet. I purchased a few more peanut outlet devices and for the most part the problem went away.

I also go into my devices list on my hubitat interface and sort by last activity to see if any devices need me to go tickle them a bit.

I'm probably just going to implement a regular battery replacement schedule twice a year whether they need it or not.

Twice a year is going to be expensive and a bit overkill. Most devices have a battery life of at least two years so once a year should be plenty. But you do what makes you comfortable. My system, at least from the security side, is not dependent on any one device. So, even if one or two sensors die, there are still enough other that will trip and sound the alarm.

I have many devices that don't report accurate battery % Smartthings Motion sensors that have been on 0% for over a month but still work fine daily, Locks that have never varied off of 100% (assuming it's a Lithium instead of "recommended" Alkaline battery usage).

Instead of this I would highly recommend using this app [RELEASE] Device Watchdog and worry less about what the battery % states and just check your Dashboard or pushover notifications periodically to insure that every device has "checked in" within that last day.

For example, the above screenshot in "device watchdog status 2" panel you'll see "Freezer 1" hasn't checked in since last night at 10:14PM, this device monitors temperature and usually updates every 10-15 minutes. Since it hasn't reported in over 12 hours I knew to change the battery.

1 Like

I'm probably just going to implement a regular battery replacement schedule twice a year whether they need it or not.

I mean that will work for the batteries, but if the devices are falling off the mesh network what good are they really?? You would have a contact sensor that isn't talking to the hub.

Funny story that I can't fully explain. I checked my contact sensors after I made the post above and noticed my kitchen window sensor wasn't updating to the hub. I went to look at it opened the window and closed the window and it still didn't update. I then remembered I had a peanut outlet in the kitchen that I moved to the garage. I ordered another peanut sensor. Also on that day I finished my conversion and moved all my light bulbs over from wink to habitat. That night at about midnight HSM went off. I couldn't figure out why, I didn't get any alerts like I should have. the next day I started digging into the logs and at midnight the kitchen window sensor said the kitchen window was opened. The only thing I can assume is the mesh healed (I had added a few bulbs in the kitchen that same day) and for some reason it reported me opening the window that morning at midnight when the mesh healed.