Custom sunrise alarm
Custom-built hardware and software to make every morning pleasant, even under ever-gray winter skies. This is how I built it: the hardware first, then the software that runs the sunrise.
Problem
In December 2023, Vilnius got 2.9 hours of sunshine in the whole month. I wanted my mornings to start with light, so I decided to build a sun.
Research foundation
-
A dawn makes waking easier
People who find mornings hard felt less sleepy after waking to a 30-minute artificial dawn.
-
A 250-lux dawn lifts the mood
A dawn rising from 0 to 250 lux improved mood and well-being after short nights.
-
Bright winter light helps healthy people too
Office workers given bright light in winter had more vitality and fewer depressive symptoms.
-
More lux, more energy
At 1000 lux instead of 200, people felt less sleepy and more energetic.
What’s needed
Parts
- 15 IKEA KAJPLATS bulb, white spectrum
- 4 IKEA KAJPLATS bulb, colour
- 1 Flat cable with E27 lamp holders
- 1 Rewireable plug
- 1 Home Assistant Connect ZBT-2
- 1 Raspberry Pi 5 with Home Assistant
Tools
- Lux meter, UNI-T UT383
- Tape measure
- Utility knife
- Screwdriver
Hardware
Step 01: Lay it out and wire the plug
I laid the cable on the floor along the walls and checked every holder with plain bulbs. Then I cut it to length and wired the plug.
Step 02: Place it and pair the bulbs
Three strips run around the bed, each starting with a colour bulb. The ZBT-2 gives Home Assistant a Thread network, and every bulb pairs over Matter.
Software
Step 03: Set the target
The target is the light at my eyes, staring at the ceiling: 0.1 lux of ember red 30 minutes before the alarm, 250 lux at wake, and 703 lux of cool white 20 minutes later.
| Time | Light | Colour temperature |
|---|---|---|
| 30 min before | 0.1 lux | 1000 K |
| 27.5 min before | 0.5 lux | 1050 K |
| 25 min before | 1.2 lux | 1090 K |
| 22.5 min before | 2.5 lux | 1200 K |
| 20 min before | 5 lux | 1300 K |
| 17.5 min before | 8 lux | 1400 K |
| 15 min before | 13 lux | 1500 K |
| 12.5 min before | 22 lux | 1650 K |
| 10 min before | 35 lux | 1800 K |
| 8 min before | 55 lux | 2000 K |
| 6 min before | 78 lux | 2200 K |
| 5 min before | 95 lux | 2300 K |
| 4 min before | 120 lux | 2400 K |
| 3 min before | 150 lux | 2500 K |
| 2 min before | 185 lux | 2600 K |
| 1 min before | 220 lux | 2700 K |
| At the alarm | 250 lux | 2750 K |
| 5 min after | 300 lux | 3000 K |
| 10 min after | 400 lux | 4000 K |
| 20 min after | 703 lux | 6000 K |
Step 04: Go below 1801 K
In colour-temperature mode the colour bulbs stop at 1801 K. As a raw colour point they go lower, so I send the point where a 1000 K blackbody sits on the colour chart.
Result