Pulling my hair out with Geocoded Location and device tracker

I had my phone (OnePlus 7 Pro) working flawlessly for a year plus, and then around 2 months ago the location froze and stopped updating. At the time I didn’t do much about it as life got in the way, but I recently got some time to deal with it and I’m going nuts.

Unrelated, I had to factory reset the phone and start over. I assumed that would be a good thing. I also removed the integration for that particular phone as part of the process.

Since re-enrolling the companion app, I cannot get the geocoded location to update. The location is coming through as home/away status works, and I can see the correct coordinates in the companion app log, but everything shows ‘Unknown’ for geocoded location.

I have tried removing, re-enrolling several times. All the permissions are granted on my phone, I have disabled battery optimization for the HA app, and I have enabled all the location services in the HA app as well. I am not sure what else to do.

What is also perplexing is if I go to the history tab and enter my phone as a device it only populates one sensor, the geocoded location. If I do the same for my partners iPhone, it shows the 20-30 enabled sensors. Not sure what to make of that either.

I have already been through that many times with no luck.

Location is working on the phone, as per the logs.

04-30 09:07:16.365 21700 21700 D LocBroadcastReceiver: Received location update.
04-30 09:07:16.370 21700 21700 D ForegrndServiceLauncher: Check if service HighAccuracyLocationService is running. Service running = false
04-30 09:07:16.370 21700 18701 D LocBroadcastReceiver: Last Location: 
04-30 09:07:16.370 21700 18701 D LocBroadcastReceiver: Coords:(##.########, ##.########)
04-30 09:07:16.370 21700 18701 D LocBroadcastReceiver: Accuracy: 43.553
04-30 09:07:16.370 21700 18701 D LocBroadcastReceiver: Bearing: 0.0
04-30 09:07:16.377 21700 18701 D LocBroadcastReceiver: Begin evaluating if location update should be skipped
04-30 09:07:16.377 21700 18701 D LocBroadcastReceiver: Received location that is 358 milliseconds old, 1682863636019 compared to 1682863636377 with source fused```

Any errors in the logs for the geocoded location sensor? It’s a separate sensor from the device tracker as it uses a different API

In the companion app logs, or on the HA server?

I cannot find any reference to it in the companion app logs as it only loads and hour or two of logs. Any way to get more logging?

Feel free to share the logs there may be another error for it. The tag for that sensor is GeocodeSM but the error may be hidden as something else that may not mention geocode.

That sensor updates at least once every 15 minutes so an hour or 2 of logs is plenty.

Logs - HA log - Pastebin.com

I did remove the first 3 digits for the coordinates, but it was correct. Looks like it getting my location correctly, just not geocoding it.

I am not sure how to attach a .txt file. The forum will not allow it.

and you are certain the geocoded location sensor is enabled? Can you try disabling and enabling it again? I am also not seeing any errors which is strange. The logs from when the sensor is re-enabled may be helpful.

The geocoded sensor is separate from device tracking as it uses a different API.

then you may not be looking at the correct device since you should see every sensor. I see earlier you had to do a factory reset, its possible your device has a different name now have you checked that?

Our actual steps for starting fresh are

I am positive I am looking at the right device as I only have 2 in HA. One iPhone and this phone. I deleted it from the HA integration before as well to be sure I wasn’t causing duplicates. I followed that guide for the ‘starting fresh’ That is exactly how I did it, in fact have have done it 2-3 times as part of this troubleshooting.

I am also positive the geocoded location sensor is enabled. I have verified that both in the HA companion app and in HA itself. Which is further confirmed by looking in the history and seeing ‘Unknown’, if the sensor is disabled it won’t even be available in history. The sensor also shows unknown in the companion app on the enable/disable screen as well. I also have every single location sensor or related sensor enabled to eliminate that too.

I am beginning to think the issue might be deeper than just the geocoded location however. I have 2 users configured in HA, one is set to track the iPhone and I am set to track this phone. When I look at the map, the iPhone user is on it and the location is accurate. I on the other hand am not even on the map, even though we can see from the logs that my location information is accurate. Even more perplexing is my automations related to me being inside/outside specific zones are working just fine. So HA is clearly getting some type of location data, but not all of it???

Here are the logs from when I disabled and re-enabled the gocoded location sensor. (I removed the excess chatty Android stuff)

--------- beginning of system
05-04 07:18:14.393  8840  8840 D ViewRootImpl: support adaptive color gamut feature!
05-04 07:18:14.866  8840  8840 D ViewRootImpl: support adaptive color gamut feature!
05-04 07:18:20.872  8840  8840 D ViewRootImpl: support adaptive color gamut feature!
--------- beginning of perf
05-04 07:18:24.376  8840 17949 I 110     :  OptJank - total:149 frameGap:149 delta#0#107#12#94#0#49
05-04 07:25:02.067  8840  8840 D ViewRootImpl: support adaptive color gamut feature!
05-04 07:25:03.112  8840  8840 D ViewRootImpl: support adaptive color gamut feature!
05-04 07:25:07.208  8840  8840 D ViewRootImpl: support adaptive color gamut feature!
05-04 07:25:07.911  8840  8840 D ViewRootImpl: support adaptive color gamut feature!
05-04 07:30:48.571  8840 17949 I 110     :  OptJank - total:57 frameGap:57 delta#0#81#13#48#0#3
05-04 07:32:35.916  8840  8840 D ViewRootImpl: support adaptive color gamut feature!
05-04 07:32:37.747  8840  8840 D ViewRootImpl: support adaptive color gamut feature!
05-04 07:32:54.497  8840  8840 D ViewRootImpl: support adaptive color gamut feature!
--------- beginning of main
05-04 07:36:58.535  8840  8840 D SensorReceiver: Received intent: android.intent.action.SCREEN_OFF
05-04 07:36:58.536  8840  8840 E sqlite3_android: [IKR-38846] ONEPLUS_NAME_PARTS_MATCH SQLITE_OK
05-04 07:36:58.539  8840  8840 D SensorReceiver: Sensor is_interactive corresponding to received event android.intent.action.SCREEN_OFF is disabled, skipping sensors update
05-04 07:36:58.541  8840  8840 D ButtonWidget: Broadcast received: 
05-04 07:36:58.541  8840  8840 D ButtonWidget: Broadcast action: android.intent.action.SCREEN_OFF
05-04 07:36:58.541  8840  8840 D ButtonWidget: AppWidgetId: -1
05-04 07:36:58.544  8840  8840 D MediaPlayCtrlsWidget: Broadcast received: 
05-04 07:36:58.544  8840  8840 D MediaPlayCtrlsWidget: Broadcast action: android.intent.action.SCREEN_OFF
05-04 07:36:58.544  8840  8840 D MediaPlayCtrlsWidget: AppWidgetId: -1
05-04 07:36:58.623  8840  8894 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: false, usesWifi is: true
05-04 07:36:58.628  8840  8880 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=38e67b64-0346-439d-8a59-1d65f0b39adc, tags={ io.homeassistant.companion.android.websocket.WebsocketManager } ]
05-04 07:37:26.111  8840  8840 D SensorReceiver: Received intent: android.intent.action.SCREEN_ON
05-04 07:37:26.113  8840  8840 D SensorReceiver: Sensor is_interactive corresponding to received event android.intent.action.SCREEN_ON is disabled, skipping sensors update
05-04 07:37:26.114  8840  8840 D ButtonWidget: Broadcast received: 
05-04 07:37:26.114  8840  8840 D ButtonWidget: Broadcast action: android.intent.action.SCREEN_ON
05-04 07:37:26.114  8840  8840 D ButtonWidget: AppWidgetId: -1
05-04 07:37:26.118  8840  8840 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: false, usesWifi is: true
05-04 07:37:26.120  8840  8840 D MediaPlayCtrlsWidget: Broadcast received: 
05-04 07:37:26.120  8840  8840 D MediaPlayCtrlsWidget: Broadcast action: android.intent.action.SCREEN_ON
05-04 07:37:26.120  8840  8840 D MediaPlayCtrlsWidget: AppWidgetId: -1
05-04 07:37:26.123  8840  8840 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: false, usesWifi is: true
05-04 07:37:26.126  8840  8840 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: false, usesWifi is: true
05-04 07:37:26.179  8840  8925 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: false, usesWifi is: true
05-04 07:37:26.183  8840  8871 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=ec519baa-3757-411a-89a6-045322a8c432, tags={ io.homeassistant.companion.android.websocket.WebsocketManager } ]
05-04 07:37:30.395  8840  8840 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1683203703320, currentMillis: 1683203850395)
05-04 07:37:30.406  8840  8840 E mpanion.androi: Invalid ID 0x00000000.
05-04 07:37:30.409  8840  8840 I chatty  : uid=10290(io.homeassistant.companion.android) identical 20 lines
05-04 07:37:30.409  8840  8840 E mpanion.androi: Invalid ID 0x00000000.
05-04 07:37:30.417  8840  8840 E mpanion.androi: Invalid ID 0x00000000.
05-04 07:37:30.420  8840  8840 I chatty  : uid=10290(io.homeassistant.companion.android) identical 20 lines
05-04 07:37:30.421  8840  8840 E mpanion.androi: Invalid ID 0x00000000.
05-04 07:37:30.425  8840  8840 D LocBroadcastReceiver: Received location update.
05-04 07:37:30.427  8840  8840 D ForegrndServiceLauncher: Check if service HighAccuracyLocationService is running. Service running = false
05-04 07:37:30.428  8840  8874 D LocBroadcastReceiver: Last Location: 
05-04 07:37:30.428  8840  8874 D LocBroadcastReceiver: Coords:(##.#384121, ##.#049284)
05-04 07:37:30.428  8840  8874 D LocBroadcastReceiver: Accuracy: 16.008
05-04 07:37:30.428  8840  8874 D LocBroadcastReceiver: Bearing: 0.0
05-04 07:37:30.430  8840  8840 D DecorView: onWindowFocusChangedFromViewRoot hasFocus: true, DecorView@5e91a7c[SettingsActivity]
05-04 07:37:30.431  8840  8840 D ViewRootImpl[SettingsActivity]: windowFocusChanged hasFocus=true inTouchMode=true
05-04 07:37:30.433  8840  8840 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1683203703320, currentMillis: 1683203850433)
05-04 07:37:30.433  8840  8840 D IntegrationRepository: setAppActive(): true
05-04 07:37:30.436  8840  8874 D LocBroadcastReceiver: Begin evaluating if location update should be skipped
05-04 07:37:30.436  8840  8874 D LocBroadcastReceiver: Received location that is 30 milliseconds old, 1683203850406 compared to 1683203850436 with source fused
05-04 07:37:30.436  8840  8874 D LocBroadcastReceiver: Duplicate location received, not sending to HA
05-04 07:37:30.445  8840  8840 E mpanion.androi: Invalid ID 0x00000000.
05-04 07:37:30.445  8840  8840 I chatty  : uid=10290(io.homeassistant.companion.android) identical 1 line
05-04 07:37:30.445  8840  8840 E mpanion.androi: Invalid ID 0x00000000.

05-04 07:37:31.912  8840  8840 E mpanion.androi: Invalid ID 0x00000000.
05-04 07:37:31.913  8840  8840 E mpanion.androi: Invalid ID 0x00000000.
05-04 07:37:31.978  8840  8840 W Choreographer: Frame time is 0.19374 ms in the future!  Check that graphics HAL is generating vsync timestamps using the correct timebase.