[RELEASE] Combined Presence

Thinking about it a bit more. If you can set it up, what I would do is:

  • for each phone, set up 3 presence sensors. Use my "iPhone Wifi Presence Sensor" (It works for Android too, and use 2 geofencing-based sensors, such as HomeKit, Alexa, or Life360.
  • then for each phone, use a "Standard" combiner in Combined Presence. The output will be a virtual sensor that gives a very accurate idea of the presence of that one phone.
  • Finally, add one more "Advanced" combiner. Use the outputs from the 3 standard combiners as the inputs of the advanced combiner. Its final output will be a good value of presence for you overall.

All told, we're talking about 9 inputs, and 4 combiners.

2 Likes

I am having some issues with the standard combiner switching me from arrived to departed multiple times when I am arriving to and departing from my home. I have attached my standard rule and then the resulting rapid fire notifications from the Hubitat app. This is an issue because it arms and disarms my alarm system and locks and unlocks an inside door multiple times. Any thoughts @jwetzel1492? Thank you.

Ok, a couple things:

  • a sensor should only be in or the other of the lists. It looks like your fob is in both.
  • one of the sensors in your top list is the culprit that is rapidly arriving and departing and causing the combined value to oscillate. You’ll need to look at the events logs for each of those devices to see which one is oscillating. If you can find that and report back here with the details of what that sensor is, I can give a recommendation.

Oops you actually caught my mistake when I was messing around with the app after I arrived home. I have your WiFi based presence app installed and that is actually in the WiFi section. The presence fob is only in the top section. Sorry about that. I checked the event logs and it looks like the Locative geolocation sensor is acting up. I will try and decrease the radius and increase the duration of being present before it fires and see if that helps.

Gotcha. Yep, definitely tune the Locative sensor. I agree on increasing the duration. Decreasing the radius might backfire though. But worth experimenting.

Very handy App, much easier than doing this in RM - However I found in my case it didn't seem to work the way I was expecting and I ended up using the advanced combiner to get the desired result.

I have 2 GPS based Sensors (HE iOS app & HomeKit) + your excellent WiFi presence detection system.

Anyway, I was getting away events unexpectedly until I used the advanced combiner like this:

Is the "Derek's iPhone - GPS" using presence from Hubitat's own app? I have found it to be untrustworthy. Both false arrivals and false departures. That would explain the behavior when using the standard combiner. If the hubitat app was doing a false departure, it would trigger overall false departure in the standard combiner.

If you want slightly faster departure detection, with no extra false events, I'd recommend also adding "Derek Osborn - iCloud" to the "ANY of these depart" selector. Then you won't have to wait for the wifi sensor to time out before it detects your departure.

1 Like

Yes it is and yes I agree it is untrustworthy - this is why I built a Homebridge instance yesterday.

Ok, you might want to publish the logic for the standard container as it isnt very clear from your 1st post description.

Now that I have dual GPS tracking and one of them is reliable, I've set the WiFi presence timeout to 2 mins. Now I mainly use the Wifi tracking for its fast arrival detection.

If you have Alexa devices and the Alexa app, it makes a good second geofence. I use a combo of homekit, alexa, and wifi. I find that occasionally homekit and alexa get "stuck", but they don't register false events. And the Standard and advanced combiners were made to still work if one of the geofences got stuck and didn't update. They generally get unstuck after a day or so, though my users (family) never notice anything because the combiner works around it.

The Standard Combiner behaves EXACTLY the same as an Advanced Combiner where you put all your sensors into "ANY of these arrive", and put the geofencing sensors into "ANY of these depart". Wifi sensor isn't used for departure at all.

Through much trial and analysis, I found that this was the best overall setup if you were combining geofencing and wifi sensors. But I didn't want the users to have to think about the boolean logic that the Advanced Combiner exposes, so I made the Standard Combiner that is really just a pre-configured Advanced Combiner.

One caveat: This was the best setup if you assume that your geofencing sensors don't throw false events. Homekit and Alexa do not seem to. However, this assumption breaks down with the Hubitat app, where some people are reporting false departures and arrivals. That's a much harder situation to build logic around. (For example, wifi sensors report false departures, but their arrivals are always good. So I can build logic to work with that. Only use the wifi sensor to improve detecting arrivals. And my Alexa geofencing sensor sometimes fails to detect an arrival or departure, but it NEVER reports a false one. So I can build logic to work with that. But if a sensor has both false arrivals and false departures, it's pretty much useless in a combination presence app. That's why I don't use the hubitat app myself.)

That feature is unfortunately not available outside of the USA.

Ok that was my issue with it, I prefer to use "when all of these depart" because it produces no false positives for me.

Fair enough, I prefer using the Advanced logic and so far it's working perfectly as shown above.

1 Like

Since HomeKit has proven to be very reliable, I've taken your advice and removed Wifi detection from the Departing logic. So far it's working well and very fast:

Screen Shot 2020-09-28 at 2.28.32 pm

1 Like

I cannot find standardCombinedPresenceInstance.groovy in GitHub

It's there:

Sorry bother but how do you get th iCloud setup for presence? I, too, want to move away from wifi presence and appreciate any help. Search revealed nothing for "iCloud presence"...

Sorry and Thank You

1 Like

I did a write up here on how I use Homekit with this app.. basically the same setup for Alexa as well if you've connected HE to Alexa. For Connecting HE to Homekit you really need an apple device and Homebridge running.

3 Likes

Yes, will implement Homekit and Alexa tonight. Thanks for the pointer...couldnt find it myself.

Go Seahawks!

Go hawks (and Sounders)!
For bet results though, I highly suggest keeping the iPhone Wifi app on as another input, it's a good safeguard to GPS not knowing you are actually home in those rare events for Homekit, but very often for Alexa.

1 Like