Skip to content

Irrigation controller, rolling-day chart fix, keyboard order - #35

Merged
robdevops merged 17 commits into
mainfrom
claude/envirobot-next
Oct 8, 2026
Merged

robdevops merged 17 commits into
mainfrom
claude/envirobot-next

Conversation

@robdevops

Copy link
Copy Markdown
Owner

Summary

  • Irrigation controller (Tuya smart irrigation timer): set with TUYA_DEVICE_ID, TUYA_CLIENT_ID, TUYA_CLIENT_SECRET (optional TUYA_BASE_URL, IRRIGATION_CHECK_HOUR).
    • An Irrigation button replaces Wind on the private-chat keyboard, and typing irrigation, water, tap or sprinkler does the same (in groups when addressed). It sends the status (mode, state with the minutes left, pause with its alerts, battery with its alerts) and buttons: Water (5, 10, 20, 30 min, Off), Pause / Unpause (24h, 48h, 72h), Alerts (enable or disable the battery and pause alerts), Refresh. Every user may press them. A run cannot be started while paused (toast and bold footer), and each action waits 3 seconds before the state is read.
    • A daily check at 18:00 puts the controller on a 24 hour pause when more than 1 mm fell in the last 24 hours or Open-Meteo gives today or tomorrow a 50% or better chance of 1 mm, tells the subscribed chats ("irrigation pause" alert), and warns when the battery is under 5% ("irrigation battery" alert). A watchdog closes the valve after a run, even across a restart.
  • Chart fixes: rain bars of a rolling period start at the bar holding its start (the 1D weather chart no longer has an empty left half); two end-of-line pills that collide at the right edge go on opposite sides of their points.
  • Keyboard: the top row is Help & Alerts, Status, Rain.

Test plan

  • python -m pytest -q: 697 passed
  • python scripts/eval_prompts.py: 87 of 87 pass
  • CI run on this pull request
  • First real run against the controller on the server (nothing here can reach Tuya): press Water 5 minutes and confirm the valve stops by itself

🤖 Generated with Claude Code

https://claude.ai/code/session_01WBwHofjb1g9onaYRdLZMbf


Generated by Claude Code

claude added 17 commits October 8, 2026 07:00
…y alert

A Tuya smart irrigation timer (TUYA_DEVICE_ID, TUYA_CLIENT_ID, TUYA_CLIENT_SECRET): an Irrigation button replaces Wind on the private-chat
keyboard and sends the status with buttons to water 5-30 minutes, delay 24-72 hours or cancel, switch on or off, and (un)subscribe to the
new "irrigation battery" alert. A daily check at 18:00 delays the schedule 24 hours when more than 1 mm fell in the last 24 hours or
Open-Meteo gives today or tomorrow a 50% or better chance of 1 mm, and warns below 5% battery. A watchdog closes the valve after a run.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WBwHofjb1g9onaYRdLZMbf
…-day charts; Status and Rain swapped

- A short message with irrigation, water, tap or sprinkler shows the controller's status and buttons, in private chats and when addressed in
  groups (where only admins may press the buttons).
- Rain bars of a rolling period start at the bar holding its start, not at midnight, so the last 24 hours no longer has an empty left half.
- Two pills that collide at the right edge now go on opposite sides of their points.
- The keyboard's top row is Help & Alerts, Status, Rain.

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
…tus; fix the test for the Water menu

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

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WBwHofjb1g9onaYRdLZMbf
… 2 s after a command before reading the state

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WBwHofjb1g9onaYRdLZMbf
… action waits 3 seconds before the state is read

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WBwHofjb1g9onaYRdLZMbf
… timer (new 'irrigation pause' alert)

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
…status shows the pause alerts

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WBwHofjb1g9onaYRdLZMbf
… time, battery, each alert state in brackets

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WBwHofjb1g9onaYRdLZMbf
…ast and a bold error footer

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WBwHofjb1g9onaYRdLZMbf
…; 'timer' dropped from the labels

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

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WBwHofjb1g9onaYRdLZMbf
@robdevops
robdevops merged commit 995bb34 into main Oct 8, 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