Author Topic: Geofence Issues After Upgrading to iOS 11  (Read 1188 times)

Offline agoodman82

  • Sr. Member
  • ****
  • Posts: 296
  • Karma: +1/-1
Geofence Issues After Upgrading to iOS 11
« on: November 08, 2017, 09:49:27 pm »
Is anyone else experiencing issues with VeraMate after updating to iOS 11?

Before I updated, my geofences were working properly regardless if the VeraMate app was open or closed. Now however under iOS 11, if the VeraMate app isn't working and running in the background, my geofences no longer function. I have enabled VeraMate to use location services and the app refresh is active for it to run in the background, but geofences still won't function unless I actually have the app open. This now occurs with both my iPhone 8 and my wife's iPhone 8 Plus both running iOS 11.

Any ideas?

Offline Don Phillips

  • Hero Member
  • *****
  • Posts: 1291
  • Karma: +33/-32
Re: Geofence Issues After Upgrading to iOS 11
« Reply #1 on: November 09, 2017, 08:32:08 pm »
I cannot help with the geofencing but I have been using iPhone Locator for years. Vera communicates directly with your iCloud account to ping the phone and is software independent. To add a second phone, add a device and configure it with the second iCloud account.
Vera 3, 1.7.1030, CT101 t-stat, Everspring motion detector, GE/Jasco switch, Leviton outlet, AeonLabs sensor, NuTone garage door, Blue Iris, Sricam SP011, iPhone locator, APCUPSD, VeraMate, VeraAlerts, PLEG, House Modes, Countdown Timer, DVR, Virtual/Multi Switch, Weatherunderground, LB60Z-1 bulb

Offline agoodman82

  • Sr. Member
  • ****
  • Posts: 296
  • Karma: +1/-1
Re: Geofence Issues After Upgrading to iOS 11
« Reply #2 on: November 22, 2017, 10:22:21 pm »
I was initially using the iPhone Locator plugin in conjunction with PLEG for scenes, but found the iPhone locator plugin to actually register my iPhone location fairly spotty at times as well as having a big draw on battery life from the pings. VeraMate, like Vera's own stand-alone app has their own geofencing built in and I found VeraMate's geofencing to be extremely responsive. That was... until I upgraded to iOS 11 anyway :(

When looking at VeraMate in my iPhone settings it has the location services set to use my location only when the app is in use. Was that always like that, or was there ever a time, like with many other apps, where there was an option for VeraMate to use my location "always" (even when the app isn't open and in use?? I feel like the problem is iOS 11 isn't letting VeraMate track my location unless the app is actually open, which is annoying because now iOS 11 warns you with a flashing blue bar at the top of your iPhone screen that "VeraMate is actively using your location". I'd rather VeraMate have the ability to stay closed and still track my location. But even with VeraMate open and running in the background, something is still very wrong with geofences as it isn't responding anymore, or the delay in response is completely unacceptable.

Offline Don Phillips

  • Hero Member
  • *****
  • Posts: 1291
  • Karma: +33/-32
Re: Geofence Issues After Upgrading to iOS 11
« Reply #3 on: November 23, 2017, 09:00:48 pm »
VeraMate was updated shortly after iOS 11 was released.  Are you on VeraMate 11.9.1.2?

I have not had battery issues with iPhone Locator. I have my polling set to 300 sec, dynamic polling, and set up a scene that pings both phones immediately and every minute for 5 minutes when the garage overhead door is opened. I do that to ensure I am set to Away mode when the last one of us leaves so I do not have to wait up to 5 minutes for Vera to know we have left. 
Vera 3, 1.7.1030, CT101 t-stat, Everspring motion detector, GE/Jasco switch, Leviton outlet, AeonLabs sensor, NuTone garage door, Blue Iris, Sricam SP011, iPhone locator, APCUPSD, VeraMate, VeraAlerts, PLEG, House Modes, Countdown Timer, DVR, Virtual/Multi Switch, Weatherunderground, LB60Z-1 bulb

Offline agoodman82

  • Sr. Member
  • ****
  • Posts: 296
  • Karma: +1/-1
Re: Geofence Issues After Upgrading to iOS 11
« Reply #4 on: November 27, 2017, 07:47:55 pm »
Don,

After you had mentioned iPhone Locator again I looked back into it and decided reinstall it after my frustration with VeraMate's now-unresponsive built-in geofencing.

I've run a few tests and so far all is working well as it does take the burden of firing scenes for me off of VeraMate's shoulders. My only issue is I forget what I used to have set for polling intervals and such. I know there are many ways to customize the polling of iPhones with the plugin... Ideally I'd like minimal polling done when my iPhone is home, and then I have a geo-fence set up for leaving/arriving home at .15 miles from home. I'd like the polling frequency to obviously increase as it hits the geo-fence leaving, but then get longer in between intervals the further away I get from home. Coming back home, I'd like the polling intervals to increase enough to get good readings to trip the geo-fence to set my "home" scene, and then have the polling interval decrease significantly once home again.

I know you can technically make scenes utilizing the "mute"/"unmute" button like your devices would be muted once you arrive home and only "unmute" when say the garage door was triggered. Do you utilize that feature at all in your scenes? I'm not sure how the battery drain would be on my phone if I left the plugin to constantly poll even if I'm home vs setting a scene where if I'm home the plugin would be muted.

Right now I've got my polling map set to: 0:900,0.15:30,1:75,2.5:180,5:450,15:900,30:1200,50:1800,100:3000

Offline Don Phillips

  • Hero Member
  • *****
  • Posts: 1291
  • Karma: +33/-32
Re: Geofence Issues After Upgrading to iOS 11
« Reply #5 on: November 27, 2017, 09:36:08 pm »
I tried to keep the polling simple (for my simple mind). See the attached image.

What I have set up is a scene I call iPhone Check. When the garage door is opened, it immediately pings both phones, and pings them every minute for 5 minutes. When I leave in the morning, Vera goes to Away mode usually about 3 minutes after I leave.  The scene was created for when the last person  leaves. When I come home, it usually knows I am back (using the dynamic polling) shortly after I open the door.

Sometimes, iCloud is a little tardy and I may get door and motion alerts for about a minute, maybe once or twice a week.

Vera 3, 1.7.1030, CT101 t-stat, Everspring motion detector, GE/Jasco switch, Leviton outlet, AeonLabs sensor, NuTone garage door, Blue Iris, Sricam SP011, iPhone locator, APCUPSD, VeraMate, VeraAlerts, PLEG, House Modes, Countdown Timer, DVR, Virtual/Multi Switch, Weatherunderground, LB60Z-1 bulb

Offline agoodman82

  • Sr. Member
  • ****
  • Posts: 296
  • Karma: +1/-1
Re: Geofence Issues After Upgrading to iOS 11
« Reply #6 on: December 04, 2017, 12:43:38 am »
Cool, thanks for sharing your set-up.

I've re-set up a PLEG device to handle all my "Away"/"Home" conditions and logic which will "Arm" or "Disarm" things depending on the state, all based upon the iPhone polling done by the iPhone Locator Plugin. 99% of the time I find the plugin very responsive in setting my state to "Away", but less reliable when returning "Home". I have a PLEG set up such that when I'm home my iPhone Locator plugin is muted to save on battery life instead of constantly polling. If open a sensored door to leave my iPhone Locator Plugin is then unmuted for a few minutes to begin tracking my movement -- if I remain at home it re-mutes. I've messed with the polling to try to make the pings occur more frequently the closer I get to home and less frequent the further away I go. The issues with returning "Home" is finding the balance of polling frequency vs how quickly I'm actually able to get back home.

To me the main benefit of VeraMate handling my geofence-triggered scenes was that VeraMate always knew where I was because the home geofence I had was set up right in the app. There was no need to actually poll my phone because the app itself created my home geofence and knew the instant I left or entered it, making VeraMate's tracking of my phone very responsive. With the iPhone Locator Plugin it needs to poll a phone because the home geofence was created in the Plugin in the Vera UI... like I said in my testing and experience it works rather reliably when leaving a home geofence, but appears to have much spottier tracking when returning back home.