| name | aircon-scheduler |
| description | Schedule aircon operations using cron. Create sleep schedules, morning routines, and time-based temperature changes. Use when user asks to schedule AC operations, set up sleep mode timing, create morning/evening routines, or automate AC behavior at specific times. Triggers: "schedule aircon", "sleep schedule", "timer", "cron", "wake up warm", "auto off at night", "morning routine", "set timer", "turn off at midnight", "preheat before I wake up"
|
Aircon Scheduler
Create and manage cron jobs for automated aircon control via REST API.
Prerequisites
- Sharp Aircon API running at
http://localhost:3000
- cron available (standard on macOS/Linux)
Verify API is running before creating schedules:
curl -s http://localhost:3000/
Cron Tag Convention
All entries MUST include #aircon tag for identification:
30 22 * * * curl -s ... #aircon sleep-phase1
Sub-tags: sleep-phase1..sleep-phase5, morning, morning-off, evening, away, return, custom-LABEL
Schedule Management
crontab -l | grep '#aircon'
crontab -l | grep -v '#aircon' | crontab -
crontab -l | grep -v '#aircon sleep' | crontab -
(crontab -l 2>/dev/null; cat <<'EOF'
ENTRIES_HERE
EOF
) | crontab -
Workflow
Creating a Schedule
- Ask user for: timing (bedtime/wake or specific times), purpose (sleep/morning/custom)
- Read references/templates.md for season-specific templates and API commands
- Adjust template temperatures for current season (consult smart-aircon skill for optimal values if unsure)
- Show generated cron entries for user review
- After approval, install and verify with
crontab -l | grep '#aircon'
Modifying a Schedule
- List current:
crontab -l | grep '#aircon'
- Remove target group:
crontab -l | grep -v '#aircon GROUP' | crontab -
- Add updated entries
Notes
- cron runs with minimal PATH; curl is typically at
/usr/bin/curl
- Append
>/dev/null 2>&1 before tag to suppress cron mail
- Weekend-only: use
* * * * 0,6 for day-of-week
- Each cron entry runs independently; one failure does not affect others
- Season changes require updating schedule temperatures manually
- For one-time recommendations, use the smart-aircon skill instead