This was a thing I made my kids after buying and becoming 🤯 frustrated with many different commercial offerings/[duckduckgo] that:
- Lost track of time if unplugged
- Manually updating time was hard and fiddly
- Didn't update the time for daylight savings
- Updating the config or time required it being in 'awake' mode, lighting up a dark room
- Couldn't be easily adjusted for weekends or ad-hoc for holidays/late nights
- If the Child could read, and/or count the stars, they would often need get out of bed to get near enough to the clock to determine more than just the color of the light; potentially putting on glasses if needed.
- Didn't provide a "its ok to be awake, and play/read quietly, but stay in your room"
- It would age quickly and not look grown up
- It wouldn't collect data - future plans to put temp sensors, bluetooth relay, and sensors (not a camera!)
- Couldn't be made to do all sorts of other things I could think up with a tiny computer that is around 15,000 times more powerful than what is required to land on the moon!
So I made a thing! 😱😱😱 confession: 🤫 this isn't the first generation, previous code is open though without documentation
This is made for Made for ESPHome so you should be able to go buy a cheap led matrix, esp32, solder 3 pins, flash the chip and you've got something that even works with Home Assistant!
You will need to buy:
- 1x ESP32 £1.91 (worth buying a few in case you mess up the soldering)
- 1x WS2812B 8x32 LED Matrix £2.59
- 1x 15x5" Photo frame
You will need:
- A soldering iron
- Some solder
- A usb cable
RED
5v wire on the matrix > the5v
pin on the esp32WHITE
gnd wire on the matrix > agnd
pin on the esp32GREEN
din wire on the matrix >13
pin on the esp32
You should end up with something (more tidy than this pic)
You'll now need to flash the board
- Connect the ESP32 board to your computer
- Download the latest firmware image
- Go to web.esphome.io
- Click connect, and select the serial port for your device
- Click install
- Follow the buttons to connect to the wifi, and away you go!
When configuring the timezone, you'll need to refer to the
POSIX
timezone config just copy paste from this page into the config page of the device and you're good.
Config | Color | Description |
---|---|---|
Weekend wake up | Amber | The time its ok for your kid to get up and quietly read on a weekend (sat+sun) |
Weekend bedtime | Red | The time your kid should go to bed on a weekend (sat+sun) |
Weekend go | Green | The time its ok for your kid to come jump on your bed on a weekend (sat+sun) |
Weekday wake up | Amber | The time its ok for your kid to get up and quietly read on a weekday (mon-fri) |
Weekday bedtime | Red | The time your kid should go to bed on a weekday (mon-fri) |
Weekday go | Green | The time its ok for your kid to come jump on your bed on a weekday (mon-fri) |
I've put mine in a photo frame with just a sheet of white paper in front of the matrix to diffuse it a bit, you might like to try something more bespoke for your kids, maybe some art, picture of a pet/family etc.
It's a photo frame, so putting it on the wall should be easy
Theres some dots on the top of the matrix, these reduce over time until its the next phase, so provide a visual countdown, if your kid wakes up in the night "how many dots are left?" is a simple way for them to figure out how long is left, and for you to ask why they're jumping on you in the dark without opening your eyes and send them back to bed, because they should know better.
After configuration, it should just continue to work, it'll continue to get its time from the internet, automatically adjust for daylight savings (if that applies to you).
The code is open source! so feel free to extend this, do fun things, add temp sensors, air quality, buzzers, speakers, motors, the possibilities are endless, PLEASE SHARE what you do, take photos, share the code, make a pull request, or just raise an 'issue' with your pics and I'll point at them.
This should already work with Home Assistant, if you've got Home Assistant installed it should find the device on your network and offer to connect to it, if not you can give it the address of the device.
THANKS!
If you flash the device and it fails to connect to your wifi for whatever reason, it'll run its own access point that you can connect to. It also provides a bluetooth provisioner that you can use. Just go to https://www.improv-wifi.com/
This is all intended to use dev containers
rake test
Test 'TestMain.c'
-----------------
Running TestMain.out...
--------------------
OVERALL TEST SUMMARY
--------------------
TESTED: 5
PASSED: 5
FAILED: 0
IGNORED: 0
guard
rake build