battery: low-battery alert module (v0.13.0)

BatteryAlertModule + BatteryAlertService wired into app.module like
the weather module. Every BATTERY_CHECK_INTERVAL_MS (default 60 s) the
service scans the node state backing GET /api/nodes and broadcasts a
single-packet '⚠️ @!<8-hex> battery low: <X>% (<name>)' alert for every
node at or below BATTERY_ALERT_THRESHOLD percent (default 20, <= on
purpose) not alerted within BATTERY_ALERT_COOLDOWN_MS (default 6 h,
in-memory map — resets on restart). Sends ride the pinned send channel
via MeshService.sendText like every other bot send.
This commit is contained in:
2026-09-25 12:39:45 +00:00
parent 8ddd91d4b5
commit d0b71e6e91
7 changed files with 339 additions and 2 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "mesh-bot",
"version": "0.12.8",
"version": "0.13.0",
"description": "",
"author": "",
"private": true,