[RELEASE] Home Presence Manager

I wrote this SmartApp because I wanted a way for my house to always know which room I was in without using timed delays.

When setting up a room you can specify lights, but since it uses virtual presence sensors, you can setup complex automatons based on the room you in using other SmartApps like CoRE or Rule Machine.

This SmartApp has a lot of limitations so I doubt anyone else will find it useful, but I figured since I’ve been using it to control all my lighting for several months, I might as well post the code.

These are the main reasons why this SmartApp won’t work for most people:

  • It only works when there’s one person can be in the house.

  • A Virtual Presence Sensor needs to be manually created for each room.

  • Each room has to have either a Contact Sensor on the door or a Motion Sensor within it.


Using Motion Sensors to detect presence:

When a motion sensor detects motion it sets that room’s Virtual Presence Sensor to present. If other rooms are present, it waits for the motion sensor in the other room to become inactive before setting it to not present to ensure you didn’t go back into that room.

Most motion sensors require at least 15 seconds of inactivity before they’ll trigger another motion event so you have to specify that interval when creating a room. When you exit one room and enter another, both motion sensors will show motion so it uses the specified interval to determine which room is active.

Detecting room presence by motion isn’t exact so if there’s a contact sensor involved, the contact sensor will determine which room is present.


Using Contact Sensors to detect presence:

When you setup a room that has a contact sensor, you have to choose one of the 4 options for determining presence:

  • Open - The room is set to present while the door is open.

  • Closed - the room is set to present while the door is closed.

  • Toggle Open - When you open the door, the room is set to present and it gets set to not present the next time the door is opened.

  • Toggle Closed - When you close the door, the room is set to present and it gets set to not present the next time the door is closed.


Here are a couple of examples of how I’m using the presence for other things:

  • When I open and shut the door to go into my basement, the basement disarms and lights turn on and they stay that way until I open the door again to leave.

  • Different devices are used to play notifications depending on which floor I’m on.

I wasn’t aware that someone had already created a similar SmartApp with a similar name until I created this topic.

4 Likes

This is awesome even if can’t use it.

1 Like

Very cool idea.

1 Like

Hi @krlaframboise – I’ve been using Home Presence Manager and it works beautifully for me. I live alone and the presence monitoring is flawless.

I have just two requests if its at all possible:

  1. To be able to have the “specific mode” option available on a per-room basis to limit lights on/off execution by mode as opposed to all or nothing?

I enabled the capability to name the SmartApp’s instances and currently have 5 independent ones running for each of my location modes. Unfortunately they sometimes either conflict or something is causing the mode setting to wipe itself out of one or more instance. So what I’m looking to do is have, for example:

  a. Bedroom (Home Mode)
  b. Bedroom (Evening Mode)
  c. Bedroom (Night Mode), etc. ...

for each room since needs vary at different times of the day (like at night when I don’t want lights going on at all and evening when I prefer a lamp to overheads). Similar to the Smart Lighting and Lighting Director SmartApps.

  1. Is it possible to add Dimmers/SwitchLevel capabilities? (Color & Color Temp would be lovely as well but dimming particularly).

Thanks so much. Awesome work man!
Jerry

I wasn’t aware that anyone else was actually using this SmartApp.

When you add that mode setting to a SmartApp, SmartThings handles whether or not to execute the SmartApp based on the current mode. To make that room based I’d have to implement that logic manually.

I also needed more control over my lights so I stopped using the light settings in the SmartApp for most of my rooms and only use it to manage the Virtual Presence Sensors for the other rooms.

I use the virtual presence sensors as triggers in other SmartApps like Smart Lighting and CoRE.

That allows me to use additional logic for each room like modes, time of day, light level, etc.

That also gives me more control over the lights, like setting the dimming level and/or color.