Best logic to automate bedroom lights

Got the logic down! Turning off the light when motion is active and contact opens…If I read/watch TV the motion is inactive when the door opens and my wife comes in…So the only time when motion could be active, when the contact opens, is when the room is occupied and someone is near the door…this is the “Ridiculously Automated Bedroom Lights.” I’ll share the code when I’m done if anyone is interested…

4 Likes

So, I decided against reinventing the wheel. Instead I added a small one. I ended up using your Motion Lighting app and created a small app that addresses when my wife comes in the room while I watch TV or read a book…Thanks for sharing your apps!

UPDATE - December 2015. We now have Rule Machine that can better accommodate complex use cases such as bedroom lights.

2 Likes

Hopefully someone can help me with my bedroom automation issue. Here is my scenario. I have 2 bedside lamps connected via a smartthings outlet each. I am thinking of putting a motion sensor because I want them to come on when someone enters the room. Here are some of my questions.

  1. Is there a way to have them shut off when someone exits the room? Does a motion sensor differentiate from entering and exiting?
  2. How to prevent motion detector from triggering in middle of night from moving around or getting up in the middle of the night to go to the restroom.
  3. When you go to bed and they trigger on, what is the best way to shut them off once in bed? Easier to just press “goodnight”, button/minimote, or other “fancy” ideas you have.

Any suggestions are welcome. I am not overly tech savvy so i may need to get more clarification if coding and complex things are recommended.

Thanks!

  1. yes, you set up when motion stops.
    2 & 3 go together. you fire goodnight, which turns lights off and changes the mode to ‘Sleep’ or whatever you want to call it. The lights will not come on when you turn because you are in ‘sleep’ mode.

The hard part comes when you sit in bed barely moving while reading and the lights keep going out. That’s why I haven’t done the bedroom yet, no easy solution without occupancy sensors. If you put a long off delay in to keep the lights on while barely moving then every time you pop into the room while not in bed the lights stay on for too long after you leave.
First world problems. :laughing:

That’s where Rule Machine (or Routines) come handy. If you have a minimote next to bed, you can use it to change modes. You can have a ‘sleep’ mode when you push button 1, and then you can have ‘reading’ mode when you sit in bed without moving. ‘Sleep’ mode can then be cancelled by Good Morning routine and ‘reading’ when something else happens (in my case, I set it up when door opens and the motion is active - if the door opens but motion is not active, it means that my wife just entered the room, so I don’t want to disable the ‘reading’)

This is probably not the route you will choose, but here is how I have done the same scenario in my bedroom.
I have a open/close sensor on the door. Open the door, lights go on, close the door they go off.
When we are in the bedroom the door is always open, so the lights remain on.
For turning the lights off, or dimming, I use the home control buttons on my Logitech remote.
I also have it set as part of my TV activity, so when the TV turns off the lights will also.

@SBDOBRESCU

My master bedroom is turning out to be an extremely complex set up. And it’s all because of the design of the room.

If of the main room is a sitting room, this is my infant daughters room for the first two years, it is separate from but open to the bedroom.

Then there is the bath. It has a light for the shower, one for the wife’s garden tub, one for the vanities, and another for the toilet area.

And of course, the final is the walk in closet.

I have all of the lights automated using switches and bulbs.

The main trigger for the room is an Enerwave ceiling mounted motion sensor. It has a super fast response and resets in 15 seconds. I have tape over seconds of the lens to focus the sensor. And it’s set to 75% sensitivity. I’ve noticed the high that number, the faster the response.

Now, everything is master controlled by the mode of the house. There are five modes.

Morning - 0555-0830 timed event
Day - 0830-1615 timed event
Evening - 1615-2000 timed event
Night - 2000-change to sleep mode
Sleep - Manual start via VS until 0555

I have the lights do different things based on the mode. During the day only the bedside lights come on @ 100%. Off After 15 minutes Evening they are @ 75%. And they get dimmer into the evening and night. If after 20 minutes in the eve and night.

Evening and night the bedside lights as well as a light in the closet and bathroom come on.

Sleep mode only a single bathroom light at 5% comes on. Kind of like a nightlight over the toilet… Cause at 2am that’s the only place I’m heading to.

The room is a huge square and I have the sensor over the door, but far enough into the room so it sees movement about 6 feet into the hallway. The bedroom is the last door at the end of the hall so whatever motion it sees is heading into the room.

The lights come on just as you walk into the room.

There is no moron detected on the bed (sense focusing with tape) but it does pick us up if we walk along each side of the bed. So ask walk areas are covered, except the baby’s area. No automatic lights there and it’s a dead zone to the motion sensor.

I also have a two rules using presence. If both my wife and I are gone, the entire room turns off. And if we arrive after midnight the lights come on in our room… That’s because at that time we are having trouble with working switches…lol

Overall it’s working really well and I’m still tweaking it. My wife likes the lights to come on full power, I prefer dim lights. I’m working on ways to trigger certain levels based on the person. I’m thinking of putting in two more moron sensors, one on each side of the bed. That way when hers is active certain lights come on at 100%. And mine sets them dimmer.

I also have two Minimotes. One for her and one for me. They control everything in the room.

And, there is a master bedroom override switch that can freeze everything in the room no matter what mode or state the room is in. I can turn off all automation.

Oh yeah, there is also an echo device in the room with total voice control and a fire TV stick.

To do all of this I’m using 1 motion sensor, 2 hue bulbs 2 ge dimmers switches, 2 gee switches, and two Leviton plug in modules, and two Minimotes. This all requires 6 RM rules and two installs of button controller.

Holy crap! That’s a hell of a lot for a room that I only sleep in!

1 Like

Wow, thought mine was getting complex. I just made a virtual switch that disables motion if on. My wife and I have a minimote each on our night stands, simple tap of the button if you don’t want the motion sensor to turn lights on/off. RM is setup to turn on motion after the wake up routine runs which triggers on the first motion in the house OUTSIDE the bedroom, with a 10 minute delay to turn off, and if any of the other lights in the bedroom are already on, it won’t activate the motion light which is the big one on our fan. That way if I want to read and the wife wants to nap, I turn on my lamp, motions stops, and she’s happy. I think I have shots of that rule in the RM scenarios thread…

The complexities of the actual rules is pretty crazy, and getting even more so!

I do have it do that after 11pm motion will turn them on but will not turn off until in sleep mode.

Yeah, I need to streamline some if that lol