[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

Added dim by level as well, so if the switches to be turned off have level setting the levels will be lowered by the specified level before turning off. the duration for which they can be dimmed before being turned off can also be specified through a dim timer setting.

the goal here is to make the smartapp portion of this self sufficient for what most users seem to do around automating a “room”. actual rooms or virtual spaces like say the backyard which can be treated like a virtual room, all through a set of settings for the room. :slight_smile:

should be able to push to github tomorrow or worst case tuesday.

The below statements no longer seem to be checking on WC -

([Kitchen:roomOccupancy] == ‘occupied’ ? ‘Occupied’ : ‘Vacant’)

tried occupancyStatus but wc doesn’t seem to accept it.

Any help with this?

EDIT: It’s ok…just realised had to refresh the devices in webCore SmartApp for the new stuff to take place.

1 Like

@Baz2473 For some reason the variables for the keypad didn’t import for me from your piston. I recreated the room variable and assigned to the code. Thought I would share, to save others some time.

These are courtesy of @Baz2473 :slight_smile:

Occupancy Test (no light control) inclusive of Door Sensor

Occupancy Test (no light control) exclusive of Door Sensor

updated to 0.03.5 with the following updates:

*  Version: 0.03.5
*
*   DONE:   10/29/2017
*   1) added support for setting level and/or color temperature for turning on switches. these will be set for
*           those devices in the turn on switchs list that support it.
*   2) since motion inactive timeout can vary so widely amongst different brands of motion sensors chose not to
*           use motion inactive event and instead timeout on motion active event for predictable user experience.
*   3) added support for dimming before turning off light.
*   4) added support for color setting which takes preference over color temperature if the switch supports it.
*   5) fixed small bugs.
*
*  Version: 0.03.1
*
*   DONE:   10/27/2017
*   1) added support for lux sensor and lux value. if these values are specified:
*       a) if lux value falls <= that value and switches on are selected those switches will be turned on.
*       b) if lux value rises > that value and switches off are selected those switches will be turned off.
*       c) switches on with motion will be turned on only when lux value is <= that value.
*   2) fixed small bugs.
*

not forgotten about this. working with datetime is never fun so been putting it off till i have a little time to focus and get it done.

but meanwhile wondering if you would be willing to give lux controlled lightning a shot?

using lux for outdoors usually works best for controlling lights across rooms in the home. personally i use smart weather station tile 2.0 for outdoor lux. the lux values are not granular but if i set the lux threshold to 10 that seems to work 99% of the time

Thanks for the update. I would love to test it out, but the motion sensor in the room does not seem to have a luminosity/lux sensor with it (PEQ motion sensor) :frowning:

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?