Android companion app - location data inconsistent - with evidence(?)

I have been following the recent threads about location because we have been having real issues with it over the last few weeks.

I read somewhere that Android 15 might fix it so I have waited for that but even now we are still having issues.

Today I looked a little closer as I had the opportunity to look at things while I was home and another phone was away.

I discovered that the phone that is away is not getting updates to it’s device tracker even though the geocoded location is.

For example, right now and for the last 90 minutes at least, they both have different lat and long. Geocoded Location is correct, Device Tracker is not (I’m showing just the decimal lat/long for privacy):

Device tracker:

Geocoded Location

Just to be clear in case it is relevant, for the example above the phone is probably in a Zone.

We both have the same problem, we both have Pixel 7a phones, both on android 15 and all other settings are the same and as they should be as per the docs (it has worked beautifully for years until now)

Any ideas?

start here https://companion.home-assistant.io/docs/troubleshooting/faqs/#device-tracker-is-not-updating-in-android-app

In the users post, they say they have been reading the docs and followed the turn off battery optimization, etc. From what the screenshots are showing, data is being sent to Hass via the companion app for geocoded data, but the device tracker isn’t updating its location.

So, location data is being passed from device to hass, but the device tracker isn’t using it. This seems more like an issue with the device tracker code than the device not sending the data due to sleeping or optimization.

if the user followed the steps the link stll goes on to talk about location history which is still part of the troubleshooting.

I’ve been through that (I probably should have said).

I have location tracking turned on. There seem to be big periods when it doesn’t send an update e;g; between 12:34:00 and 17:30:15

I believe I am right in thinking but can’t be sure that at 17:30 I used the app.

Obviously I don’t know the inner workings of the app but it is confusing that the geocoded location gets updated lat/lon but that the device tracker doesn’t update
Other settings…

so this time gap means the app was unable to wake up and get an update. Updates come from Google so we depend on the app to be woken up.

geocoded location sensor is not guaranteed to match the device tracker, the map you see in location history is whats meant to match the device tracker.

you may need to try and look at the companion app logs when you see that time gap to see if there is a potential error that may prevent an update. Its tough to say honestly as time gaps are not easy to troubleshoot

Just a small clarification about your reply,

Was the ‘either’ a typo or did you forget to offer a second explanation?

Also, how do I get the companion app logs? I have had a look and it is currently only showing about 5 minutes worth (I estimate about 200 to 250 lines) and I can see no option to save more than that.

Although with ~250 lines in 5 minutes I am not sure I’d want to be saving everything until I notice a gap in location tracking?

typo sorry

yup thats how far back they go, not too far so youll need to check the app when the issue occurs unfortunately

During this time gap are you seeing other sensors update from the app? Like the device battery level?

While I’m working on that does the following help?

While I was walking the dog this morning I kept an eye on the location log as best I could.

  • my WiFi device tracker reported me not home at 10:05
    (I forgot to check the exact time I left home)
  • The logs have me at a duplicate location until 10:11
    Looking at the map link from the logs that still puts me very close to the previous location and within my home zone so that is a bit surprising as I have been outside WiFi for several minutes of continuous walking
  • the location logs finally have me exiting the Home zone at 10:17 (12 minutes after the WiFi Device tracker)
  • Two quick updates follow
  • At 10:19 I get the last update for nearly 22 minutes
  • And no more updates until 10:31 when I leave my ‘nearly home’ zone
  • At 10:42, eleven minutes later I get a ‘Very old location’ update
  • At 10:49, seven minutes later I get another ‘Very old location’ update
  • At 10:50, one minute later I get a ‘Not accurate enough’ update
  • At 10:53 when I re-enter my ‘nearly home’ zone I get an update
  • I then get updates every 2 or 3 minutes until I enter my home zone
  • At which point I am getting very regular updates (almost every minute) for the last few hours

I don’t know if this helps in any way to troubleshoot but my observations from this single episode are:

  • Changing zone seems to always trigger an update
  • Updates appear to be much more frequent when on WiFi (and hence not actually changing location much!)

Also, based on casual observations since this all started to ‘go wrong’ (so not in the least bit scientific) it seems that it is an intermittent/inconsistent problem.

Sometimes when I watching the location of the other phone using the app it will update so regularly (and accurately) that I can watch the location frequently moving very precisely on the street/path that it is on when it has been both walking and driving.

I appreciate this is difficult problem but I would really like to get to the bottom of why it has stopped working after several years so if there is anything specific I can do to help, let me know.

Thanks.

In the meantime I will try to get data on other sensors updating, or not, while location doesn’t.

Here are the logs in case they are easier to read than my notes




Ok, so I have now been able to look and yes, I get battery updates even when no location updates are received by the device tracker.

Battery history for 09:55 to 11:15

Device tracker

For completeness, geocoded_location

Does this tell us anything interesting?

I’ve just seen this github issue.

Should I add to it with the info I have provided here or do you think it might be something different?

no it looks to be the same here, there is actually a similar issue on Googles tracker mentioned in the comments which I suspect to be the issue.

the way it works is the app sends a location request to google with certain parameters and we wait for google to send updates back.

since you see sensors updating at the same time its not an issue of the app not being woken up its simply google is not sending the app updates to process.

Oh, I mistakenly thought that had been fixed in Android 15.

Ok, so I should just wait and hope for a Google fix?

It does seem strange that there are not more ‘complaints’ on this forum unless it is a very random bug and we have just been very unlucky that both our phones are affected!

there are multiple threads on the forums, some on discord, and in the issue tracker. I have indeed seen an increase in users noticing things.

Personally speaking i dont rely soley on the apps device tracker. I also use the wifi connection sensor which i find updates faster for home/away detection.

1 Like