DEV Community

Cover image for Set up garden-room-lights, tested weekly against a fake WLED strip
Christian Anderson
Christian Anderson

Posted on

Set up garden-room-lights, tested weekly against a fake WLED strip

garden-room-lights runs the WLED strips in my garden room on a time-of-day schedule: cool and bright for work, warm and low in the evening. I've written a proper setup guide for it, and it's tested every week on a fresh machine.

Testing lights with no lights

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. That's enough to prove the useful bits:

The weekly setup check against a fake WLED unit

  • with no devices.json, it tells you exactly what to copy
  • status sees one unit up and one down
  • --dry-run sends nothing
  • apply --phase work sends the right colour and an in-range brightness, and exits 1 because a unit is missing
  • the optional Home Assistant webhook gets the phase
  • the shipped schedule covers all 24 hours with no gaps

It can't tell you your strips look nice. That bit's still on you.

The README was wrong

My README said the schedule "follows the wall clock in schedule.json's timezone". Writing the guide meant reading the code line by line, and the code never reads that key. 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. The README's fixed and the guide says set the box's timezone.

The setup, short version

Python 3.10+, no packages, at least one WLED strip:

git clone https://github.com/casareanderson/garden-room-lights && cd garden-room-lights
cp devices.example.json devices.json     # each strip's MAC + current IP
python3 gardenroom.py status
python3 gardenroom.py apply --dry-run
python3 gardenroom.py apply
Enter fullscreen mode Exit fullscreen mode

Then a 10-minute cron tick. The script picks the phase from the clock itself, so there's nothing to re-tune when the clocks change.

Brightness before and after the ABL fix

The guide also explains the one thing that confused me for weeks: bri is a share of what each strip can really deliver, because WLED's power limiter makes every raw value above the ceiling look the same. Full guide: docs/SETUP.md.

Anyone else running their lighting from a script instead of HA automations? Curious what made you go that way.


🤖 Drafted with AI assistance from my own homelab notes, logs and repos, then reviewed and edited before publishing.

Top comments (0)