Set up garden-room-lights, tested weekly against a fake WLED strip
Описание и применение
Автоматизация управления светодиодными лентами WLED в садовом помещении с еженедельными тестами на фейковом сервере, подтверждающим корректность API‑запросов и расписания.
Задача
Automating WLED strip lighting schedules on a garden room while ensuring reliable operation without physical LEDs during CI tests.
Результат
The script reliably applies the correct color and brightness for each phase, covers all 24 hours without gaps, and CI tests confirm functionality even without physical LEDs.
Рабочий процесс
- Clone repo
- Copy devices.example.json to devices.json
- Run
python3 gardenroom.py statusto verify devices - Run
python3 gardenroom.py apply --dry-runto simulate changes - Run
python3 gardenroom.py applyto apply schedule - Set up a 10‑minute cron job to trigger the script
Доказательства
GitHub has no LED strips, so the check runs against a fake WLED unit: a 54-line Python server that answers the same three JSON calls the script makes and records what it was sent.
The README was wrong ... It uses the machine's clock. Harmless on my box, which is on UK time anyway, but on a server set to UTC your evening scene would land an hour late all summer.
Python 3.10+, no packages, at least one WLED strip: ... git clone ... cp devices.example.json devices.json ... python3 gardenroom.py status ... python3 gardenroom.py apply --dry-run ... python3 gardenroom.py apply
- Дата записи: 2026-11-03T10:13:56.062Z