Skip to content

feat: low-pellet + temp-anomaly alerts (always on) - #18

Merged
ctopherwilliams merged 1 commit into
mainfrom
feat/pellet-anomaly-alerts
Jul 5, 2026
Merged

feat: low-pellet + temp-anomaly alerts (always on)#18
ctopherwilliams merged 1 commit into
mainfrom
feat/pellet-anomaly-alerts

Conversation

@ctopherwilliams

Copy link
Copy Markdown
Owner

Summary

Test plan

  • Full smoke suite green (new tests: pellet parsing, alert fire/rearm logic for all three checks, migration round-trip)
  • bandit + pip-audit clean
  • Migration verified against a real copy of the actual 675-row multi-day cook_log.csv -- all rows preserved exactly, no data loss
  • All three checks replayed against the same real historical data with no crash and no false positives

Adds three safety alerts, wired into the same notify()/notify_remote()
pipeline the existing probe alarms use:
  - Low pellets: fires once at <=20% hopper level, re-arms after a refill
    (hysteresis at 30%) so a later re-drop alerts again.
  - Flame-out / pellet jam: fires if the grill has been sustained 40+
    degrees below its set point for 10+ minutes during an active cook --
    long enough to rule out a normal lid-open dip.
  - Firmware error counters: fires on a NEW overheat/lowtemp/bad-
    thermocouple event (these are cumulative lifetime counts, so only an
    increase since this run's first reading is a new event).

Field names (status.pellet_level, usage.error_stats.*) were confirmed
against the real running grill's actual raw status JSON, not guessed.

Extends the CSV schema with 4 new columns. Since cook_log.csv is an
append-only file that predates this schema for existing users, added
migrate_log_schema() -- a one-time, atomic rewrite that realigns an
older file's header with the current column set, run automatically at
the start of poll.py's main(). Verified losslessly against a real copy
of the actual multi-day, 675-row cook_log.csv.
@ctopherwilliams
ctopherwilliams force-pushed the feat/pellet-anomaly-alerts branch from 3c1499d to 66d93cc Compare July 5, 2026 01:53
@ctopherwilliams
ctopherwilliams merged commit 6f45292 into main Jul 5, 2026
4 checks passed
@ctopherwilliams
ctopherwilliams deleted the feat/pellet-anomaly-alerts branch July 5, 2026 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant