Skip to content

Alerts, report and cache clean-ups - #41

Merged
robdevops merged 18 commits into
mainfrom
claude/envirobot-next
Oct 12, 2026
Merged

robdevops merged 18 commits into
mainfrom
claude/envirobot-next

Conversation

@robdevops

Copy link
Copy Markdown
Owner

Report

  • 🔄 Refresh button under the status report (edits the message in place, no toast)
  • The time of day of each section's data in its heading, e.g. Weather station (12:18pm); heading names in bold
  • The rain outlook ("raining now / rain likely soon") is removed everywhere; the report still says it is raining from the current rain rate

Alerts

  • The startup Alerts: line lists the alert types that actually started (same names as the buttons), wrapped at 90 characters; a warning names any that did not start
  • The rain-likely alert is removed
  • Alert kinds renamed: air → particulates, pollen → pollen_and_asthma, irrigation → irrigation_battery; monitors and files renamed to match (ParticulatesMonitor, PollenAndAsthmaMonitor, IrrigationMonitor), saved cursors too

Logs

  • No ecobot: prefix on the main script's lines; other modules keep their names
  • lib/ecowitt/station.py is now source.py, like the other sources
  • Live readings line carries a short summary of the metrics; shorter ADMIN_ONLY, History cache and archive start lines; tool results are logged in full only under 90 characters

Ecowitt cache

  • Readings are keyed by a small series id instead of repeating mac, cycle, group and field (test fixture 1.3 MB → 0.3 MB, identical contents). Values stay text, so outputs are unchanged.

To deploy (stop the bot first)

  1. python scripts/migrate_cache.py <ecowitt_cache.sqlite> (keeps <file>.old; safe to run twice)
  2. Rename the alert kinds and cursors in the state file (one-off script; no compatibility code in the bot). Old alert buttons for the renamed types stop working.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WBwHofjb1g9onaYRdLZMbf


Generated by Claude Code

claude added 18 commits October 10, 2026 11:19
…default: where they are now)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WBwHofjb1g9onaYRdLZMbf
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WBwHofjb1g9onaYRdLZMbf
…resolve, clear unwritable error; Matplotlib cache in the data folder; read the commit without running git

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WBwHofjb1g9onaYRdLZMbf
…start

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WBwHofjb1g9onaYRdLZMbf
Pressing it fetches the report again and redraws it in the same message.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WBwHofjb1g9onaYRdLZMbf
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WBwHofjb1g9onaYRdLZMbf
- Startup Alerts line is built from the alert types that actually started
  (same names as the buttons), wrapped at 90 chars; a warning names any that did not
- Remove the rain-likely alert (the status report's outlook stays)
- Rename kinds air/pollen/irrigation to particulates/pollen_and_asthma/irrigation_battery,
  the monitors and files to match (ParticulatesMonitor, PollenAndAsthmaMonitor,
  IrrigationDailyCheck) and the saved cursors; the irrigation cursor is split into
  irrigation_daily_check and irrigation_watchdog
- History cache startup line: path and size only

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WBwHofjb1g9onaYRdLZMbf
…py); cursor irrigation_monitor; log results under 90 chars

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WBwHofjb1g9onaYRdLZMbf
The weather_now rain_outlook field, the status report's outlook, the rain
chart caption's outlook line and the scoring in outlook.py are gone. The rain
helpers the alerts use live on in lib/ecowitt/rain.py. The status report still
says it is raining, from the current rain rate.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WBwHofjb1g9onaYRdLZMbf
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WBwHofjb1g9onaYRdLZMbf
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WBwHofjb1g9onaYRdLZMbf
…adings summary, archive start line only for long runs

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WBwHofjb1g9onaYRdLZMbf
… its heading

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WBwHofjb1g9onaYRdLZMbf
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WBwHofjb1g9onaYRdLZMbf
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WBwHofjb1g9onaYRdLZMbf
… mac, cycle, group and field

scripts/migrate_cache.py converts an existing file in place (bot stopped); the
fixture in tests/data is converted too (1.3 MB -> 0.3 MB, identical contents).
Values stay text, so every output is unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WBwHofjb1g9onaYRdLZMbf
@robdevops
robdevops merged commit c74a844 into main Oct 12, 2026
3 checks passed
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.

2 participants