Hubitat - Sleepy House
An app for Hubitat to put rooms to sleep. It does many of the same actions as motion lighting, but it has a different philosophy. It's centered on the idea that at night, rooms should "relax" to a dimmed state and then off, and motion can wake them up.
So, when it's "nighttime":
- If there's no activity in a room, it should tend to go to sleep after a bit: dim down and then go dark.
- If you enter a room, it should wake up in a dimmed state. (So it doesn't blind you.)
- It should make sure that "off" dimmers are preset to a very low level. So that if you enter a room and manually turn a switch on, the light comes on dimmed instead of blinding you with the force of a thousand suns.
Example Use Cases:
- My kitchen has several dimmers and also several on/off switches. And two motion sensors. At night, if there is no activity, it dims down and then turns everything off. If I come back in to the room, it brings the dimmers back up to the low level, but leaves the on/off switches off.
- My hallway has dimmers, and two motion sensors. At night, if the motion sensors detect no activity for a while, it dims the lights down and then eventually turns them off. However, my wife doesn't like the hallway to come back on automatically, so I have auto-on disabled. But, since it already dimmed the lights before turning them off, that means that if I get up in the middle of the night and manually hit the switch, I know it will come on at a low level and not blind me.
There are two custom apps to install. Both Sleepy-House.groovy and Sleepy-Room.groovy must be installed.
This is exactly how I want it to work:) Had thought about writing an app for this when I get more of my lights to be dimmable ones so I can really use this! Thank you for publishing this!
Very nice work! Thanks.
To only have one app to controll the same room during daytime too, is there a way to add the functionality to increase dimmer level outside the night time frame?
The idea is that the level can be set to a higher level, if the room is woken up in the evenings when it is dark outside.
Adding waking up restrictions based on Lux values from a sensor, could have this to work 24/7 in one app too. After sunset, but before night/sleep time, it’s nice to have the ability to wake the room, but only if it is dark enough, set to a spesific dimmer level, and maybe color and color temperature.
Hehe, turned in to a combination of another lighting app and this one, didn’t it... hihi
Anyways, thanks for a great app! Well done!
Update: Fixed a bug that could occur if your "nighttime" did not cross the boundary of midnight.
Thanks for the great feedback!
I've considered making features for other time periods than nighttime/sleepyTime, but I've held off. If I add more options to cover more scenarios, it loses its focus and becomes just another version of Motion Lighting. And then users have to figure out which options to use at night and which to use at day, etc... So I've stuck with the focus of "This is an app that makes the house lights fall asleep along with the occupants."
One way around this is to have two child apps. You could add a "Sleepy Room" that behaves as it does now, and you could add an "Awake Room" that has totally different internal logic for daytime.
I like this approach better, though I don't think I'm the right person to code it. I don't have any lux sensors, and I don't use any motion lighting in my house during the daytime. During the day, my house lights are entirely on a time-based schedule. So I would have to guess at requirements and tuning, which flies against my method of software development. Me and my wife are the prime users of my code, so my method is to try to make us not annoyed with the house. Whenever there's an annoyance, I try to automate it away. (Or remove the automation if it was the automation that caused the annoyance.) I know my wife would be annoyed by motion lighting during the day. So it's probably not something I'll attempt.
That said, I gladly accept pull requests on Github!
Great App loved how it worked last night in my living room. I have a question. I thought it would only wake up the room during the evening hours however I noticed its going on during the daytime hours. Is there a way to set it by mode? currently in day mode and it going on and off
Grab the latest version. I posted a bug fix today and can see from your settings that it would have impacted you.
Update: minor bug fixes in Sleepy-Room.groovy. Get the new version on GitHub.
One request, our kitchen has a lot of lights
- 6 overhead lights controlled by one dimmer
- a long narrow light spanning the island on a dimmer
- a hue Go for color splash in one corner
- 3 under-cabinet lights each on their own dimmers
even at level 1 brightness all of the lights on is too bright, so the request
When a room is "sleepy" can a wake up affect different lights differently? e.g. at night the main overhead lights never need to turn on, the undercabinet lights could raise slightly, and the kitchen island light could have a more pronounced effect since it doesn't shine into your eyes.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.