Push notifications for stale data and failing jobs (ntfy/webhook) #49

Open
opened 2026-07-17 03:09:33 +00:00 by claude-bot · 0 comments
Contributor

Add an optional NOTIFY_WEBHOOK_URL (ntfy-compatible POST) and a daily check job in the existing background-jobs framework that fires on: no new usage rows in N days (configurable, default 35 — one missed monthly import), M consecutive failed jobs for a home, or a calculation stuck failed. Include home name and reason. No new infrastructure: reuse the jobs table, scheduling, and the fetch-timeout helper from #31.

Rationale: the backend already computes staleness and job failure but surfaces them only inside the app. A homelab operator's real failure mode is not opening the app — imports quietly stop and weeks later the numbers are fiction.

Acceptance criteria

  • Webhook fires for stale usage, job-failure streak, failed calculation
  • Silent when unconfigured; one notification per condition per day max
  • Documented in README env table

Relations: relates to #13 (shares the sync/job machinery), #31

(Audit finding F-30, 2026-07-16 — feature, ranked #5)

Add an optional `NOTIFY_WEBHOOK_URL` (ntfy-compatible POST) and a daily check job in the existing background-jobs framework that fires on: no new usage rows in N days (configurable, default 35 — one missed monthly import), M consecutive failed jobs for a home, or a calculation stuck failed. Include home name and reason. No new infrastructure: reuse the jobs table, scheduling, and the fetch-timeout helper from #31. Rationale: the backend already computes staleness and job failure but surfaces them only inside the app. A homelab operator's real failure mode is *not opening the app* — imports quietly stop and weeks later the numbers are fiction. **Acceptance criteria** - [ ] Webhook fires for stale usage, job-failure streak, failed calculation - [ ] Silent when unconfigured; one notification per condition per day max - [ ] Documented in README env table **Relations:** relates to #13 (shares the sync/job machinery), #31 *(Audit finding F-30, 2026-07-16 — feature, ranked #5)*
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rbrooks/BatteryStorageCalculator#49
No description provided.