Presence Governor

I've found it extremely useful to add a threshold to the excellent Hubitat-Combined-Presence application from Joel Wetzel. So I figured I'd publish it just in case anyone else finds it useful.

So what's the difference?
I have broken presence device down into types, and handle presence events differently for each type.
Apps that do Geofencing (Life360, Locative, your choice here)
WiFi Presence Sensor
Fobs

Apps for Geofencing
Variable Thresholds. Ex: If any 2 of 3

WiFi Presence Sensors (due to the iPhone WiFi sleep issue)
present = present
not present = check Apps for Geofencing

Fobs
No Threshold Check
present = present
not present = not present

Hope you find it useful.

2 Likes

awesome, thanks for sharing. I'm going to take a look at this now. I'm using a few RM rules to combine wifi and geofencing, but I like the idea of using an app with purpose-built logic for this. Not being a computer programmer my own rule logic often leaves much to be desired :nerd_face:.

I think I'm unable to add the child app because the namespace for combinedPresenceInstance is different than what the parent app is looking for. Changing line 97 in the parent app code so that namespace is "dwb" instead of "joelwetzel" seems to fix that because now I can add a child instance.

I made the change to the repo. Thanks for the bug report.

1 Like

I'm still seeing this error currently when I click on the "Add a new combined presense" option

Logs:

app:424 2019-05-05 10:53:26.372 pm infoParent Installed OK
app:424 2019-05-05 10:53:18.943 pm infoParent Installed OK
app:424 2019-05-05 10:53:14.996 pm infoThere are 0 child apps
app:424 2019-05-05 10:53:14.989 pm debugInstalled with settings: [:]

Can you check what namespace the Parent app has?

Sorry for the late response, just saw your reply now. I'm using what's on the coding on Github right now:

Parent:

namespace: "joelwetzel",
author: "Joel Wetzel",

Child:

parent: "joelwetzel:Combined Presence",
namespace: "dwb",
author: "Doug Beard",

I thought I'd updated the repo properly, but apparently not.

Import this parent app
https://raw.githubusercontent.com/omayhemo/Hubitat-Combined-Presence/master/combinedPresence.groovy

and this child
https://raw.githubusercontent.com/omayhemo/Hubitat-Combined-Presence/master/combinedPresenceInstance.groovy

Doug,

The update is working now, thanks for the update. Is the Departure Delay in seconds or minutes?
image

Minutes. I added that information to the label

Rebranded Presence Governor and some updates.

@doug

Should the WiFi be added to the WiFi Presence section only?

Capture

Yes.

1 Like

Slowly migrating over from ST and playing with the various presence options to find what's most reliable.

I setup WiFi, Life360, Alexa, IFTTT, Hubitat App and then through HubConnect I have the ST app and WebCore. IFTTT was by far the slowest to register change so it will probably be the first taken out.

Love the thresholds added by this app, it's the one piece most combined presence apps are missing. My first thoughts this morning as I left the house and watched the various apps all switch to away was that this was really slow to change after all the others already switched to not present. Now that I'm here I realize there's a departure delay and I'm pretty sure I set it to 2 or 3 which would explain why I was already well onto the highway before it registered me as away. LOL

Great app, well done!

2 Likes

Hi, just installed this. Can you describe how the arrival/departure thresholds work? If I have a Life360 sensor and a wifi presence sensor, what values do you recommend?

The threshold would only apply at a greater than 1 if you have more than one Geofence application you are using to track presence. For example, Life360 coupled with the Hubitat mobile application. In my case I'd set a departure threshold of 2 (both have to be not present to make the proxy not present) and an arrival threshold of 1 (only one present makes the proxy present).

If you enter a wifi presence sensor or a fob, those operate outside of the thresholds. If you read through this thread you'll see a couple people posting images and describing how they've setup they're own usage of this application, which you can use as education material to decide your own implementation.

Ok I go this installed, and was wondering how to exactly set it up, I have life 360 and hu app for presence, and now a fob for both my wife and myself. How does this work if I forget to take the fob with me? And what device should I use for Proxy? 360 Life of HU? and then how do I use a rule and the new combined sensors? I dont see any new option in the rules.

Update: Ok I think I figured it out. The Proxy is a Virtual Presence sensor I needed to create for each user.

Now just wondering what happens when one or both of use forget our fob presence sensor. Would the system still show me home or gone.

Have you used a custom app before on HE? Just dropping the code in place doesn't install and configure an application. You must then install it from the add custom app button on the app screen.
You'll need a virtual presence device setup to use as the proxy. Once you install the app, some things should be self evident.

@doug provided really good explanations in these two posts:

@doug
I have a new person in the house. Not a family member just someone that is staying with us for awhile. I created a new Presence Governor child app for her.
Created a Virtual Proxy and a Virtual WiFi. She does not have any app on her phone like LIfe360 or the Hubitat App.

Will this Presence Governor work with just WiFi? I see in the WiFi Device she is NOT present but the Virtual Proxy still says she is Present.