iOS Background updates


Apologies if this has already been answered. I did have a look through the forum, however with 13.5 breaking the iOS functionality (now fixed) the forum is flooded with ‘iOS app doesn’t work’ threads

My user case:

Home Assistant ver 0.111.2
Pi4 running the pre-baked SD card
2 x iPhone 11’s running iOS 13.5.1 with App version 2020.1(17)

Both phones have the following settings for the app
Background App Refresh = True
Mobile Data = True
Location Services = Always

If I kill the app (swipe up), and open again, I get a fresh read from the sensors, however, if I leave the app running in the background, or have the app closed and rely on the background app refresh, I get nothing.

As an example, right now my better half is in the office, but according to Home Assistant she’s at home. This obviously breaks any kind of zone automation.

When the iOS app was fixed (as well as the core fixed in 0.110.5/6/7) did I miss a step (clearing cache/reinstalling app) or something?

Also out of curiously, when this works, what’s the trigger for a fresh push of data? Location change, elapsed time?

Thanks in advance.


There is some throttling that goes on in the background with iOS it could be this is hurting you and iOS isn’t prioritising the app. You can check your background permissions are enables through iOS Settings>Home Assistant and also in iOS Settings>General>Background App Refresh.

Significant location changes (normally based on cell tower) will cause a location update, the remaining logic at the moment is buried deep in iOS I believe.

There is a new implementation of the location service included in the next upgrade, this will be opt in at the moment while it is fully tested. This hopes to improve the background behaviour.

Many thanks for your response Tom, I’ll check the settings on her phone when she’s home from work.

That first settings path I gave you (iOS Settings App>Home Assistant) may not contain the Background App Refresh option as it was only added in the build that’s just clearing beta at the moment. The second option should be there, check Home Assistant is enabled in the big list of apps and that the general “Background App Refresh” at the top is set to Wi-Fi & Mobile Data

Thanks Tom, I’ve just checked.

I’ve checked the following
Location - Always
Background App Refresh (Wi-Fi & Mobile Data) - Allowed

Everything looks good.

I’ve deleted and re-installed the app, so let’s see what happens tomorrow.

1 Like

Sounds good fingers crossed. We’ve seen people report that the app didn’t update much for the first day or two and then gets better. I think this is all due to how iOS allocates resources and priority in background so just hang with it and see how it goes

Cheers Tom, fingers crossed :slight_smile:

We’ve used the app since one of the initial betas and nothing has helped the night time wandering when the phones are asleep. They’ll wander off hundreds of miles.

Opening any OTHER location services app will wait long enough for a real location fix in only a few seconds and then the HA app benefits from the other app waiting for the accuracy number to come on in to something resembling reality.

Lately I’ve been playing with the icloud3 integration to see if its built in logic can settle down the rural cell tower wandering (we can be sitting in our living room and have a “significant location change” just because every tower we hit is over the horizon AND long range. Any slight variance in RF propagation will flip towers easily, although all are usable. A few are also technically “domestic roaming” due to the vagaries of FCC license boundaries, so we jump whole networks).

So far, not great. Apple’s not really interested in providing backgrounded apps with accurate location data. Not really an HA app problem per se, but tracking via Apple’s servers is really not great no matter how it is sliced.

I have tts announcements of us leaving home and returning and it’s hilarious at first to be sitting in the living room being told that you left and came back. After the hundredth time it gets old.

I also use the Person integration to add things like local LAN presence detection together, but icloud3 doesn’t provide its filtered and logically corrected data to the Person integration, so mixing it with LAN is more steps and more code and can’t be done via the Integration UI yet.

If someone really wants tracking on iOS to work, staying away from the HA solutions is probably best really. But since the last time I looked I haven’t seen If third party trackers have been adversely affected by the iOS wandering thing or if they do what mapping apps do and wait for the accuracy number to come down before claiming they have a valid location.

I think my record is going 6000 miles from home and back in less than a minute. LOL :slight_smile:

Thanks Nate.

Luckily where I live, I’ve got line of sight to the nearest tower. I think as I also wear a Garmin watch (which poles the phone for location often for weather updates) it’s pretty accurate for me.

This is the odd thing, my iPhone can detect when I’ve ‘popped out’ to the local shop (less than a mile away). This is being recorded in HA very accurately. However the problem seems to be with my other-halves phone. We have identical phones, software versions, the works…however tracking works on mine, but not hers.

As I type this, I’ve checked the step count sensor for both our phones. Mine updated at 7:46am this morning, hers updated at 8:17pm last night.

I’m hoping that when she leaves for work, the change in tower will force a pull/push of the sensors.

Happy to say, with the latest iOS update & a phone reboot, everything is working as expected.

Thanks all for your help.