Battery Level Notification Issue

Hi all,
First off, great work on the Hubitat and it's many features. It's been performing admirably so far.

I think already found the issue and I wanted to document it to bring it to the developer's attention so that they can take a look and hopefully make an update. And hopefully this issue isn't the same with the other rule triggers.

I have an RM4 rule setup to alert me whenever any of my battery powered sensors reports anything under 15%. In this rule there are over a dozen sensors and a push notification sent to my phone listing what %device% reported the low battery. Some of my sensors were already below that threshold already when I created the rule. It appears that the Rule doesn't get called until a sensor actually reports a battery level. So what happened was that my door lock was the first thing to report a level and it was at 71, which is obviously above the threshold, but it still triggered the RM event and sent a notification to my phone with the lock being the device that reported low battery. After thinking I screwed up the Rule and double, double checking how it's setup I realized that what may be happening is that the lock battery report called the rule, the rule resulted in a 'true' condition because other sensors were already below that level. Then the %device% sent in the notification happened to be the device that called the rule and not the sensor that actually created the 'true' condition.

This is how I was able to prove it out; I forced a refresh from my lock, battery came back above 15% and I still got a notification with my lock as the low battery device. I repeated this twice with the same result. I then removed the 2 sensors from the rule that were already below that level and repeated the test, this time no notification. Put the 2 sensors back in and the bad notification returned. I replaced all the low batteries and repeated the test and did not receive any notification.

I think that this scenario will result in many, many unneeded notifications, in my case, if a sensor reports back less the 15% I'll get a notification, great. But... every subsequent battery level report from every other sensor will also trigger another notification. And since the %device% listed in the notification it is the device that calls the rule and not the one that satisfies the trigger I'll get a notification that every sensor has a low battery.

Please take a look and let me know what you find and if my assertions are accurate or I have something else screwed up.

Thanks

Hey Mark(sorry for the typo!)- Welcome !

please post your rule build page.

PS battery reporting on many devices is poor at best, mostly due to lithium's discharge curve, which is charged-> dead, no gradual decline like alkaline or lead. In the last ~4 years, out of changing over 100 batteries, I'd say I have received maybe 15% accurate reports, between 2 years on ST and almost 2 on HE.

PS there's also an app for this, on this forum

2 Likes

I use 40% as my minimum battery level, as anything below that seems unreliable. Probably change a few batteries before I need to, but have not had any devices die on me.

Hi Rxich
(it's Mark, actually) :slight_smile:
Yea, I saw that app, too. I'm just converting from ST to HE so I'm starting simple. (Believe me, I lived batteries for 2 decades and I know much more than I care to about them.) In any event, yea, I know that LI battery monitoring is a challenge. I'll probably change over to this app later, I'm more concerned about how RM4 reacts to this trigger situation and wanted to bring it to Hubitat's attention.

Mark

and tagging @bravenel, as RM is his baby ?

@wecoyote5 I would think of creating a rule for each device so that these issues go away. It’s not that much work, and you can have different messages for each device, such as URGENT! Siren Battery Low! for a battery siren but have it say thermostat battery low for a thermostat.

1 Like

Need to see the rule to have a clue what's going on.

1 Like

Hello,

Here's what I have...
Rule...


Trigger...

Thanks and let me know if you need any other info.

I've thought of that but why if the feature is there to select multiple?

When I started this rule 2 out of those sensors were at 12% 161 and B40. My lock (150) was the first to report a level of 71 and I still got a notification that 150 is reporting low battery.
You can read the rest of my debug steps above.

Thanks. I will look into it. It would be helpful if you turn on all logging for this rule.

And, if it happens again, grab screenshots of the logs for the rule.

Will do!

Actually I was using the logs when this was happening and remember the gist of them. The order if I recall correctly was '150 Battery at 71'...'Battery Check: 150 Battery 71'...'Action: Notify Phone_Mark....'
Now all the logging options are checked and I'll see if I can re-create when I get a chance.

I realize you are reporting this mostly as a RM issue, and appreciate you for doing it. I just wanted to mention that you can look in the events on the device page and see how often a device is reporting its battery %. I stopped trying to get battery notifications on most of my button controllers once I discovered that many of mine only report when initially joined. They still say 100% after they have died and fallen off the mesh. My motion and contact sensors are much more reliable at reporting, but use CR2 and AA batteries. It all depends upon the device's reporting interval. Also, I have never seen anything below 30% in a functioning device using lithium batteries.

Hi Ken,
I know battery reporting is flakey at best (not an HE/RM issue for sure). My concern was why the 'action' was still taking place even though the device calling the rule wasn't the reason for the 'trigger' to be satisfied. I hoping it's something I did as I'm new to the HE setup, but the debugging effort has led me down the road to where I need the assistance of the RM guy.

Hi @bravenel
I just upped the threshold to 40 which put 2 of my sensors below. I then refreshed the battery level from the lock, 150 and I received a notification that 150 have a low battery. Here is the log...

dev:12020-08-05 07:00:56.396 pm infoMessage:[150 Has Reported Low Battery], was sent to Phone_Monica

app:632020-08-05 07:00:56.289 pm infoAction: Notify Phone_Monica, Phone_Mark: '%device% Has Reported Low Battery'

app:632020-08-05 07:00:56.252 pm infoBattery Check Triggered

app:632020-08-05 07:00:56.122 pm infoBattery Check: 150 battery 49

dev:82020-08-05 07:00:55.964 pm info150 battery is 49%

dev:82020-08-05 07:00:55.960 pm debugBatteryReport: BatteryReport(batteryLevel:49)

dev:82020-08-05 07:00:55.948 pm debugparse: zw device: 06, command: 8003, payload: 31 , isMulticast: false

dev:82020-08-05 07:00:54.096 pm info150 is locked [digital]

dev:82020-08-05 07:00:54.092 pm debugDoorLockOperationReport: DoorLockOperationReport(doorCondition:0, doorLockMode:255, insideDoorHandlesMode:0, lockTimeoutMinutes:254, lockTimeoutSeconds:254, outsideDoorHandlesMode:0)

dev:82020-08-05 07:00:54.073 pm debugparse: zw device: 06, command: 6203, payload: FF 00 00 FE FE , isMulticast: false

Hope that helps.

Can you do a screenshot of the logs instead of copy/paste?

Sure...

I had to do it again as I closed the log window so these might not match 100% but the result was the same.

What driver is used for device 150?

Schlage BE468/BE469 Lock

Which has been working so far.

OK, I see the problem. It is looking at all of the lock battery values when triggered, not just the one that triggers it. So, it's finding one that is below the value, and then reporting that with the device that sent the battery event. Will dig into fixing that.