My apologies if this has been covered in depth before, or is a repeat of an existing topic. This is my first post, and while I did try to review the first page of results, and I’m looking at the 'your topic is similar to… helper and not seeing anything quite the same. And I’m long winded, so if someone wants to abstract this… I’m OK with that.
This is likely to involve multiple integrations, if only because most of the devices with batteries are likely to be in different network platforms (wifi, bluetooth, zigbee, z-wave, etc.)
I’d like to see a battery management system (heck I’d like to see a battery management system that tracks the health of UPS batteries too, but that may be a different issue.) most specifically for sensors (motion, temperature, lighting, door/window, etc) that operate on batteries.
I’ve seen YouTube videos that handle a part of this, where you can establish a page that uses yaml to generates a report or even a dashboard, that generates a list or table of devices that use batteries, where the device reports on the battery status along with other things going on with that device.
A part of me would like that to be an integration that does a bit more functionality.
Presumably when someone adds a sensor or device to HomeAssistant one of three things is ‘likely’ to be true. 1 it’s a reasonably new device on the market with specifications available that include what battery it uses, 2 a device the Home Assistant user created, with esphome or otherwise, and while the device may not know what battery type it is running on, the builder/user is likely to know, or 3 at some point the user has opened this device or similar devices, and learned what the battery is. An integration might have an online datastore that this information may be uploaded too for later use, especially for situations in case 3 for things that are no longer quite case 1, but they got some on the used market and are going about installing them. Note that if I have 2 sengled motion sensors, of the same model, and one of them uses 2 AA batteries, it’s reasonable to offer that as the default for the second one. If you have an Aquara version 1 motion sensor and install a version 2 motion sensor, they don’t have the same battery, but if that information isn’t online, there needs to be a way to change the information across the pool of devices that are the same model, or specify types of batteries for specific devices. (The outdoor weather sensor is a modified Aqara environment sensor with the batteries replaced with a 2s4p array of AA batteries that handle the cold better than the CR2450 it came with stock.
The integration tracks the battery level over time, so that it knows that if the battery level was first observed at 50%, and now reads 25%, with no level status updates between those, it can provide some expectation of how much longer the battery may last. Alternatively the user may specify thresholds that say something like "If a battery powered device goes offline for more than a week, or the battery level goes below 20%, mark the battery as possibly needing replacement.
I happen to pick up AA and AAA batteries in bulk at a big-box store, but cr2030, cr2530, or cr1635 batteries are less likely to be in the battery drawer in the kitchen.
One suggestion is to keep track of the inventory of batteries in Grocy, though that may pose issues (I keep both alkaline, and rechargeable AAA batteries in that drawer, if I pull a rechargeable out of a device, once it’s recharged, it’s going to have to be tracked as available again.
Out of this, I’d like to have a setup that reminds me to check/replace batteries on something like the first saturday of the month (arbitrary selection) Friday morning it generates a report listing how many batteries of each type are needed, with annotations of where some may be if in house, or where a good place to by them locally (or online) happens to be. In some cases, if a place like Amazon, BatteriesPlus, or other resource has an option for online ordering batteries with same or next day delivery, the app could perform the order of any needed batteries. On Battery swap day the app takes the list of devices that needs batteries, and guides the home owner from room to room and identifies which devices need which batteries. If the sensor has a light that can be blinked to identify it, a button for that on the page next to the device, would be nice.
Once a battery is replaced, the device goes ‘green’ in the replace-battery report if the battery level is above 80%, and once a room or area is done, move on to the next area. If one of the batteries that are replaced ends up having been grabbed from the ‘dead batteries’ pile, the report may note that, and ask that the battery be replaced again. (I will note that I have some devices where a battery that’s just been unsealed reports as having a 30% state of charge. This may be because the battery was on the shelf for some long period of time, or exposed to wild temperature variations. Or it may be a battery from the dollar store, IDK)
The page may also include devices that HA itself doesn’t manage, but should be going through monthly battery checks (but so few of us do) think smoke and CO detectors that are not tied into the HA yet. I’d think it would not be particularily difficult to have a reminder to press the test button and confirm that it tests OK, or not. to be treated appropriately. This may be particularily useful if you don’t use changes in and out of DST, or equinoxes or solstices as your reminder to replace batteries.
One of the more potentially useful options may be a notification if the battery charge state starts dropping off faster than expected. Think a Lithium Ion battery that has a dumb charge sensor that may go 90% of its charge with the volt meter thinking everything is at a 95% charge, then a week before the battery dies, it starts dropping a percent every couple of hours. This may be particularily important if the sensor is an outside motion sensor, or alarm panel that you’re not going to want to wait three or four weeks to find out has been operating at below expected levels because of the low voltage. For this it would be good if the monitor could interact with the notification system reminding the user to pick up or find a replacement battery for that device. Another variation of this may be a Lithium metal battery like a cr2450 that fails if the temperature gets below -5 degrees C. (I realize the issue is not limited to ce2450 cells.)
That is the fairly high level concept. A summary might be
-HA platform tracks devices with batteries, and managed devices tracks battery levels
-Generates a report monthly on a dow specified, or day of month) of batteries with low battery levels organized as a “x batteries of type y, x’ batteries of type y’” and may include known locations for getting those batteries which may be a user note on that report
- Generates a per-area device list of devices that need batteries, and what battery type, with a button to start/stop identify led on device blinking
- If battery replacement is 'good (over 80% on battery level) mark done and move on to next device/area
- Monitors regularly for unusual battery level changes that reflect concerns for batteries (odd changes to charge level, temperature depended charge loss, etc. and send notifications on those issues to the person responsible for out of cycle battery replacement
- Includes the option of checking unmanaged devices such as smoke detectors, CO detectors, etc. User may also specify what events prompt them to replace batteries in them if regularly done.
Hopefully I’m not stepping on anyone’s toes. It could simply start as a report of all batteries in managed devices that are expected to be online, but the battery level is under 20%, and the report is organized by area then device type. This misses the need of knowing what batteries to be carrying around with you, but it’s a starting point.