Most successful presence detection?

The Shortcut looks correct. If I remember correctly, that notification shows up the first time only and things are fully automatic in the background after it has been allowed the first time.

2 alternatives to Shortcuts.

  1. Use Homebridge with a virtual combo switch/presence sensor. You need to set up an automation in Apple Home using similar logic as for Shortcuts. The benefit is that a switch and automation lives in the Apple Home system while Shortcuts live on an iOS device. The combo presence/switch driver is here:
    https://raw.githubusercontent.com/ogiewon/Hubitat/master/Drivers/virtual-presence-switch.src/virtual-presence-switch.groovy

  2. Use Geofency instead or in addition to native Apple presence
    [RELEASE] Geofency Presence

Hmmm my wife came and went numerous times today and the Shortcut notification came up for her with a run button every single time. So she ran it every time she came or left. I have no idea what to do. I can’t find any sort of setting asking for a permission to run automatically. I guess I’ll need to examine some of the other options perhaps.

I have another screenshot where I expanded one more section. As well under “Shortcuts” in the iPhone settings app and then ”Advanced” I have included my current settings. Do I need to change any of these by chance?


I’m the Settings app, before the screen you showed, there is a Location setting. Mine is at “Allow while using the app”

Looking at Enable or disable a personal automation in Shortcuts on iPhone or iPad - Apple Support it says that you can’t automatically run a arriving/leaving application. However, I clearly do it. It is possible that you need to create the automation from the Home app instead. Once you get to the action part, at the very bottom under “Advanced” choose “Convert to Shortcut” and then create the same two-step automation you created before.

I tried the "Convert to Shortcut" method in Home app. I then went for a drive around the block as a test and it appears to have worked for both my departure and arrival. Thanks for all of your help. I think you've got my automations to a good place.

I'm trying to do the same as @chicoquente. I noticed when I switched from the Shortcuts app to the Home app, per @aamann's suggestion, I could no longer trigger an action off of "When I leave" or "When I arrive". Instead, the only option was "When Anyone Leaves/Departs Home". Since I'm setting up this automation for each member of the family (each with their own virtual presence sensor via Maker API), how will this work? How does Home map "anyone" to the specific device for geofencing? TIA....

You missed a step where you set the people up.

  1. Open “Home” app.
  2. “Automation” tab.
  3. Top right corner select “Add Automation”
  4. Click “People Arrive” (and “People Leave” for your exit automation)
  5. Click the “i” beside “Anyone Arrives” and select just 1 person (do this over and over for each person you create an automation for). Hit “Next”.
  6. Scroll to the bottom and choose “Convert to Shortcut”.
  7. Follow the directions above.
2 Likes

I am in Android, HE app, life360, and Improved Mobile Presence aggregated with Presence Monitor, and that has been rock solid.

3 Likes

My birds look at me like... "yeah... and...?"

For me, redundancy has been key. In particular using a GEO fence solution plus local wifi.
For geofencing HomeKit has been the most reliable for me (I'm running an rPi with Homebridge on it).

See: [RELEASE] Combined Presence - #209 by SoundersDude
image

I'm just going to throw my two cents in here because I have had a rock-solid presence detection for years now, with no extra apps, all within Hubitat. There could be an easier way to do it now, I'm not sure with new things being added to Hubitat and new apps all the time, but I can't see changing something that has worked better than any application I have ever tried. I have tried Life360, Blue Iris implementation with their geofence, Tasker, etc. and somebody said that if one fails, they all do and that was accurate in my point.

I have two "virtual" WiFi Presence Sensors (one for me and one for my wife) that use a neat driver code from author Joel Wetzel (iPhone WiFi Presence Sensor). It has been some time but, if I recall, this driver searches for an IP Address every so often and and updates the presence sensors as needed. Of course, we have a very solid home network so this works for us and if our phones are off our network then we are not home and vice versa.

Of course, I have other triggers to make sure if there are hiccups here and there with this device/driver (maybe it will falsely say a phone is now on network or out of network after a restart or something); such as, I am a developer so I have a house panel next to the door we leave out most often where she or I click a leaving switch, which turns on outside lights, unlocks doors, opens garage door and shutting the garage door means that person has left and the garage opening and a person's phone being found on WiFi within the same minute means that person is home (if their presence has been gone). All done within Hubitat.

What I found is really nice with this is there are bugs in our phones sometimes and recently we have found that if our phone restarts, it connects to WiFi but has no internet. With this process, it checks the local network so it still finds our phone on the network and behaves as it should. I also pause rules with other rules as necessary to make sure there is no phantom such and such "is home" or "is away" stuff. Absolutely no hiccups unless the wife takes her phone off WiFi for some reason during the day while out of the house and forgets to turn it back on by the time she gets home.

Thank you for this. I was able to implement a version of this on Android with Llama and Automate. I am a die-hard Llama user, and just couldn't be bothered to recreate its very reliable cell polling feature in Automate. So, I just used Llama to create a Toast message when my phone leaves or enters an "area". This Toast message is one that Automate detects, then submits the HTTP request to toggle the virtual presence.
I had to use the cloud URL for the "departed home" scenario because I wouldn't be able to access it without VPN, and the local URL when "arrived home". Should I be concerned about any security issues because I exposed the cloud URL via Maker API?

Late to the party, but since this thread popped up, for others prerusing it...this has been perfect for me. Set it and forget it...

2 Likes

Download the Hubitat app