andrew-codechimp / HA-Battery-Notes

A Home Assistant integration to provide battery notes of devices
MIT License
490 stars 87 forks source link

Spurious reset events #1179

Closed DJBenson closed 6 months ago

DJBenson commented 6 months ago

System Health details

System Information

version core-2024.2.3
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.1
os_name Linux
os_version 6.1.74-haos
arch x86_64
timezone Europe/London
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 5000 Installed Version | 1.34.0 Stage | running Available Repositories | 1473 Downloaded Repositories | 88
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 11.5 -- | -- update_channel | stable supervisor_version | supervisor-2024.02.0 agent_version | 1.6.0 docker_version | 24.0.7 disk_total | 251.3 GB disk_used | 151.0 GB healthy | true supported | true board | ova supervisor_api | ok version_api | ok installed_addons | Samba share (12.3.0), Studio Code Server (5.15.0), Mosquitto broker (6.4.0), Advanced SSH & Web Terminal (17.1.1), phpMyAdmin (0.9.1), Let's Encrypt (5.0.15), rtl_433 MQTT Auto Discovery (0.8.1), rtl_433 (0.5.1), MariaDB (2.6.1), AirSonos (4.2.0), Frigate (0.13.2), AppDaemon (0.16.4), Tuya Grab (0.8), Cloudflared (5.1.4), ESPHome (2024.2.0), Z-Wave JS (0.4.4), RTSPtoWeb - WebRTC (1.4.0), Piper (1.4.0), Whisper (1.0.2), Tailscale with features (0.16.0.0), OneDrive Backup (2.3), GivTCP (2.4.3), File editor (5.8.0), openWakeWord (1.8.2), porcupine1 (1.1.0), Zigbee2MQTT (1.35.3-1), TubesZB TI CC2652 FW Flasher (0.2.2), Scrypted (18-jammy-full.s6-v0.93.0), Network UPS Tools (0.13.0), Matter Server (5.2.0), ZigStar TI CC2652P/P7 FW Flasher (0.4.0), appdaemon-predbat (1.0.8), Music Assistant BETA (2.0.0b104)
Dashboards dashboards | 4 -- | -- resources | 53 views | 38 mode | storage
Recorder oldest_recorder_run | January 27, 2024 at 21:03 -- | -- current_recorder_run | February 24, 2024 at 08:54 estimated_db_size | 29770.75 MiB database_engine | mysql database_version | 10.6.12
Solcast PV Forecast can_reach_server | ok -- | -- used_requests | 3 rooftop_site_count | 1

Checklist

Describe the issue

I have just received an alert for one of my Zigbee devices that my battery is low. This device seems to flip/flop between 100, 20 and 1 but I'm going to replace the battery anyway. However I noticed there are battery change logs when I've never changed the battery in this device whilst Battery Notes has been installed.

image

Reproduction steps

  1. Open battery showing error
  2. Check the "Last replaced" history log
  3. Note that there are several entries despite the battery not being replaced / the service called

Debug logs

Debugging enabled after the event.

Diagnostics dump

Will not download - see below - no such issue with Zigbee diagnostics for same device.

image
andrew-codechimp commented 6 months ago

The battery replaced event get's triggered when a battery increases by 25% from it's last reading, unless modified in configuration This is the only way Battery Notes can determine a battery has been changed. If your device is flip flopping between 1 and 100 this is why it would be changed, smaller flip flopping and you could increase the 25% but not much can be done with a device like this I'm afraid.

DJBenson commented 6 months ago

Thanks for this - I'd seen this option but didn't see a use case for it (until now 😄). Will replace the battery and see if it cures the erratic battery values. Thanks for the reply and the excellent plugin!