Location updating doesn't work (very serious problem for my automations)

Hi everyone, I have a problem with the location update that plagues me.
I have a OnePlus Nord smartphone (Android 12 OxygenOs 12.1) which updates all sensors very well except my location which is always “home”.
I have enabled all position sensors with precise locations, allowed the app to run in the background, battery optimization is off, data saving is disabled.
The location doesn’t even update when I restart my smartphone or when I open the app.
I tried clearing the app cache but the situation doesn’t change.
The only way to update the location is to log out and log in, but the next day the problem returns.
For me it is very serious because the “Away” automations don’t work.
I did a lot of research and found on the oneplus community forum a topic about Google Home location update issues.
My girlfriend’s samsung updates the location correctly.
Help me!!!
(Sorry for my google english translator)

3 Likes

if you still experience issues after following the steps keep reading and look at the mentioned logs.

I am having the same issue on my Android phone (Pixel 4, Android 12).

I have done the linked troubleshooting steps. All of my phone and app settings for data, battery, permissions, location, and so on are as they need to be. I’ve lost count of the number of times I’ve checked them. I check for updates to the HA app and Android System Webview daily. Based on advice from another thread on this issue, I also tried clearing cache/data for the app, removing the entry from HA entirely, restarting, and re-setting up the app. I’ve used Running Services to monitor HA processes and see no sign that the cause is that they’re being pruned. None of these things solved my issues or showed me what the problem is.

I can fire up the HA app, see the Location Service icon appear at the top of the screen, but it inevitably disappears and location stops doing frequent updates in HA. Bringing the HA app into the foreground brings it back and frequent updates resume. There is no consistency in how long it stays up and works properly - It’s been as short as a few minutes and as long as several hours. This happens regardless of phone state - Active use, idling with screen unlocked, charging or not, screen on or off, WiFi or mobile data.

I’ve looked at logs repeatedly, and the only things they show is gaps between LocBroadcastReceiver log lines that correspond with the Location Services icon disappearing.

What else is there to do here? I’m at my wits end trying to make this work.

The correct steps to follow here you may have already done, Troubleshooting | Home Assistant Companion Docs

Does this only happen with location updates? What about sensor updates do you see the same thing there?

So this is hte workflow for location updates.

  1. The app makes a request for location updates, you will see a log statement for this.
  2. Google then will send updates for location to the app, you will see a log for this. Without this step the app is not getting updates from google and that can either be caused by the app being killed in the background or google is just not sending an update. Updates are requested for a minimum of 60 seconds but a backlog of 3 minutes. They are also passively received when GPS is used by another app every 30 seconds.
  1. The app also has specific logic in place to decide if a location update should be sent or not, you can see this by the logs however this only happens after we receive an update from Google.

so are you seeing step 2 frequently?

I’m not sure I understand what you’re asking but it seems like you’re asking about SensorWorker notifications from HA? I’m talking about the icon that Android itself puts in your top bar to show you that your location data is being accessed:

When it’s sending updates with the frequency I want it to, that icon is constant and persistent. When the issue starts happening and updates stop coming frequently, the icon is gone. I’ve confirmed that this corresponds to my phone’s issues by comparing to my wife’s phone, which is always sending frequent location updates.

When it is working properly, yes:

Line 20: 07-08 11:09:12.816 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 39: 07-08 11:09:24.083 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 76: 07-08 11:09:33.804 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 86: 07-08 11:09:37.779 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 105: 07-08 11:09:42.792 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 133: 07-08 11:09:52.810 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 143: 07-08 11:09:56.060 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 153: 07-08 11:09:58.179 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 163: 07-08 11:10:01.374 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 173: 07-08 11:10:03.828 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 183: 07-08 11:10:07.811 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 193: 07-08 11:10:11.112 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 203: 07-08 11:10:12.790 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 213: 07-08 11:10:17.254 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 223: 07-08 11:10:17.821 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 233: 07-08 11:10:21.505 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 243: 07-08 11:10:22.788 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 253: 07-08 11:10:26.363 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 263: 07-08 11:10:27.783 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 273: 07-08 11:10:31.126 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 283: 07-08 11:10:33.817 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 293: 07-08 11:10:36.376 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 321: 07-08 11:10:42.807 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 340: 07-08 11:10:47.814 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 395: 07-08 11:11:02.796 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 414: 07-08 11:11:08.020 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 433: 07-08 11:11:13.959 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 452: 07-08 11:11:17.795 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 489: 07-08 11:11:28.602 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 508: 07-08 11:11:32.793 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 527: 07-08 11:11:37.819 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 582: 07-08 11:11:52.824 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 601: 07-08 11:11:57.816 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 611: 07-08 11:12:01.634 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 621: 07-08 11:12:02.802 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 690: 07-08 11:12:12.786 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 718: 07-08 11:12:17.797 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 746: 07-08 11:12:22.778 20644 20705 D LocBroadcastReceiver: Location update sent successfully
	Line 774: 07-08 11:12:27.791 20644 20710 D LocBroadcastReceiver: Location update sent successfully
	Line 856: 07-08 11:12:43.866 20644 20727 D LocBroadcastReceiver: Location update sent successfully
	Line 882: 07-08 11:12:47.961 20644 20682 D LocBroadcastReceiver: Location update sent successfully

When it is not working properly, no:

Line 16: 07-08 09:50:03.052  9885 21200 D LocBroadcastReceiver: Location update sent successfully
	Line 31: 07-08 09:53:01.900  9885 21200 D LocBroadcastReceiver: Location update sent successfully
	Line 41: 07-08 09:56:22.856  9885 21200 D LocBroadcastReceiver: Location update sent successfully
	Line 156: 07-08 10:03:46.632  9885 21200 D LocBroadcastReceiver: Location update sent successfully

Not the notification per say but if the updates are still being sent to HA. If they stop at the same time location updates stop then that means the app is definitely being killed in the background by something. Location sensors are part of the sensor worker.

This frequency is with high accuracy mode which by default gets updates every 5 seconds.

this is more standard frequency actually, falls in line with our original request as noted above.

Sounds like what you are after is using high accuracy mode if you want it every 5 seconds like the first set of logs shows.

Yes, high accuracy mode is what I want, and I have it enabled. That is the issue. It does not consistently function as expected.

Then I would also expect sensor updates to be impacted by it. High accuracy mode stays active until its turned off by either the user or android, there is also a persistent notification created specifically to keep the app alive while its on. It sounds like you may need to go through your phone settings and find more options to disable battery/power saving features.

I find this site provides some good tips on what else you may need to change: https://dontkillmyapp.com/

Some times a manufacturer gets too aggressive with killing apps and they introduce more settings than we can account for.

If it’s getting turned off, it’s not me doing it. So what would Android be doing that turns it off?

I’ve done that, repeatedly and exhaustively. I don’t use any battery saving features on my phone and I also have the HA app specifically set to Unrestricted. I have Background data and Unrestricted data usage enabled for it. I have given it Location permission all the time and enabled Use precise location. I’ve checked all these settings while it’s in a state that it’s stopped sending frequent updates and none of them have changed. I’ve even dug through Developer Options looking for anything that could possibly be causing the process to get pruned and found nothing. dontkillmyapp.com doesn’t even list Google and its “Other vendors” section doesn’t contain anything I haven’t already checked and doesn’t appear to be up to date for Android 12.

So, I don’t know what is left for me to go through.

feel free to force stop and reproduce the issue and share the logs here. Just mask your URL and GPS data. The full logs should show us the actual issue, we have a lot of debug statements so we can see whats going on.

you can also file an issue on github and provide the full logs and details there. But that is the correct place to go for issues after following the documented troubleshooting steps.

Here are a set of full logs from earlier this morning when the issue happened:

07-08 09:37:38.612  9885 21200 D UrlRepository: localUrl is: false and usesInternalSsid is: true
07-08 09:37:38.613  9885 21200 D SensorWorker: Updating all Sensors.
07-08 09:37:38.616  9885  9913 I WM-Processor: Moving WorkSpec (79ba1331-235a-484e-91ed-b19b792c7641) to the foreground
07-08 09:37:38.625  9885  9885 I WM-SystemFgDispatcher: Started foreground service Intent { act=ACTION_START_FOREGROUND cmp=io.homeassistant.companion.android/androidx.work.impl.foreground.SystemForegroundService (has extras) }
07-08 09:37:38.635  9885 21200 D UrlRepository: localUrl is: false and usesInternalSsid is: true
07-08 09:37:38.720  9885 10275 D LocBroadcastReceiver: Forcing of high accuracy mode disabled, because high accuracy mode had to be enabled anyway.
07-08 09:37:38.721  9885  9885 D ForegrndServiceLauncher: Check if service HighAccuracyLocationService is running. Service running = true
07-08 09:37:38.772  9885 21200 D UrlRepository: localUrl is: false and usesInternalSsid is: true
07-08 09:37:39.646  9885  9919 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=79ba1331-235a-484e-91ed-b19b792c7641, tags={ io.homeassistant.companion.android.sensors.SensorWorker } ]
07-08 09:37:39.649  9885  9885 I WM-SystemFgDispatcher: Stopping foreground service
07-08 09:41:00.743  9885  9885 D LocBroadcastReceiver: Got single accurate location update: Location[fused xxxxxxx,xxxxxxxx hAcc=4.423 et=+14d12h5m51s643ms alt=xxxxxxxxxxxx vAcc=3.335268 vel=0.061522335 sAcc=0.31144822 bear=193.906 {Bundle[EMPTY_PARCEL]}]
07-08 09:41:00.744  9885  9885 D LocBroadcastReceiver: Location accurate enough, all done with high accuracy.
07-08 09:41:00.746  9885  9885 D LocBroadcastReceiver: Last Location: 
07-08 09:41:00.746  9885  9885 D LocBroadcastReceiver: Coords:(xxxxxx, xxxxxxx)
07-08 09:41:00.746  9885  9885 D LocBroadcastReceiver: Accuracy: 4.423
07-08 09:41:00.746  9885  9885 D LocBroadcastReceiver: Bearing: 193.906
07-08 09:41:00.746  9885  9885 D LocBroadcastReceiver: Begin evaluating if location update should be skipped
07-08 09:41:00.746  9885  9885 D LocBroadcastReceiver: Received location that is 158746 milliseconds old, 1657298302000 compared to 1657298460746 with source fused
07-08 09:41:00.750  9885 21200 D UrlRepository: localUrl is: false and usesInternalSsid is: true
07-08 09:41:01.186  9885 21200 D LocBroadcastReceiver: Location update sent successfully
07-08 09:43:51.219  9885 21199 D UrlRepository: localUrl is: false and usesInternalSsid is: true
07-08 09:43:51.219  9885  9919 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=64205e7a-c46e-416f-b3d3-8f48485530a7, tags={ io.homeassistant.companion.android.websocket.WebsocketManager } ]
07-08 09:43:51.227  9885 21200 D UrlRepository: localUrl is: false and usesInternalSsid is: true
07-08 09:43:51.227  9885 21200 D SensorWorker: Updating all Sensors.
07-08 09:43:51.230  9885  9885 D UrlRepository: localUrl is: false and usesInternalSsid is: true
07-08 09:43:51.234  9885  9885 D UrlRepository: Using external URL
07-08 09:43:51.251  9885  9919 I WM-Processor: Moving WorkSpec (29359bec-d899-4c04-99e0-93773e492d87) to the foreground
07-08 09:43:51.263  9885 21200 D UrlRepository: localUrl is: false and usesInternalSsid is: true
07-08 09:43:51.275  9885  9885 I WM-SystemFgDispatcher: Started foreground service Intent { act=ACTION_START_FOREGROUND cmp=io.homeassistant.companion.android/androidx.work.impl.foreground.SystemForegroundService (has extras) }
07-08 09:43:51.332  9885 10279 D WebviewActivity: External bus {"type":"connection-status","payload":{"event":"disconnected"},"id":30}
07-08 09:43:51.385  9885 21199 D LocBroadcastReceiver: Forcing of high accuracy mode disabled, because high accuracy mode had to be enabled anyway.
07-08 09:43:51.388  9885  9885 D ForegrndServiceLauncher: Check if service HighAccuracyLocationService is running. Service running = true
07-08 09:43:51.423  9885 21200 D UrlRepository: localUrl is: false and usesInternalSsid is: true
07-08 09:43:51.476  9885  9885 D UrlRepository: localUrl is: false and usesInternalSsid is: true
07-08 09:43:51.476  9885  9885 D UrlRepository: Using external URL
07-08 09:43:51.631  9885  9913 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=29359bec-d899-4c04-99e0-93773e492d87, tags={ io.homeassistant.companion.android.sensors.SensorWorker } ]
07-08 09:43:51.634  9885  9885 I WM-SystemFgDispatcher: Stopping foreground service
07-08 09:43:51.867  9885 10279 D WebviewActivity: External bus {"type":"connection-status","payload":{"event":"connected"},"id":31}
07-08 09:43:51.870  9885  9885 D UrlRepository: localUrl is: false and usesInternalSsid is: true
07-08 09:43:52.089  9885 10279 D WebviewActivity: External bus {"type":"theme-update","id":32}
07-08 09:43:52.128  9885  9885 D WebviewActivity: Color from webview is "#101e24-SPACER-#111111"
07-08 09:43:52.128  9885  9885 D WebviewActivity: Color from webview is "#101e24-SPACER-#111111"
07-08 09:43:52.128  9885 21199 D WebViewPresenterImpl: Try getting color from webview color "#101e24".
07-08 09:43:52.130  9885 21199 I WebViewPresenterImpl: Found color -15720924.
07-08 09:43:52.130  9885 21199 D WebViewPresenterImpl: Try getting color from webview color "#111111".
07-08 09:43:52.131  9885 21199 I WebViewPresenterImpl: Found color -15658735.
07-08 09:43:54.436  9885 28335 D UrlRepository: localUrl is: false and usesInternalSsid is: true
07-08 09:43:54.437  9885 28335 D SensorWorker: Updating all Sensors.
07-08 09:43:54.440  9885  9913 I WM-Processor: Moving WorkSpec (1e9fe60b-ac0b-49f6-baed-8993ecfcc60b) to the foreground
07-08 09:43:54.457  9885  9885 I WM-SystemFgDispatcher: Started foreground service Intent { act=ACTION_START_FOREGROUND cmp=io.homeassistant.companion.android/androidx.work.impl.foreground.SystemForegroundService (has extras) }
07-08 09:43:54.463  9885 28335 D UrlRepository: localUrl is: false and usesInternalSsid is: true
07-08 09:43:54.526  9885  9885 D ForegrndServiceLauncher: Check if service HighAccuracyLocationService is running. Service running = true
07-08 09:43:54.536  9885  9885 D LocBroadcastReceiver: Not requesting accurate location, last accurate location was too recent
07-08 09:43:54.545  9885 21199 D LocBroadcastReceiver: Forcing of high accuracy mode disabled, because high accuracy mode had to be enabled anyway.
07-08 09:43:54.574  9885 28335 D UrlRepository: localUrl is: false and usesInternalSsid is: true
07-08 09:43:54.781  9885  9955 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=1e9fe60b-ac0b-49f6-baed-8993ecfcc60b, tags={ io.homeassistant.companion.android.sensors.SensorWorker } ]
07-08 09:43:54.783  9885  9885 I WM-SystemFgDispatcher: Stopping foreground service
07-08 09:44:11.531  9885  9885 D LocBroadcastReceiver: Got single accurate location update: Location[fused xxxxxxx,xxxxxxx hAcc=1100.0 et=+14d12h11m42s557ms alt=xxxxxxx vAcc=3.0862076 vel=0.19123977 bear=40.16569 {Bundle[EMPTY_PARCEL]}]
07-08 09:44:11.531  9885  9885 W LocBroadcastReceiver: Location not accurate enough on retry 1 of 5
07-08 09:44:57.035  9885 10275 D UrlRepository: localUrl is: false and usesInternalSsid is: true
07-08 09:44:57.036  9885 21200 D UrlRepository: localUrl is: false and usesInternalSsid is: true
07-08 09:44:57.036  9885  9956 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=a509ed97-edd1-4ace-98be-ff392849999c, tags={ io.homeassistant.companion.android.websocket.WebsocketManager } ]
07-08 09:44:57.036  9885 21200 D SensorWorker: Updating all Sensors.
07-08 09:44:57.051  9885  9956 I WM-Processor: Moving WorkSpec (e9f03149-d947-42e2-b228-d5221f524d86) to the foreground
07-08 09:44:57.054  9885  9885 D UrlRepository: localUrl is: false and usesInternalSsid is: true
07-08 09:44:57.054  9885  9885 D UrlRepository: Using external URL
07-08 09:44:57.056  9885 21200 D UrlRepository: localUrl is: false and usesInternalSsid is: true
07-08 09:44:57.057  9885  9885 I WM-SystemFgDispatcher: Started foreground service Intent { act=ACTION_START_FOREGROUND cmp=io.homeassistant.companion.android/androidx.work.impl.foreground.SystemForegroundService (has extras) }
07-08 09:44:57.082  9885  9885 D ForegrndServiceLauncher: Check if service HighAccuracyLocationService is running. Service running = true
07-08 09:44:57.094  9885 28335 D LocBroadcastReceiver: Forcing of high accuracy mode disabled, because high accuracy mode had to be enabled anyway.
07-08 09:44:57.108  9885 21200 D SensorReceiver: Nothing to update
07-08 09:44:57.108  9885  9913 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=e9f03149-d947-42e2-b228-d5221f524d86, tags={ io.homeassistant.companion.android.sensors.SensorWorker } ]
07-08 09:44:57.110  9885  9885 I WM-SystemFgDispatcher: Stopping foreground service
07-08 09:45:04.643  9885 10279 D WebviewActivity: External bus {"type":"config_screen/show","id":33}
07-08 09:45:04.698  9885  9885 D UrlRepository: Using external URL
07-08 09:45:04.698  9885  9885 D UrlRepository: Using external URL
07-08 09:45:04.699  9885  9885 D UrlRepository: Using external URL
07-08 09:45:04.699  9885  9885 D UrlRepository: Using external URL
07-08 09:45:04.712  9885  9885 I ContentCaptureHelper: Setting logging level to OFF
07-08 09:45:04.785  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:04.785  9885  9885 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
07-08 09:45:04.785  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:04.785  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:04.785  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:04.786  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:04.786  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:04.786  9885  9885 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
07-08 09:45:04.786  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:04.786  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:04.786  9885  9885 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
07-08 09:45:04.786  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:04.786  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:04.786  9885  9885 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
07-08 09:45:04.797  9885 28335 D UrlRepository: localUrl is: false and usesInternalSsid is: true
07-08 09:45:04.797  9885 28335 D SensorWorker: Updating all Sensors.
07-08 09:45:04.798  9885  9913 I WM-Processor: Moving WorkSpec (1ce930dc-7b6a-4449-9164-b35a07d5af21) to the foreground
07-08 09:45:04.805  9885 28335 D UrlRepository: localUrl is: false and usesInternalSsid is: true
07-08 09:45:04.822  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:04.822  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:04.822  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:04.827  9885  9885 I WM-SystemFgDispatcher: Started foreground service Intent { act=ACTION_START_FOREGROUND cmp=io.homeassistant.companion.android/androidx.work.impl.foreground.SystemForegroundService (has extras) }
07-08 09:45:04.838  9885  9885 D ForegrndServiceLauncher: Check if service HighAccuracyLocationService is running. Service running = true
07-08 09:45:04.842  9885 10275 D LocBroadcastReceiver: Forcing of high accuracy mode disabled, because high accuracy mode had to be enabled anyway.
07-08 09:45:04.847  9885  9885 D LocBroadcastReceiver: Not requesting accurate location, last accurate location was too recent
07-08 09:45:04.865  9885 28335 D UrlRepository: localUrl is: false and usesInternalSsid is: true
07-08 09:45:05.888  9885  9919 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=1ce930dc-7b6a-4449-9164-b35a07d5af21, tags={ io.homeassistant.companion.android.sensors.SensorWorker } ]
07-08 09:45:05.892  9885  9885 I WM-SystemFgDispatcher: Stopping foreground service
07-08 09:45:08.179  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:08.203  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:08.212  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:08.245  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:08.257  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:08.269  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:08.280  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:08.302  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:08.313  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:08.335  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:08.357  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:08.381  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:08.389  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:08.402  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:08.424  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:08.435  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:08.446  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:08.469  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:08.492  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:08.524  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:08.543  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:08.557  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:08.568  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:08.590  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:08.602  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:08.623  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:08.634  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:08.658  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:08.691  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:08.701  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:08.737  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:08.758  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:08.791  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:08.814  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:10.449  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:10.725  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:10.771  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:10.815  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:10.849  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:10.916  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:10.960  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:11.206  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:12.802  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:45:12.880  9885 28335 D LogcatReader: Read logcat for pid 9885
07-08 09:45:12.914  9885 28335 D LogcatReader: Done reading logcat for pid 9885
07-08 09:45:41.234  9885  9885 D LogFragment: Click on share logs without WRITE_EXTERNAL_STORAGE permission
07-08 09:45:41.305  9885  9885 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
07-08 09:45:46.547  9885  9885 I LogFragment: Request WRITE_EXTERNAL_STORAGE permission, to create log file
07-08 09:45:46.624  9885  9925 D OpenGLRenderer: endAllActiveAnimators on 0xb4000076ce0e0bc0 (RippleDrawable) with handle 0xb4000075dde21260
07-08 09:45:48.167  9885  9885 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
07-08 09:45:52.386  9885  9885 D LogFragment: User want to share log
07-08 09:45:52.429  9885  9885 I LogFragment: Create log file to: /storage/emulated/0/Android/data/io.homeassistant.companion.android/cache/logs/homeassistant_companion_log_6-8-2022_9-45-52.txt
07-08 09:45:52.437  9885  9885 I LogFragment: Open share dialog with log file
07-08 09:45:52.458  9885  9925 D OpenGLRenderer: endAllActiveAnimators on 0xb4000076ce0f2700 (RippleDrawable) with handle 0xb4000075dde6d580
07-08 09:45:52.875  9885  9969 E DatabaseUtils: Writing exception to parcel
07-08 09:45:52.875  9885  9969 E DatabaseUtils: java.lang.SecurityException: Permission Denial: reading androidx.core.content.FileProvider uri content://io.homeassistant.companion.android.provider/external_files/Android/data/io.homeassistant.companion.android/cache/logs/homeassistant_companion_log_6-8-2022_9-45-52.txt from pid=15153, uid=1000 requires the provider be exported, or grantUriPermission()
07-08 09:45:52.875  9885  9969 E DatabaseUtils: 	at android.content.ContentProvider.enforceReadPermissionInner(ContentProvider.java:832)
07-08 09:45:52.875  9885  9969 E DatabaseUtils: 	at android.content.ContentProvider$Transport.enforceReadPermission(ContentProvider.java:694)
07-08 09:45:52.875  9885  9969 E DatabaseUtils: 	at android.content.ContentProvider$Transport.query(ContentProvider.java:233)
07-08 09:45:52.875  9885  9969 E DatabaseUtils: 	at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:107)
07-08 09:45:52.875  9885  9969 E DatabaseUtils: 	at android.os.Binder.execTransactInternal(Binder.java:1179)
07-08 09:45:52.875  9885  9969 E DatabaseUtils: 	at android.os.Binder.execTransact(Binder.java:1143)
07-08 09:45:52.998  9885 13654 E DatabaseUtils: Writing exception to parcel
07-08 09:45:52.998  9885 13654 E DatabaseUtils: java.lang.SecurityException: Permission Denial: reading androidx.core.content.FileProvider uri content://io.homeassistant.companion.android.provider/external_files/Android/data/io.homeassistant.companion.android/cache/logs/homeassistant_companion_log_6-8-2022_9-45-52.txt from pid=15153, uid=1000 requires the provider be exported, or grantUriPermission()
07-08 09:45:52.998  9885 13654 E DatabaseUtils: 	at android.content.ContentProvider.enforceReadPermissionInner(ContentProvider.java:832)
07-08 09:45:52.998  9885 13654 E DatabaseUtils: 	at android.content.ContentProvider$Transport.enforceReadPermission(ContentProvider.java:694)
07-08 09:45:52.998  9885 13654 E DatabaseUtils: 	at android.content.ContentProvider$Transport.query(ContentProvider.java:233)
07-08 09:45:52.998  9885 13654 E DatabaseUtils: 	at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:107)
07-08 09:45:52.998  9885 13654 E DatabaseUtils: 	at android.os.Binder.execTransactInternal(Binder.java:1179)
07-08 09:45:52.998  9885 13654 E DatabaseUtils: 	at android.os.Binder.execTransact(Binder.java:1143)
07-08 09:45:53.128  9885 13654 E DatabaseUtils: Writing exception to parcel
07-08 09:45:53.128  9885 13654 E DatabaseUtils: java.lang.SecurityException: Permission Denial: reading androidx.core.content.FileProvider uri content://io.homeassistant.companion.android.provider/external_files/Android/data/io.homeassistant.companion.android/cache/logs/homeassistant_companion_log_6-8-2022_9-45-52.txt from pid=15153, uid=1000 requires the provider be exported, or grantUriPermission()
07-08 09:45:53.128  9885 13654 E DatabaseUtils: 	at android.content.ContentProvider.enforceReadPermissionInner(ContentProvider.java:832)
07-08 09:45:53.128  9885 13654 E DatabaseUtils: 	at android.content.ContentProvider$Transport.enforceReadPermission(ContentProvider.java:694)
07-08 09:45:53.128  9885 13654 E DatabaseUtils: 	at android.content.ContentProvider$Transport.query(ContentProvider.java:233)
07-08 09:45:53.128  9885 13654 E DatabaseUtils: 	at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:107)
07-08 09:45:53.128  9885 13654 E DatabaseUtils: 	at android.os.Binder.execTransactInternal(Binder.java:1179)
07-08 09:45:53.128  9885 13654 E DatabaseUtils: 	at android.os.Binder.execTransact(Binder.java:1143)
07-08 09:46:13.279  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:46:13.279  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:46:13.280  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:46:13.280  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:46:13.280  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:46:13.280  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:46:13.280  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:46:13.280  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:46:13.280  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:46:13.280  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:46:13.280  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:46:40.936  9885  9885 D LocBroadcastReceiver: Got single accurate location update: Location[fused xxxxxxx,xxxxxxx hAcc=1100.0 et=+14d12h12m22s597ms alt=xxxxxxx vAcc=4.5358505 vel=0.28855523 bear=36.797817 {Bundle[EMPTY_PARCEL]}]
07-08 09:46:40.936  9885  9885 W LocBroadcastReceiver: Location not accurate enough on retry 1 of 5
07-08 09:46:57.228  9885  9885 D SensorReceiver: Received intent: android.intent.action.ACTION_POWER_DISCONNECTED
07-08 09:46:57.276  9885 28335 D UrlRepository: localUrl is: false and usesInternalSsid is: true
07-08 09:46:57.389  9885 10275 D LocBroadcastReceiver: Forcing of high accuracy mode disabled, because high accuracy mode had to be enabled anyway.
07-08 09:46:57.420  9885 28335 D UrlRepository: localUrl is: false and usesInternalSsid is: true
07-08 09:46:57.437  9885  9885 D ForegrndServiceLauncher: Check if service HighAccuracyLocationService is running. Service running = true
07-08 09:47:02.513  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:47:02.513  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:47:02.513  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:47:02.513  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:47:02.513  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:47:02.513  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:47:02.514  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:47:02.514  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:47:02.514  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:47:02.514  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:47:02.514  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:47:02.643  9885 28335 D UrlRepository: localUrl is: false and usesInternalSsid is: true
07-08 09:47:02.673  9885  9885 D ForegrndServiceLauncher: Check if service HighAccuracyLocationService is running. Service running = true
07-08 09:47:02.679  9885  9885 D LocBroadcastReceiver: Not requesting accurate location, last accurate location was too recent
07-08 09:47:02.681  9885 21200 D LocBroadcastReceiver: Forcing of high accuracy mode disabled, because high accuracy mode had to be enabled anyway.
07-08 09:47:02.697  9885 28335 D UrlRepository: localUrl is: false and usesInternalSsid is: true
07-08 09:47:11.816  9885  9885 E mpanion.androi: Invalid ID 0x00000000.
07-08 09:47:11.877  9885 28335 D LogcatReader: Read logcat for pid 9885

Did you by chance enable the setting to include sensor updates for Single Accurate Location sensor? Your logs seem to indicate that you either enabled that or the command to update location but not from high accuracy mode.

You would access this setting from Configuration > Companion App > Manage Sensors > Single Accurate Location and then scroll down to its settings.

Something else I noticed is that you had 1 skipped event due to low accuracy

07-08 09:44:11.531  9885  9885 D LocBroadcastReceiver: Got single accurate location update: Location[fused xxxxxxx,xxxxxxx hAcc=1100.0 et=+14d12h11m42s557ms alt=xxxxxxx vAcc=3.0862076 vel=0.19123977 bear=40.16569 {Bundle[EMPTY_PARCEL]}]

The accuracy here is 1100, can you check if these GPS coordinates were correct? If so you may want to consider modifying the accuracy setting to a more acceptable value for your location updates. This value will be different for every user.

The docs provide a more detailed explanation to the settings and the logic: Location | Home Assistant Companion Docs

1 Like

Yes, that is enabled.

Based on Google Maps, they’re off by about 15 feet but are otherwise correct.

Turn off that setting, its unnecessary and potentially causing a conflict with other registered location updates like high accuracy mode.

Try to change the accuracy for all 3 location sensors to match the highest skipped accuracy you see that is a valid coordinate. For me personally I found I had to bump it to 400, most users 200 works but if you live in a rural area or any place where GPS readings could be off its a good idea to change that value. Thats why we have it there.

You’ll have to forgive me if I’m skeptical that the location accuracy setting is going to be the smoking gun here. I’m definitely not in an area where GPS readings are going to be off, and I can confirm that by comparing behavior to my wife’s phone, which has never had those settings changed and updates frequently all the time with no intervention. I’ve also compared location update data from when we are in the car together, traveling, and it’s the same - hers will be very accurate breadcrumbs, and mine will be big jumps. The logs also show when it’s not working that it’s not even trying to do any location update work, where the logs from when it is working show that it’s doing it all the time even if it skips.

Try first by disabling the “include in sensor update” setting, that’s probably the culprit as the logs indicate the updates are from that sensor when they should be treated like normal location updates. That sensor only gets used when the app gets a location report that is not accurate enough, unless of course you had that setting enabled then it would be used more frequently.

I only mentioned accuracy because I saw it in the logs.

What version of the app are you on?

Yeah, I disabled the Include in Sensor Update setting as you suggested. However, I’m pretty sure that setting is turned on on my wife’s phone also, so, still kind of skeptical.

I’m on 2022.6.0-full.

Unless you had enabled it, its actually off by default.

I have a similar issue, however not quite as extensive.
My location updates are working however my Home v Away status does not update when the location changes. This results in my Automations that are set to run when I’m Away never trigger.

If I remove the mobile app integration for my phone and logout and back in again on my mobile device, it works temporarily but then stops again.

I have two other users of home assistant whose location updates and Away status work fine, it’s just my phone that has the issue (Oppo A75). One difference I can see is that my phone occasionally runs a VPN client when Away from home, not sure if this is related.

if your device tracker entity is updating with the proper coordinates then the home v away status will update properly, the geolocation sensor is not used for device tracking. Follow the links in this thread to troubleshoot location issues, then if they persist look at the logs. Everything mentioned in this thread is important to read and follow. If you followed everything and its still not working then as part of the outlined troubleshooting steps we look at the logging.