Issue with Device Tracker iOS app not updating? (always home or away)

The entire family has the Home Assistant app installed on their iPhones, and for everyone is it set as the device to track. I’ve noticed however it’s generally not updated very regularly. To a degree where it is unreliable. It generally lists everyone as home for days on end. When checking you can then see the last update date was sometimes as much as ‘3 days ago’.

Within iOS I have all my settings correct as far as I know. Background, location services turned on. I’ve even used the ‘update my location’ feature and see no change from the say ‘3 days ago’.

Anyone any tips on how to solve this? It’s so unreliable atm that I cannot base any automatons on it (for example I have an automation that warns us when a window is left open but everyone is out of the house, I’ve re-written it to be based on if the alarm system is turned on or off).

2 Likes

Since you’ve checked whether the device_tracker is on the person, the most likely culprit is one of:

  1. The “Location” permission for Home Assistant must be set to “Always” and not “While Using”. iOS will regularly prompt the user and the most obvious and default action is to reset this to “While Using”.
  2. External access is not working. Try turning off Wi-Fi and see whether it’s able to communicate back to your Home Assistant.

You can debug location issues a few ways:

  1. Look at the Location History under Location in the app’s settings. This will give you an idea what the app decided was a worthwhile update and when. It should show you location vs. zone position in an informative way.
  2. Look in the Event Log under Debugging in the the app’s settings. It may log errors related to location updates failing (you can ignore the “too old” logs – that is a red herring – look for something like webhook/update failures).
1 Like

Checking my family phones they where indeed set to ‘While Using’ (and I noticed they often put their phones in battery save mode, which disabled background loading). I also noticed my own phone was set to ‘While Using’ a few days ago, and turned it back to ‘Always’. External access is working (using Nabu Casa cloud). It may have been that people set it back to ‘While Using’. If so, dumb I didn’t check it, but also glad if that is the issue :slight_smile:

That will definitely do it. Low power mode won’t affect location tracking. You’ll want to teach them to choose “Always” when the system inevitably prompts to confirm the setting. It looks something like this:

(via this old MacStories review of iOS 13 so it’s slightly different now – I believe “change to…” is bold.)

1 Like

Yes, I also get them. I’n already happy I finally convinced them to keel killing apps that use geolocation. On to the next challenge :smirk:

Thanks!

The issue was indeed that location wasn’t set to always. Since it has been changed, working like a charm!

If it only while using was selected. Whats the easiest course of action to switch it to always?

If you are using iOS. Go to Settings → lookup Home Assistant → Location → switch to ‘always’

It’s a common issue with apple devices: for some reason, they always need your location. Even to do things that apparently do not need your location. It makes me remember all those conspiracy theories about smartphones spying on us.
As far as I remember, I have even read something on https://zumroad.com/tеch about it. Anyways, I would not like my phone to follow my location constantly. Is it possible to turn it off on my iPhone? Do I need to hack it for it somehow? And will it be eligible for warranty restoration if I do something like this with the software of the phone?

Hey there, stumbled upon this thread so I thought I’d try my lucky here. My device tracker is always home, no matter where I go. Even if the phone is off (but that might just be a “last known location” thing). The app does have “always” in iOS location settings. Any ideas, guys?

4 Likes

I’m having the same issue right now with my wife’s iPhone. Confirmed it is set to “Always”.

My android works perfectly fine, as does the car (that has an integration).

2 Likes

got the same issue. for me and my wife. app installed, external access is working. app location history show correct locations. set to always. but no update on the device tracker entity. all other entities are updated regulary (battery for example). any ideas?

1 Like

Same here… Wife’s phone HA App’s location is set to ‘Always’ but frequently goes back to “When used”. My wife would not know making any changes herself, so it is a software issue. The Find People works fine and reports correct location 24/7.
It is annoying as we have Automations based on being home or away.

Same here… and it became quite annoyng since life360 has stopped to work in HA.
https://github.com/home-assistant/core/issues/105816
I have replaced device_tracker.iPhone_XXX with life360 integration until now.

I found out earlier this week, that my wife was getting a notification whenever her phone restarted from her iPhone that basically said something like “This app is tracking you. Do you want it to track you?” and because I had instructed her to always say “no”, she was doing it to home assistant. I changed the Companion App again to “Always”. She stopped doing that and it is working significantly better (still not as good as the tracker in my Android phone). I can actually use zone notifications now, but not for anything that needs to be instantaneous. Also, the GPS accuracy isn’t as good as the Android (much larger radius on a map).

I have read that the icloud3 v3 integration through HACS is even better once setup. I installed it, but still need her account setup in HA to work on that now.

1 Like

I don’t have life360, but I just read about the issue on Facebook earlier this morning. Reading through the issue, it seemed like it might be going the way of MyQ due to the authorization being blocked actively by Cloudflare.

Thanks I will lok at this integration.
It’s possible to add multiple account?

My wife is the only one with an iCloud account, but it looks like it’s not possible after a search, but the creator offered a solution in the thread here. The linked comment is the issue and the creator responded (a few times) with possible workarounds.

https://gcobb321.github.io/icloud3_v3_docs/#/chapters/1.0-introduction

I had the same issue and found this thread via Google.
Today I decided to setup the HA cloud, because I dont want to always turn on VPN.

I regonized that the location was not updating and also not for the battery status.
The only thing I did was, appart from enabling the cloud functionallity, that I inserted an external address to the IOS App.

Not sure if I have to do this, because there were no information that I have to do it.
After I enabled the cloud, I checked the App and I confirmed that Cloud is connected. (I was in my local WiFi) I did a walk and I was NOT able to connect to HA. This was the reason why I entered the nabu adress as external IP. Is this the correct way ? Or should it update automatically while connected to the WiFi ?

How ever, after this I was able to connect from the mobile network.
Now I am at work and regonized that HA tells me I am still at home.
Checking the debugging of the app shows me a correct location.

**Long story short, I checked **
Settings → People → My Account
and regonized that there is a 2nd entry for my iPhone available, labled with a “_2” at the end in the entity name. (same friendly name)
The old device stopped updating at around the same time as the new one starts reporting.
I assume this is a bug in HA or in the App.

Maybe this is is helpful also to other people having this issue that the location is not updating.

Isn’t [… always home or away … ] a binary thing?