iPhone Geofence not working

May I ask how you use Homekit to do this?

I'd like to know too. Phone presence has been broken for both my wife and I for a few weeks. Annoying too.

  1. You need to connect Hubitat to HomeKit. Use either the MakerAPI or HomeBridge method to achieve this.

  2. Setup a switch for each member of your family you want to monitor, and make sure that switch exist in HomeKit

  3. In the Home app setup an automation using the geofence. If you use the Home App that should be at least 2 automations, per member.

  4. Setup as many Virtual Presence devices as needed on your Hubitat.

  5. In RuleMachine you setup a trigger that watches your switch(es) from HomeKit, and the presence detektors from Hubitat, that switches the virtual presence detektors you created in 4.

These devices can then be used in for example, the mode manager.

The best thing about this, is that you can easily add more presence detektors to the rule in the future. I'm looking for some beacons I might add to this rule.

Does this require you to have an Apple TV, HomePod, or iPad at home? I don’t seem to have the ability to create these automations.

Yes. You need some form of HomeKit base to do automations.

So I kinda got it working using a virtual presence sensor controlled by Alexa, IFTTT, and Hubitat apps. iPhone Hubitat app presence still does not work.

  1. I created a Virtual Presence device using Virtual Switch Universal Device uDTH.
  1. Used the iPhone WiFi Presence Sensor device driver to turn on the Virtual Presence sensor whenever her iPhone connects to the home WiFi. You will need to go into your router and setup a DHCP reservation for the iPhone so that it gets the same IP address every time it connects.

  2. Use IFTTT app on her iPhone to turn on/off her Virtual Presence sensor whenever she enter/leaves the area around our house. I had to create a new IFTTT account for her phone, but you get 3 free apps to create.

  3. Use the Alexa app to create Routines to turn on/off the Virtual Presence sensor based on Location. (Similar to IFTTT)

  4. Use Basic Rules to turn on/off the Virtual Presence sensor whenever the her iPhone presence sensors is present or not present (this never works which is why we need to do all of this stuff in the first place, but figured if the Hubitat iPhone app ever does start working its an extra way of getting timely presence info).

The big problem from what I can see is the iPhone is just killing background apps after a certain time or if too many apps are running in the background. Background apps are battery killers and unless Apple decides that you need it, it will just kill it without caring for the end user (remember when Apple throttled the CPU when the battery was getting old and lost a class action suit). This could be the reason why using the Apple HomeKit works better than others!!!

Android users will have the same kind of problem depending on the manufacturer, Google is working hard so that manufacturers don't kill background apps unless it is user specified to do so, but the big ones like Samsung, LG, etc. are not cooperating very much because having background apps working all the time kills the battery life and they get complaints from users even for non power users.

Except that the IFTTT and Alexa apps work for Geofencing in the background. Hubitat app should also be able to work, but does not.

Don't know about IFTTT for geofencing, but I can assure you that on my iPhone 6S and my wife's iPhone 8 Alexa app does not work for more than a few days before it stops reporting, so unless I open it up every day, it is being killed off in the background. I have tried every thing I could find to keep it up and running but to no avail.

So I just gave up and got a few SmartThings arrival sensors, a part from being battery hungry, they work flawlessly.

My wife's virtual presence sensor is still working correctly. I'm not sure if it is the IFTTT or Alexa app that is working, but it is working. I do know that it is definitely NOT the Hubitat iPhone app that is working.

did you make sure that the correct device id matches on the iphone and in the hubitat device list settings for the mobile device?

Another option people seem to like is Life 360 (free version). That seems fairly reliable


Life360 has been very reliable for my family, on both iOS and Android phones.

1 Like

I'm a new HE owner, and am in the same boat,

My wife's iPhone app never seems to update its presence, I really want to avoid having to get other accounts to solve the problem. I only use presence to enable HSM's away mode, and for thermostat management, so I would like it to work as expected. If there are any tips or tricks that I can try that would be helpful and I would be much appreciated.

Once i disabled the battery optimization mode on my Android phone, its presence has been spot on.

Thanks and Take Care

Enforced iPhone policy sees me also having to use these truly sh1tty devices. No presence issues on Android but now this barrel of laughs of a phone cannot report geolocation properly despite supposedly being able to run in the background. Poor, very poor.

Life360 and Locative have both been ~99% reliable on our iPhones.

1 Like

Yeah I’m using Life360 too and it seems reasonable. Will keep tinkering to see how to improve.

I had some initial related problems. After a ton of trial and error and frustration - I did come to learn that the Hubitat app was a fault source - not the phone per se. The device created at the HE side was being given a name 'iPhone' (in my case). I didn't want that name, so changed the device name to 'Jims phone'. I was also copying the device name to device label.
When I did this, the app began failing in wierd ways. it would connect and report once, then stop ... and sometimes just not work at all.
I switched phones and went to an android. it worked for a good long while - then I changed it one day and into HE Presence Hell I went. At first I couldn't determine what was the cause, then I realized I had upper cased the name ... in effect changing the Device name.
My solve was to delete the devices created by the app, clear the app off the phone, start over and this time I didn't touch the HE created device in the hub. My android hasn't failed since. HOWEVER. I don't trust the HE presence (and the phone OS is always changing too) so I added Owntracks and use Presence Plus to combine the two sensors. I have not had a problem since.

You can change the name of the device in the iOS app’s settings screen. Probably Android too (but I can’t say from personal experience).