[Migrated to Custom Capabilities] Rooms Manager: Smarter Rooms: Personalized rules based home automation with rooms Occupancy sensing from devices you already have in your home

Your motion sensor doesn’t necessarily need a lux sensor.

What I am trying out right now is using my, “master,” lux sensor that I have monitoring the outside lux.

I am using this lux sensor to control several webCoRE pistons and also using it in this app.

For example, I have a laundry room in my basement that needs light way before my upstairs, “room”, does. So, I am experimenting with and watching my outside lux sensor and setting each room accordingly. i.e. I need light in the laundry room when the lux is below 1000 lux, but my upstairs room doesn’t need light until say 500 lux since there are more windows to bring in natural light.

Hope this helps.

2 Likes

@kxavier23
This depends on where the lux sensors are present, and the relative brightness levels across rooms.
Suppose your lux sensor is indoors, say in the upstairs room, and you rely on this for turning on the laundry room lights. Every time the upstairs room lights are ON during night, the laundry room will fail to light up even when there is motion.

I can see your point, which is why I am not using an indoor lux sensor value. You’re right, if I used a lux sensor in the house, say my living room and the light comes on there, the lux value has nothing to do with the outside light that is influencing the light in say the laundry room.

I am trying to use one source of truth, outside light.

Each, “room,” in @bangali’s app can utilize a central or common lux sensor and each room can react independently.

The app is bringing together a bunch of variables (lux, motion etc) in a very flexible way.

1 Like

@kmugh what @kxavier23 said. :smile:

additionally only thing i would add is that most rooms work well when using an outside light lux measurement. in the occasional exception that you have one room or space that does not work well when using outside light lux, you always have the option of buying a lux sensor just for that room and not every room.

but from trying this for couple of months i have gotten all rooms to work uniformly in controlling lights by using different lux values across rooms.

@bangali @kxavier23 So, both of you are colluding to force me to purchase an outdoor light sensor ? :stuck_out_tongue: Would love recommendations please.

colluding? yes. purchase? no. :slight_smile:

just install this, set for your location and use as outdoor lux sensor:

off course if you want to switch to using dedicated outdoor lux sensor afterwards thats always possible. but this will get you started with the concept.

3 Likes

@bangali @kxavier23 Bajeezus. Did’nt realize it was this straightforward. Thanks, will try this.

1 Like

coming up next:

  1. contact sensor for room door
  2. time controlled settings
  3. fan speed control. though still have to figure out how I am going to do this since I dont have any fans in the house forget ST controlled fans. may be will do thermostat control instead.

This is very interesting and I have read all the posts but I am confused as to how it will detect the room to be occupied if there is no motion. For instance, I am interested in this because when I am watching TV I have my hues lights dim, but after a while the lights go off because there wasn’t any motion. So how does this work to keep the lights from going off if I am not moving?

interesting is good. :slight_smile:

the basic method to keep the lights on when there is no intermediate motion is to move the room to a ‘engaged’ state. the ways you could do this are:

currently:

  1. set the state of the room to ‘engaged’ from the ST app manually.
  2. pushing button 9 using the ST lighting app when the TV turns on. for this you will need a smart outlet monitoring the TV.

whats coming is:

  1. if you have a contact sensor installed on the room door and close the door it would change the room to ‘engaged’ state till the door is opened again.
  2. monitoring a switch that tells the app to move the room to ‘engaged’ state while the switch is on. so, if TV switch is on consider the room to be in ‘engaged’ state even if the room has no motion.

hoping i can get these last 2 things done over the weekend and push to github by mon/tue.

EDIT: struck out line above because ST smart lighting app does not allow button push as the action even though button push can be the trigger.

1 Like

going to change sequence a little on this, coming up next:

  1. contact sensor for room door
  2. switch monitoring to consider room engaged
  3. time controlled settings

Does this engaged status have a timer? I have been following your app and been meaning to give it a go. I have something similar in alot of my webCoRE pistons where I define a boolean variable as occupied true or false and build rules with that variable as a restriction for auto offs. My logic is basic and simple and relies on 1 motion and 1 contact:

If motion changes to active
And
Contact is closed
Then set variable occupied=true

If motion stays active for 5 minutes
And
Contact is open
Then set variable occupied=true

If motion stays inactive for 1 hour
Then set variable occupied=false

If contact changes
And
Motion is inactive
Then using Location
Wait 5 minutes
Then set variable occupied=false

Was asking about the timer because what if it thinks someone is in the room but actually is not


OK, that would work in my case because I could maybe have it detect the sonos playbar “playing” and have it engaged. I am confused as to whether this is through the webCoRE or through an ST app?

So we have to incorporate the Room in a piston? How does it show up? Is it a switch, a thing?

still working on the code, but as of right now the engaged status does not have a timer the occupied status does have a timer.

heres how the logic goes:’

If contact changes to closed
   set occupancy state to checking
   if motion changes to active within timeout period
      set occupancy state to engaged
  else
      set occupancy state to vacant
  end if
end if

If contact changes to open
   set occupancy state to checking
   if motion changes to active within timeout period
      set occupancy state to occupied
   else
      set occupancy state to vacant
  end if
end if

so if the door is closed and there is one motion after that within the motion timeout period it sets the room to engaged which avoids using a timer. does that work?

feedback welcome.

right that is what i was thinking. the TV or the sonos “switch” being on could be used to control room is ‘enagaged’ and stop the other switches from turning off.

everything here is through the ST app in the first post though this does work with webcore if you needed to do additional tasks.

no you dont have to. you would just designate a switch which when turned on would change the room state to engaged and keep the lights from switching off.

if incorporated in a piston it shows up as a device with commands to set states and a occupancyState variable.

I installed the app using the github setup but there was only the Rooms Manager and Rooms Child App. I didn’t see the Rooms occupancy and I don’t see it in my ST My Apps. Am i missing something?

With that logic yes, that would work perfect depending on if there is a contact sensor AND the door is normally closed. Just don’t see why it would just be occupied?

The problem with having something else set the engaged status and there is no contact sensor or the room is normally open is, If the TV is on or Music is playing that might not mean that it should forever. Once its set to engaged within the timeout period and the TV is on, seems like it needs to be an event to take it out of engaged? If no one is in the room, and the the rule states that this device should turn off after a period of time if the room is vacant then, from the logic, it will run forever


Or am I looking at it wrong?

If the TV/Sonos is “stopped” then it should take the room from engaged to vacant. Then the lights should turn off after there is no motion or after so much time.