[OBSOLETE] Stoplight for Children

I have a young child and we are trying to teach him to stay in his room in the morning until it’s time to get up. I wrote a SmartApp to manage schedules for a RGB bulb. The app allows you to create weekday and weekend schedules to switch the bulb to red/green. Additionally there’s settings for the hue, saturation and level of both red/green.

Code can be found here:

I kept the schedules basic for a few reasons. ST has mentioned in the past has mentioned that the number of schedules per SmartApps may be limited (this app creates 4). And the schedules are difficult to manage in the UI. and I didn’t see the reason for needing more than just weekday/weekend.

Let me know what you think and if you have any suggestions.



Awesome idea!

We bought an OK to wake clock for our daughter before I got into ST / HA. It works well enough for us but I’ve wondered about this alternative and it’s nice to see it’s both possible and already done! The obvious advantage of the more sophisticated control you have here is being able to set more than one schedule (she gets up at 6:15 no matter what day it is, because 10 minutes of futzing with the alarm to get an extra half hour of sleep isn’t worth it).

Does the app interfere with other smartapps controlling the color outside of the scheduled times? A cool feature for me, since we just have a table lamp in her room, would be to allow a button controller to turn the lamp on and off at a soft white color for task lighting, then start the “sleep” routine with another button push (our bedtimes aren’t consistent enough to have task lighting on a schedule), and once it’s gone green, allow the controller to turn the light “on/off” again. But since I don’t have an RGB bulb I’m not going to try to think about how that would be possible :slight_smile:

The other thing that I would try to add if I went this route is to add a nap timer that’s manually triggered - hit start and the bulb goes red for X minutes then turns green.

Absolutely not. And your use case is a perfect example of why this SmartApp is flexible. The SmartApp basically only schedules the light to turn to green or red and specific times (based on user input). Otherwise, the user is free to do anything with the bulb at any other time.

In my use case I use this as a red/green light, but it’s basically a night light as well. Then when we wake up and speak Good Morning to Alexa, she’ll turn this light off. So red/green happens when sleeping and off is when we all wake up and say good morning!!!

For your use case it sounds like you’d obviously need the RGB bulb and a button. But you’d use my SmartApp to setup the red/green schedules. Then separately setup the button to behave in it’s own way. The only thing you might need to figure out is how to set the bulb to red if you’ve used the button pasted it’s red scheduled time.

1 Like

I looked for the input method to pick the color, but couldn’t figure it out. Can you point me to the right input method?

Also is there a slider method I could use for the level?