After having our son wake us up multiple times in the middle of the night we decided to make the Okay to Wake clock better. My wife had the idea that if there was a color for "Sleep" and an other color one hour before waking up ("Doze") it would help our son know how much longer he had to sleep in.
My goals for this project were to use parts on hand and to not interfere with the normal functionality of this clock. The solution turned out to be quite easy; tap into the incoming USB power inside the clock and use its enclosure as a diffuser but otherwise make no alterations.
You can see there's plenty of room inside of the thing. There are two LEDs pointed upward that make the clock's normal green wake color work. I figured I'd have no problem lighting it up as different colors.
I had an extra Adafruit Huzzah ESP8266 board sitting around (any ESP8266 will work for this). It's programmed via serial cable which is kind of a pain, but since I was going to drop this inside of an enclosure it made sense to use the Over the Air updates method for uploading code wirelessly.
Check out my code on Github. I designed the software to connect to the WiFi at power-on and sync with internet time. WiFi says on for 10 minutes so you have a chance to make a software update, then turns off until the next power cycle since we don't need to waste the power when not using connectivity. So far it keeps great time all by itself.
I used jumper wire to put everything together. The black and white wires connect V+ and GND on the ESP8266 to the USB power coming in the back of the clock.
There was plenty of room for the board to be hot glued to the outside of the battery enclosure on the clock.
I have a handful of these 3-pixel cutoffs from some WS2812 strips which made this a no-brainer. Here I've just hot clued it onto the cable that connects the rear buttons to the front PCB of the clock. When assembled these LEDs will point straight up.
One short night up hacking and we're up and running. The clock comes on red at 19:00 (bedtime), turns blue at 05:30 (doze... you have one hour left to stay in your room), turns green at 06:30 (time to get up), and turns off at 07:30.
So far so good. He's been coming out of his room less, and several times has slept much later than we think he normally would have. Success!
I feel your pain. I used to have to sneak out of the house at 4:30 AM to avoid my early-rising toddler daughter, lest I get waylaid by her and trapped playing for the next few hours. I'd get to work while the gates were still closed and the night shift guards were still on duty, go up to my office and play Quake for an hour until the gym opened and I could work out.
This would have done absolutely nothing to stop her, mind you, but I applaud the effort and wish you the full-night's sleep that's been eluding me for 23 years now.