
Show HN: My in-network Node app for controlling my kids' nightlights - ecaron
https://github.com/ecaron/smart-nightlight-manager
======
AdamJacobMuller
Very cool.

I do something similar with LIFX bulbs.
([https://github.com/adamjacobmuller/lifx/](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.

~~~
ecaron
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/](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.

------
feistypharit
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](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!

~~~
ecaron
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 (:

------
jacquesm
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.

~~~
ecaron
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.

------
mekane8
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](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.

------
rancor
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.

------
GuiA
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.

------
atum47
I had this kind of project in mind when I built my rpiapi project.
[https://github.com/victorqribeiro/rpiapi](https://github.com/victorqribeiro/rpiapi)

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

------
z3t4
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.

~~~
StavrosK
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.

~~~
z3t4
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" ?

------
ajxs
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?

~~~
mxxx
[https://www.zdnet.com/article/fbi-recommends-that-you-
keep-y...](https://www.zdnet.com/article/fbi-recommends-that-you-keep-your-
iot-devices-on-a-separate-network/)

------
math0ne
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/](https://www.home-assistant.io/)) will do all of this out of the
box.

~~~
akerro
And Node-RED for more advanced automations
[https://nodered.org/](https://nodered.org/)

------
crazypython
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."

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

