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).

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’