Help needed with some logic around a light in bedroom


#1

I just got the totally awesome Lightify RGBW Flex lights that were on sale from VM Innovations on Google Express 16’ $20 each. How can you beat that?

Anyway, I put one behind the Master Bedroom HeadBoard and another under the bed.

I have contact sensors on the entrance door, bathroom door and closet door in the bedroom. I also have 2 motion sensors. 1 covers the entire room and another just covers the space on the floor next to my side of the bed. I also have home modes set up (home, away, night)

This is what I would like to happen…

  1. When mode is “home” and someone comes into the room (or a door opens/closes), both lights come on bright.
  2. When mode is “night” and the room motion detects motion followed by motion on the floor near my side of the bed, the under bed light comes on with level 1, deep blue–just enough light for my old-blind ass to find its way to the bathroom.

I have those working pretty well, but there is another condition that I don’t really know how to handle. If one of us goes to bed earlier than the other, the house is still in “home” mode, obviously, I don’t want the lights blaring on when the other comes in.

I should note that when either of us goes to bed that we typically turn on the TV. That is controlled by the harmony. So, I can access that as another “sensor” in the room.

When no one is sleeping, we typically leave the bedroom door open, except during the summer when all the heat runs up the stairs straight to the master bedroom.

Mainly, I’m thinking this and typing. Here is my initial thought…

If the bedroom door, bathroom door and closet door all close and the TV goes on after 6pm, and there is still motion in the bedroom, it is fairly safe to assume that someone is going to bed. Maybe, I use some booleans and time settings to come up with a reliable formula.

Any thoughts?


#2

I have a very similar setup,
when one us goes to bed earlier everything changes (variables)
I have to leave now but I will share pistons with you today…


#3

Thanks @ike2018. I look forward to seeing what you have done.


#4

Hi again…
in our house we have almost ZERO routines:))) so everything changes everyday and we can’t use the motion sensors as deciders due to our 3 cats:))))
and finally my friend @WCmore came up with this idea of PHASES…
If I need to add a new scenario all I need to do is, assign a new PHASE number and add to the piston.
(This way requires 2 pistons for each room - atleast in my house)
Basicaly your variable - I use integer so i can assign numbers - your variable will be your TRIGGER or CONDITION to control the room.
In my main entrance
Phase 7 = Sleep time (everything is OFF)
Phase 2 = Very early morning (Lights are very very dimmed because I am a early morning person my wife is not:)))
Phase 1 = Regular motion controlled bright lights.
Phase 0 = If she goes to bed before me.

I can explain in more details if you like to but I want to make sure that this is what you are looking for…