Battery issues

Because of the low power needs of some of these newer devices and the convenience of wireless, it seems more and more devices use batteries. However, I have some observations and concerns.

Not all devices are reporting battery status. I’m not sure if this is a SmartThings issue or the device. How do you go about diagnosing this?

What is the “standard” for a battery alarm. I received a push notification from one device when it reached 10% and another at 1%. And how do we control this delivery. To me low battery is less important than a smoke alarm or water leak. I would rather send it as SMS than push or some other option like e-mail.

With my 54 devices, it gets rather difficult managing which needs its battery changed and when. It would be nice to have a screen that lists all the battery status we can sort.

It wouldn’t be so bad if devices could better handle rechargables because you could just periodically replace with a fully charged battery. Otherwise, with disposables, you want to get your money’s worth so to speak and use it till it is nearly dead.

3 Likes

+1 on this. This is a great idea.

Very good idea!!!

I created a SmartApp that will show battery levels for all devices on a single screen. It’s not the prettiest view, but you can see everything at once. I have a few ideas to make it cleaner that I’ll try when I have some free time. Check it out at https://github.com/notoriousbdg/SmartThings.BatteryMonitor.

1 Like

Nice work! All my devices that report battery are showing up.

Now if it were possible to merge this with the Dashboard to see battery in the tiles…wow

@notoriousbdg

Great work!

It is nice you can select the desired devices because powered devices with battery options always show 100%. Of my 16 battery devices, one is null, one 100% (but six months old), and one 208%. The one returning “OK” fails on line 117.

Powerful app.

I wish that was possible too…

I just uploaded a new version that improves formatting of the status page and moves status to the main page. It seems a lot more readable now and much easier to find the batteries that need attention. The latest version should lump devices that are null, > 100 or have unknown strings in the battery error section.

Devices with “OK” status should now be included in the battery high section, but I can’t test that myself. Do you know the other states returned by that device? I can force those into the appropriate sections to make them display better.

Do you know what 208 represents? I assume it’s not percentage.

Can you try the latest version at https://github.com/notoriousbdg/SmartThings.BatteryMonitor and let me know if it works better?

Still fails on OK. I wouldn’t worry about this right now since this is a Nest Protect which I haven’t really tested yet. The code indicates “OK” and “Low” the two values.

It is a FortrezZ moisture sensor which must be malfunctioning. Says 208 percent. Another reason this app is important!

I think line 159 should be:

    title:          "Medium battery threshold?",

instead of Low.

New layout is much more useful!

Again, a must have app!

@notoriousbdg

Error for OK is:

java.lang.NumberFormatException @ line 82

“Low” should show under the battery low section.

Fixed.

That was leftover code from before I updated the formatting of the status page. I removed that line. Do you mind testing the latest version?

Updated again. This time to add notifications.

Still getting error at line 82, but don’t know if same cause. I need to contact support to remove app for me because I get an error when I try.

Try removing you nest protect from the devices list to see if it will allow you uninstall. Is the error the same as before?

You can also uninstall the app manually from https://graph.api.smartthings.com/location/list. On that page, click on smartapps, then click edit, then click uninstall beside the BatteryMonitor SmartApp,

I looked through the code and I have a suspicion about what’s causing the error with OK. I just checked in a change that should handle strings better.

Still get the error at line 82 for the Nest Protect. That device isn’t working anyway…

You need to add the following after line 92 to catch my 208% charged battery:

			} else {
				listLevel0 += "$it.currentBattery  $it.displayName\n"
			}

I just checked in that fix and code to handle < 0 if that happens.

I was able to reproduce the error and I’m pretty confident now that the battery attribute must be an an integer. The SmartApp will group battery statuses that are strings into the error section and it will throw a notification stating that a string was returned. The Nest Protect device type that you’re using needs to be updated to return a number for battery or use a different attribute than battery.

Thanks, I figured something like that since I read this in another thread. Sorry if you wasted time on this.