Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: My in-network Node app for controlling my kids' nightlights (github.com/ecaron)
46 points by ecaron on Dec 9, 2019 | hide | past | favorite | 23 comments



Very cool.

I do something similar with LIFX bulbs. (https://github.com/adamjacobmuller/lifx/)

I specifically have them configured to follow a f.lux-like curve for brightness and color temperature.

The only major thing I want to add is some kind of local control/override for the brightness. The curves work great 99% of the time but sometimes you do want BRIGHT even at 11pm. The dash buttons are a cool idea, but I don't like the look of them in a wall. Haven't found a great solution for that yet.


Agreed about the Dash button. I've moved one of the rooms away from that to a doorbell attached to a Pi Zero. I also picked up a Voice Kit (https://aiyprojects.withgoogle.com/voice/) for $10 at Microcenter, and I'm playing with what that could offer.

If you the room is near a server you have in the house (like a Pi running Pihole), then Bluetooth buttons (like Puck.js) unlock a lot of potential for you too.


Anyone interested in this sort of thing for their kids, I've found most hue lights to be too bright and I wanted a way more flexible scheduling ability. So I made my own and now sell them.

https://www.keenglow.com

It does require any cloud besides ntp and just uses a local web interface. You can define relative events, like 15 minutes before bed is tv time, 5 minutes before is snack time, bed time is 8. If one night the kids are extra cranky and need sleep, simply adjust bed time and the others adjust too.

I've used em for years with my kids!


Well done! This is very impressive!!! You're 100% right that the Hue lights don't get nearly dim enough.

I'm sorry I didn't see your product sooner. More parents should know about your this - I'll make sure to spread the word whenever possible (:


Sorry, should say does NOT require any cloud.


My kids get to control their nightlights all by themselves. I trust them to do this responsibly, if they're clever enough to do it so I don't notice then I'll let them get away with it. I don't feel the need to snoop on/control my children digitally.


I think it depends on the age. This started several years ago to give my 4 year old an "ok to wake" light, which helps considerably with sleep training.


I made something very similar, but the device I'm controlling is an RGB LED attached to the GPIO pins on a Raspberry Pi zero.

https://github.com/mekane/Node-API-for-Raspberry-Pi-GPIO

I made some bash scripts that call the API to do certain things (like light up green when it's time to get up for school) and I set cron tasks to call these at certain times.

The Node service also serves a very simple web page that can be used to control the light color and brightness.


The Hue bridge is capable of this type of scheduling without any other devices. Philips simply hasn't included any useful level of flexibility in their app, so the use of All4Hue or other low-level apps is required.


The light turning to blue at 7am to indicate that sleep time is over is a nice touch.

Working in collectivities with young children, we'd have a sheet of paper with a sun/moon on each side, and every morning at 7 one of us would go in every room and turn the piece of paper around to let them know they could get out of bed and come to the common areas if they were awake.


I had this kind of project in mind when I built my rpiapi project. https://github.com/victorqribeiro/rpiapi

I'm going to work on it a little bit more.


If you want to drop the price of equipment you can go down a level and use 433Mhz. Athough wifi chips have gotten cheaper lately and hopefully the smart home iot gadgets will keep dropping in prise.


For the light-attached end, it is down to $10 with this like the HUZZAH ESP8266 Breakout. At that price, the LED nearly becomes the most expensive part of the setup (assuming you want anything more than a single color and/or light).

What I love about the ESP8266 + NeoPixel style setup is that it gives you control over the form factor. For example: https://www.instructables.com/id/How-to-make-a-BAT-signal/


Sonoff switches and plugs already cost less than $5, and they're all flashable with extremely good open source firmware. It's a great time to be a home automation hobbyist.


Does these Sanoff devices have an API that you can access via LAN, or do you need to re-flash them if you don't want to use them via "the cloud" ?


Am I so out of touch for thinking that I wouldn't want devices with internet connectivity running at all times in my home, especially in children's bedrooms?



I"m sure this was created for personal interest / development reasons but I thought I should mention that Home Assistant (https://www.home-assistant.io/) will do all of this out of the box.


And Node-RED for more advanced automations https://nodered.org/


Please use a language like C, D, C++, or Python. They are much more lightweight. It takes hundreds of lines of javascript to be executed to do a single "console.log."


Please let people write their hobby projects in whatever language and stack they want.


Printf implementations range from 300 to 1000 lines.

cout in C++ is not any smaller.

This is on top of the many hundreds to thousands of lines that need to be ran to actually make that text show up someplace.


> It takes hundreds of lines of javascript to be executed to do a single "console.log."

Uhh what now? It's just one line `console.log("hello")`




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: