An always-on kids' bedside clock with red/green wake-up LEDs. Designed around an ESP8266 microcontroller running ESPHome and driving an Adafruit 1.2" 4-digit 7-segment display (HT16K33) over I2C. Inspired by Lee Hutchinson's Raspberry Pi Zero-based appliance, with the following modifications:
- ESP8266-based hardware running ESPHome
- Red/green wake-up LEDs so my kids know when breakfast is ready
- Home Assistant integration for time synchronization and LED control
- Simplified enclosure assembly with fewer parts.
The LEDs are exposed to Home Assistant as "light" devices and are dimmable; the clock itself is also dimmable. The clock software includes the ability to enable a "breathing" animation inspired by Apple Mac power indicators circa 2010.
This repo does not include Home Assistant automations to activate/deactivate the LEDs. These depend on your needs (and existing HA sensors/automations) and so are up to you. Run wild!
- 1x ESP8266 dev board; I use a Wemos D1 mini. An ESP-32 could also be used with minor software modifications, though it is overkill for this application. More adventurous tinkerers could use a simpler board without the USB TTL, but the D1 mini is inexpensive enough that it is my go-to board.
- 1x Adafruit 1.2" 4-digit 7-segment display with I1C backpack. Note that
Vinneeds to be connected to the ESP's 5V pin, andVioneeds to be connected to 3.3V (logic level). - 3x 5-12V red-green combination LEDs. I made the mistake of buying common-cathode LEDs and hence have a more elaborate 5V high-side driver ciruit; see below. Common-anode LEDs would permit a simpler low-side driver circuit using only NPN transistors.
- 3x NPN transistors (2N3904 or similar)
- 3x PNP transistors (2N3906 or similar)
- 3x 470 Ω resistors
- 3x 430 Ω resistors
- 4x 1k Ω resistors
You could increase/decrease the number of LEDs to suit your needs. You could also drive them individually from 3.3V logic-level pins if brightness is not a concern.
A basic circuit diagram is included below. In the as-built circuit, the LED driver circuit is on the main board, and the LEDs and their resistors are mounted on a separate daughterboard that is attached to the front bezel.
The as-built main board, LED daughterboard, case, and front bezel. CAD source and 3d-printable files (STL) are available in 3d_print/. I used 1/8" smoked acrylic (not shown; cut to 2" x 5") between the 7-segment display and the front bezel.
clockbox.yaml provides the ESPHome configuration. You will also need secrets.yaml providing your WiFi SSID, WiFi password, and an ESPHome OTA password.
Assuming you use ESPHome via the Docker image, plug the ESP dev board into a USB port and flash the code:
docker run --rm --privileged -v /opt/esphome/config:/config \
--device=/dev/ttyUSB0 -it ghcr.io/esphome/esphome run clockbox.yamlVerify in the terminal output (serial monitor) that the ESP connects to your WiFi network. At this point, Home Assistant should detect the clock (navigate to Settings / Devices & Services). Adding the clock to Home Assistant will update its time and will expose the light entities.
After the initial flash, changes can be flashed over WiFi using the same command (useful for updating the clock's software at night without waking your kids).


