Companion Android app failing to send sensor data or notification actions while on mobile data

Hi there,
HA hive mind, maybe you’ll be able to help me:
companion android app is installed on both, my phone (Google Pixel 6 Pro) and my wife’s phone (Google Pixel 6). Both are similarly configured (or at least I believe so). Mine works as it should on home wifi and outside while on mobile data (sends sensor information, correctly sending responses from actionable HA notifications). My wife’s however works correctly while only on home’s WiFi. When on mobile data it doesn’t send sensor information and actions in the notifications from HA are not clickable. Interestingly enough she’s able to see her dashboards and up-to-date information from HA. Remote access is configured via Nabu Casa’s cloud in both cases.
I’ve obtained the log from her phone and following log lines are striking me as suspicious:

11-12 19:34:41.467 17557  4926 E SensorReceiver: Error while getting core config to sync sensor status
11-12 19:34:41.516 17557  4926 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
11-12 19:34:41.518 17557  4926 W SensorReceiver: Exception while updating sensors: IntegrationException: java.net.UnknownHostException
11-12 19:34:41.518 17557  4926 I SensorReceiver: Sensor updates and sync completed

this is the reaction when trying to click on the action in the notification and then dismissing the notification altogether:

11-12 19:34:58.015 17557  4926 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
11-12 19:34:58.022 17557  4926 E NotifActionReceiver: Unable to fire event.
11-12 19:35:00.011 17557 17557 D SensorReceiver: Received intent: android.intent.action.TIME_TICK
11-12 19:35:00.015 17557 16030 I SensorReceiver: Skipping faster update because not charging/different preference
11-12 19:35:09.612 17557 17557 D NotifManagerCompat: Cancel notification with tag "null" and id "0"
11-12 19:35:09.613 17557 17557 D NotifManagerCompat: Check if the notification is in a group...
11-12 19:35:09.613 17557 17557 D NotifManagerCompat: Notification is not in a group. Cancel notification...
11-12 19:35:09.623 17557 16030 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
11-12 19:35:09.628 17557 16030 E NotifDeleteReceiver: Issue sending event to Home Assistant

to me that:

java.net.UnknownHostException

looks like what could be the cause of it but unfortunately I don’t seem to see any details on what address it attempts to reach. Did anyone encounter anything similar? Any insights would be appreciated…

Check the URL you have set in the app. If you have the toggle for use the cloud enabled try to turn it off and see what URL is there it may be incorrect.

1 Like

It’s embarassing. Yes, indeed, the URL that in my case leads to Nabu Casa’s cloud, in case of my wife was the local one. Although I must say it’s quite misleading that the field is hidden while cloud is enabled, suggesting that the field itself is irrelevant while in reality it’s not.
Anyhow, thank you very much for your help!

its a bug we have seen in certain cases where the app is not being sent the correct URL to update there so for now we have asked users to double check this when we think this may be the case.

1 Like

I had that issue but it seems it is not solved yet for me.

11-13 20:52:29.060 15024 15024 D LocBroadcastReceiver: Received location update.
11-13 20:52:29.072 15024 15024 D ForegrndServiceLauncher: Check if service HighAccuracyLocationService is running. Service running = false
11-13 20:52:29.073 15024 15088 D LocBroadcastReceiver: Last Location: 
11-13 20:52:29.073 15024 15088 D LocBroadcastReceiver: Coords:(xx.xxxx, xx.xxxx)
11-13 20:52:29.073 15024 15088 D LocBroadcastReceiver: Accuracy: 22.971
11-13 20:52:29.073 15024 15088 D LocBroadcastReceiver: Bearing: 0.0
11-13 20:52:29.075 15024 15088 D LocBroadcastReceiver: Begin evaluating if location update should be skipped
11-13 20:52:29.076 15024 15088 D LocBroadcastReceiver: Received location that is 988 milliseconds old, 1699905148087 compared to 1699905149075 with source fused
11-13 20:52:29.089 15024 15088 D ServerConnectionInfo: localUrl is: true, usesInternalSsid is: false, usesWifi is: false
11-13 20:52:29.143 15024 17891 D TrafficStats: tagSocket(114) with statsTag=0xffffffff, statsUid=-1
11-13 20:52:50.248 15024 15088 E LocBroadcastReceiver: Could not update location for 2.
11-13 20:52:50.248 15024 15088 E LocBroadcastReceiver: io.homeassistant.companion.android.common.data.integration.IntegrationException: Error calling integration request update_location
11-13 20:52:50.248 15024 15088 E LocBroadcastReceiver: 	at io.homeassistant.companion.android.common.data.integration.impl.IntegrationRepositoryImpl.updateLocation(IntegrationRepositoryImpl.kt:266)
11-13 20:52:50.248 15024 15088 E LocBroadcastReceiver: 	at io.homeassistant.companion.android.common.data.integration.impl.IntegrationRepositoryImpl$updateLocation$1.invokeSuspend(Unknown Source:15)
11-13 20:52:50.248 15024 15088 E LocBroadcastReceiver: 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
11-13 20:52:50.248 15024 15088 E LocBroadcastReceiver: 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
11-13 20:52:50.248 15024 15088 E LocBroadcastReceiver: 	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
11-13 20:52:50.248 15024 15088 E LocBroadcastReceiver: 	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
11-13 20:52:50.248 15024 15088 E LocBroadcastReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
11-13 20:52:50.248 15024 15088 E LocBroadcastReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
11-13 20:52:50.248 15024 15088 E LocBroadcastReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
11-13 20:52:50.248 15024 15088 E LocBroadcastReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
11-13 20:52:50.264 15024 15024 D LocationTrackingViewMod: Returning PagingSource for history filter: ALL
11-13 20:53:24.506 15024 15093 D LogcatReader: Read logcat for pid 15024

please check above this error as there is probably another error before that contains the actual error

Not sure what to search for. Here is more of the log.
I have the issue with three devices, each from a different brand and Android flavour.

11-13 20:50:21.635 15024 15091 E SensorReceiver: Issue registering sensor battery_level
11-13 20:50:21.635 15024 15091 E SensorReceiver: io.homeassistant.companion.android.common.data.integration.IntegrationException: Error calling integration request register_sensor
11-13 20:50:21.635 15024 15091 E SensorReceiver: 	at io.homeassistant.companion.android.common.data.integration.impl.IntegrationRepositoryImpl.registerSensor(IntegrationRepositoryImpl.kt:746)
11-13 20:50:21.635 15024 15091 E SensorReceiver: 	at io.homeassistant.companion.android.common.data.integration.impl.IntegrationRepositoryImpl$registerSensor$1.invokeSuspend(Unknown Source:15)
11-13 20:50:21.635 15024 15091 E SensorReceiver: 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
11-13 20:50:21.635 15024 15091 E SensorReceiver: 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
11-13 20:50:21.635 15024 15091 E SensorReceiver: 	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
11-13 20:50:21.635 15024 15091 E SensorReceiver: 	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
11-13 20:50:21.635 15024 15091 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
11-13 20:50:21.635 15024 15091 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
11-13 20:50:21.635 15024 15091 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
11-13 20:50:21.635 15024 15091 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
11-13 20:50:21.699 15024 15091 D ServerConnectionInfo: localUrl is: true, usesInternalSsid is: false, usesWifi is: false
11-13 20:50:26.001 15024 15024 D LocBroadcastReceiver: Received location update.
11-13 20:50:26.030 15024 15024 D ForegrndServiceLauncher: Check if service HighAccuracyLocationService is running. Service running = false
11-13 20:50:26.031 15024 15091 D LocBroadcastReceiver: Last Location: 
11-13 20:50:26.031 15024 15091 D LocBroadcastReceiver: Coords:
11-13 20:50:26.031 15024 15091 D LocBroadcastReceiver: Accuracy: 100.0
11-13 20:50:26.031 15024 15091 D LocBroadcastReceiver: Bearing: 0.0
11-13 20:50:26.039 15024 15091 D LocBroadcastReceiver: Begin evaluating if location update should be skipped
11-13 20:50:26.039 15024 15091 D LocBroadcastReceiver: Received location that is 102 milliseconds old, 1699905025937 compared to 1699905026039 with source fused
11-13 20:50:26.040 15024 15091 D LocBroadcastReceiver: Duplicate location received, not sending to HA
11-13 20:50:26.057 15024 15024 D LocationTrackingViewMod: Returning PagingSource for history filter: ALL
11-13 20:50:30.878 15024 15091 E SensorReceiver: Issue registering sensor geocoded_location
11-13 20:50:30.878 15024 15091 E SensorReceiver: io.homeassistant.companion.android.common.data.integration.IntegrationException: Error calling integration request register_sensor
11-13 20:50:30.878 15024 15091 E SensorReceiver: 	at io.homeassistant.companion.android.common.data.integration.impl.IntegrationRepositoryImpl.registerSensor(IntegrationRepositoryImpl.kt:746)
11-13 20:50:30.878 15024 15091 E SensorReceiver: 	at io.homeassistant.companion.android.common.data.integration.impl.IntegrationRepositoryImpl$registerSensor$1.invokeSuspend(Unknown Source:15)
11-13 20:50:30.878 15024 15091 E SensorReceiver: 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
11-13 20:50:30.878 15024 15091 E SensorReceiver: 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
11-13 20:50:30.878 15024 15091 E SensorReceiver: 	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
11-13 20:50:30.878 15024 15091 E SensorReceiver: 	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
11-13 20:50:30.878 15024 15091 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
11-13 20:50:30.878 15024 15091 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
11-13 20:50:30.878 15024 15091 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
11-13 20:50:30.878 15024 15091 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
11-13 20:50:30.930 15024 15091 D ServerConnectionInfo: localUrl is: true, usesInternalSsid is: false, usesWifi is: false
11-13 20:50:42.755 15024 15091 E SensorReceiver: Issue registering sensor geocoded_location
11-13 20:50:42.755 15024 15091 E SensorReceiver: io.homeassistant.companion.android.common.data.integration.IntegrationException: Error calling integration request register_sensor
11-13 20:50:42.755 15024 15091 E SensorReceiver: 	at io.homeassistant.companion.android.common.data.integration.impl.IntegrationRepositoryImpl.registerSensor(IntegrationRepositoryImpl.kt:746)
11-13 20:50:42.755 15024 15091 E SensorReceiver: 	at io.homeassistant.companion.android.common.data.integration.impl.IntegrationRepositoryImpl$registerSensor$1.invokeSuspend(Unknown Source:15)
11-13 20:50:42.755 15024 15091 E SensorReceiver: 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
11-13 20:50:42.755 15024 15091 E SensorReceiver: 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
11-13 20:50:42.755 15024 15091 E SensorReceiver: 	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
11-13 20:50:42.755 15024 15091 E SensorReceiver: 	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
11-13 20:50:42.755 15024 15091 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
11-13 20:50:42.755 15024 15091 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
11-13 20:50:42.755 15024 15091 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
11-13 20:50:42.755 15024 15091 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
11-13 20:50:42.811 15024 15091 D ServerConnectionInfo: localUrl is: true, usesInternalSsid is: false, usesWifi is: false
11-13 20:50:51.988 15024 15091 E SensorReceiver: Issue registering sensor high_accuracy_mode
11-13 20:50:51.988 15024 15091 E SensorReceiver: io.homeassistant.companion.android.common.data.integration.IntegrationException: Error calling integration request register_sensor
11-13 20:50:51.988 15024 15091 E SensorReceiver: 	at io.homeassistant.companion.android.common.data.integration.impl.IntegrationRepositoryImpl.registerSensor(IntegrationRepositoryImpl.kt:746)
11-13 20:50:51.988 15024 15091 E SensorReceiver: 	at io.homeassistant.companion.android.common.data.integration.impl.IntegrationRepositoryImpl$registerSensor$1.invokeSuspend(Unknown Source:15)
11-13 20:50:51.988 15024 15091 E SensorReceiver: 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
11-13 20:50:51.988 15024 15091 E SensorReceiver: 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
11-13 20:50:51.988 15024 15091 E SensorReceiver: 	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
11-13 20:50:51.988 15024 15091 E SensorReceiver: 	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
11-13 20:50:51.988 15024 15091 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
11-13 20:50:51.988 15024 15091 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
11-13 20:50:51.988 15024 15091 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
11-13 20:50:51.988 15024 15091 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
11-13 20:50:51.995 15024 15091 D ServerConnectionInfo: localUrl is: true, usesInternalSsid is: false, usesWifi is: false
11-13 20:51:03.860 15024 15091 E SensorReceiver: Issue registering sensor high_accuracy_mode
11-13 20:51:03.860 15024 15091 E SensorReceiver: io.homeassistant.companion.android.common.data.integration.IntegrationException: Error calling integration request register_sensor
11-13 20:51:03.860 15024 15091 E SensorReceiver: 	at io.homeassistant.companion.android.common.data.integration.impl.IntegrationRepositoryImpl.registerSensor(IntegrationRepositoryImpl.kt:746)
11-13 20:51:03.860 15024 15091 E SensorReceiver: 	at io.homeassistant.companion.android.common.data.integration.impl.IntegrationRepositoryImpl$registerSensor$1.invokeSuspend(Unknown Source:15)
11-13 20:51:03.860 15024 15091 E SensorReceiver: 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
11-13 20:51:03.860 15024 15091 E SensorReceiver: 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
11-13 20:51:03.860 15024 15091 E SensorReceiver: 	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
11-13 20:51:03.860 15024 15091 E SensorReceiver: 	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
11-13 20:51:03.860 15024 15091 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
11-13 20:51:03.860 15024 15091 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
11-13 20:51:03.860 15024 15091 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
11-13 20:51:03.860 15024 15091 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
11-13 20:51:03.884 15024 15091 D ServerConnectionInfo: localUrl is: true, usesInternalSsid is: false, usesWifi is: false
11-13 20:51:05.869 15024 15024 D IntegrationRepository: setAppActive(): false
11-13 20:51:06.471 15024 15024 D SensorReceiver: Received intent: android.intent.action.SCREEN_OFF
11-13 20:51:06.471 15024 15024 D SensorReceiver: Sensor is_interactive corresponding to received event android.intent.action.SCREEN_OFF is disabled, skipping sensors update
11-13 20:51:06.474 15024 15024 D ButtonWidget: Broadcast received: 
11-13 20:51:06.474 15024 15024 D ButtonWidget: Broadcast action: android.intent.action.SCREEN_OFF
11-13 20:51:06.474 15024 15024 D ButtonWidget: AppWidgetId: -1
11-13 20:51:06.480 15024 15024 D MediaPlayCtrlsWidget: Broadcast received: 
11-13 20:51:06.480 15024 15024 D MediaPlayCtrlsWidget: Broadcast action: android.intent.action.SCREEN_OFF
11-13 20:51:06.480 15024 15024 D MediaPlayCtrlsWidget: AppWidgetId: -1
11-13 20:51:06.524 15024 15091 D ServerConnectionInfo: localUrl is: true, usesInternalSsid is: false, usesWifi is: false
11-13 20:51:06.526 15024 15066 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=2dc44449-3148-4cef-a92b-835528e807f2, tags={ io.homeassistant.companion.android.websocket.WebsocketManager } ]
11-13 20:51:13.038 15024 15088 E SensorReceiver: Issue registering sensor high_accuracy_update_interval
11-13 20:51:13.038 15024 15088 E SensorReceiver: io.homeassistant.companion.android.common.data.integration.IntegrationException: Error calling integration request register_sensor
11-13 20:51:13.038 15024 15088 E SensorReceiver: 	at io.homeassistant.companion.android.common.data.integration.impl.IntegrationRepositoryImpl.registerSensor(IntegrationRepositoryImpl.kt:746)
11-13 20:51:13.038 15024 15088 E SensorReceiver: 	at io.homeassistant.companion.android.common.data.integration.impl.IntegrationRepositoryImpl$registerSensor$1.invokeSuspend(Unknown Source:15)
11-13 20:51:13.038 15024 15088 E SensorReceiver: 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
11-13 20:51:13.038 15024 15088 E SensorReceiver: 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
11-13 20:51:13.038 15024 15088 E SensorReceiver: 	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
11-13 20:51:13.038 15024 15088 E SensorReceiver: 	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
11-13 20:51:13.038 15024 15088 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
11-13 20:51:13.038 15024 15088 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
11-13 20:51:13.038 15024 15088 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
11-13 20:51:13.038 15024 15088 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
11-13 20:51:13.093 15024 15088 D SensorReceiver: Nothing to update for server 2 (H123)
11-13 20:51:13.094 15024 15088 I SensorReceiver: Sensor updates and sync completed
11-13 20:51:13.101 15024 15051 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=cf3e4a1a-48dd-4f08-a705-4eacdd8287eb, tags={ io.homeassistant.companion.android.sensors.SensorWorker } ]
11-13 20:51:13.107 15024 15024 I WM-SystemFgDispatcher: Stopping foreground service
11-13 20:51:15.011 15024 15024 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1699905066869, currentMillis: 1699905075010)
11-13 20:51:15.069 15024 15061 E OpenGLRenderer: Unable to match the desired swap behavior.
11-13 20:51:15.217 15024 15024 D LocBroadcastReceiver: Received location update.
11-13 20:51:15.232 15024 15024 D ForegrndServiceLauncher: Check if service HighAccuracyLocationService is running. Service running = false
11-13 20:51:15.232 15024 15088 D LocBroadcastReceiver: Last Location: 
11-13 20:51:15.232 15024 15088 D LocBroadcastReceiver: Coords:
11-13 20:51:15.232 15024 15088 D LocBroadcastReceiver: Accuracy: 100.0
11-13 20:51:15.232 15024 15088 D LocBroadcastReceiver: Bearing: 0.0
11-13 20:51:15.235 15024 15024 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1699905066869, currentMillis: 1699905075235)
11-13 20:51:15.235 15024 15024 D IntegrationRepository: setAppActive(): true
11-13 20:51:15.235 15024 15088 D LocBroadcastReceiver: Begin evaluating if location update should be skipped
11-13 20:51:15.235 15024 15088 D LocBroadcastReceiver: Received location that is 227 milliseconds old, 1699905075007 compared to 1699905075234 with source fused
11-13 20:51:15.235 15024 15088 D LocBroadcastReceiver: Duplicate location received, not sending to HA
11-13 20:51:15.239 15024 15024 D LocationTrackingViewMod: Returning PagingSource for history filter: ALL
11-13 20:51:15.536 15024 15024 D SensorReceiver: Received intent: android.intent.action.SCREEN_ON
11-13 20:51:15.539 15024 15024 D SensorReceiver: Sensor is_interactive corresponding to received event android.intent.action.SCREEN_ON is disabled, skipping sensors update
11-13 20:51:15.540 15024 15024 D ButtonWidget: Broadcast received: 
11-13 20:51:15.540 15024 15024 D ButtonWidget: Broadcast action: android.intent.action.SCREEN_ON
11-13 20:51:15.540 15024 15024 D ButtonWidget: AppWidgetId: -1
11-13 20:51:15.545 15024 15024 D ServerConnectionInfo: localUrl is: true, usesInternalSsid is: false, usesWifi is: false
11-13 20:51:15.547 15024 15024 D MediaPlayCtrlsWidget: Broadcast received: 
11-13 20:51:15.547 15024 15024 D MediaPlayCtrlsWidget: Broadcast action: android.intent.action.SCREEN_ON
11-13 20:51:15.547 15024 15024 D MediaPlayCtrlsWidget: AppWidgetId: -1
11-13 20:51:15.550 15024 15024 D ServerConnectionInfo: localUrl is: true, usesInternalSsid is: false, usesWifi is: false
11-13 20:51:15.554 15024 15024 D ServerConnectionInfo: localUrl is: true, usesInternalSsid is: false, usesWifi is: false
11-13 20:51:15.563 15024 15088 D ServerConnectionInfo: localUrl is: true, usesInternalSsid is: false, usesWifi is: false
11-13 20:51:15.563 15024 15067 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=0cc46dda-94a5-4ce9-86d8-745f19c40f68, tags={ io.homeassistant.companion.android.websocket.WebsocketManager } ]
11-13 20:51:16.052 15024 15024 D IntegrationRepository: setAppActive(): false
11-13 20:51:16.053 15024 15024 D IntegrationRepository: setAppActive(): false
11-13 20:51:22.113 15024 15037 W System  : A resource failed to call destroy. 
11-13 20:51:25.055 15024 15088 E SensorReceiver: Issue registering sensor high_accuracy_update_interval
11-13 20:51:25.055 15024 15088 E SensorReceiver: io.homeassistant.companion.android.common.data.integration.IntegrationException: Error calling integration request register_sensor
11-13 20:51:25.055 15024 15088 E SensorReceiver: 	at io.homeassistant.companion.android.common.data.integration.impl.IntegrationRepositoryImpl.registerSensor(IntegrationRepositoryImpl.kt:746)
11-13 20:51:25.055 15024 15088 E SensorReceiver: 	at io.homeassistant.companion.android.common.data.integration.impl.IntegrationRepositoryImpl$registerSensor$1.invokeSuspend(Unknown Source:15)
11-13 20:51:25.055 15024 15088 E SensorReceiver: 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
11-13 20:51:25.055 15024 15088 E SensorReceiver: 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
11-13 20:51:25.055 15024 15088 E SensorReceiver: 	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
11-13 20:51:25.055 15024 15088 E SensorReceiver: 	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
11-13 20:51:25.055 15024 15088 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
11-13 20:51:25.055 15024 15088 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
11-13 20:51:25.055 15024 15088 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
11-13 20:51:25.055 15024 15088 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
11-13 20:51:25.105 15024 15088 D SensorReceiver: Nothing to update for server 2 (H123)
11-13 20:51:25.105 15024 15088 I SensorReceiver: Sensor updates and sync completed
11-13 20:51:43.222 15024 15024 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1699905077052, currentMillis: 1699905103219)
11-13 20:51:43.272 15024 15061 E OpenGLRenderer: Unable to match the desired swap behavior.
11-13 20:51:43.294 15024 15024 D LocBroadcastReceiver: Received location update.
11-13 20:51:43.302 15024 15024 D ForegrndServiceLauncher: Check if service HighAccuracyLocationService is running. Service running = false
11-13 20:51:43.303 15024 15088 D LocBroadcastReceiver: Last Location: 
11-13 20:51:43.303 15024 15088 D LocBroadcastReceiver: Coords:
11-13 20:51:43.303 15024 15088 D LocBroadcastReceiver: Accuracy: 100.0
11-13 20:51:43.303 15024 15088 D LocBroadcastReceiver: Bearing: 0.0
11-13 20:51:43.303 15024 15088 D LocBroadcastReceiver: Begin evaluating if location update should be skipped
11-13 20:51:43.303 15024 15088 D LocBroadcastReceiver: Received location that is 104 milliseconds old, 1699905103199 compared to 1699905103303 with source fused
11-13 20:51:43.303 15024 15088 D LocBroadcastReceiver: Duplicate location received, not sending to HA
11-13 20:51:43.316 15024 15024 D LocationTrackingViewMod: Returning PagingSource for history filter: ALL
11-13 20:51:43.603 15024 15024 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1699905077052, currentMillis: 1699905103603)
11-13 20:51:43.603 15024 15024 D IntegrationRepository: setAppActive(): true
11-13 20:51:43.631 15024 15024 W Choreographer: Frame time is 0.160864 ms in the future!  Check that graphics HAL is generating vsync timestamps using the correct timebase.
11-13 20:52:29.060 15024 15024 D LocBroadcastReceiver: Received location update.
11-13 20:52:29.072 15024 15024 D ForegrndServiceLauncher: Check if service HighAccuracyLocationService is running. Service running = false
11-13 20:52:29.073 15024 15088 D LocBroadcastReceiver: Last Location: 
11-13 20:52:29.073 15024 15088 D LocBroadcastReceiver: Coords:
11-13 20:52:29.073 15024 15088 D LocBroadcastReceiver: Accuracy: 22.971
11-13 20:52:29.073 15024 15088 D LocBroadcastReceiver: Bearing: 0.0
11-13 20:52:29.075 15024 15088 D LocBroadcastReceiver: Begin evaluating if location update should be skipped
11-13 20:52:29.076 15024 15088 D LocBroadcastReceiver: Received location that is 988 milliseconds old, 1699905148087 compared to 1699905149075 with source fused
11-13 20:52:29.089 15024 15088 D ServerConnectionInfo: localUrl is: true, usesInternalSsid is: false, usesWifi is: false
11-13 20:52:29.143 15024 17891 D TrafficStats: tagSocket(114) with statsTag=0xffffffff, statsUid=-1
11-13 20:52:50.248 15024 15088 E LocBroadcastReceiver: Could not update location for 2.
11-13 20:52:50.248 15024 15088 E LocBroadcastReceiver: io.homeassistant.companion.android.common.data.integration.IntegrationException: Error calling integration request update_location
11-13 20:52:50.248 15024 15088 E LocBroadcastReceiver: 	at io.homeassistant.companion.android.common.data.integration.impl.IntegrationRepositoryImpl.updateLocation(IntegrationRepositoryImpl.kt:266)
11-13 20:52:50.248 15024 15088 E LocBroadcastReceiver: 	at io.homeassistant.companion.android.common.data.integration.impl.IntegrationRepositoryImpl$updateLocation$1.invokeSuspend(Unknown Source:15)
11-13 20:52:50.248 15024 15088 E LocBroadcastReceiver: 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
11-13 20:52:50.248 15024 15088 E LocBroadcastReceiver: 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
11-13 20:52:50.248 15024 15088 E LocBroadcastReceiver: 	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
11-13 20:52:50.248 15024 15088 E LocBroadcastReceiver: 	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
11-13 20:52:50.248 15024 15088 E LocBroadcastReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
11-13 20:52:50.248 15024 15088 E LocBroadcastReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
11-13 20:52:50.248 15024 15088 E LocBroadcastReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
11-13 20:52:50.248 15024 15088 E LocBroadcastReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
11-13 20:52:50.264 15024 15024 D LocationTrackingViewMod: Returning PagingSource for history filter: ALL
11-13 20:53:24.506 15024 15093 D LogcatReader: Read logcat for pid 15024

yea stil not seeing the original exception there. You can try to force stop the app and open it again and grab the logs and it shoudl be somewhere near the top.

Here is the requested log: Logpasta - simple, secure log paste service.

The timestamp at which I had the first sending error is 11-16 00:17:26.

there we go

11-16 00:15:56.517 23685 23878 E SensorReceiver: io.homeassistant.companion.android.common.data.integration.IntegrationException: retrofit2.HttpException: HTTP 502 Bad Gateway

your server is returning a 502 error for the API calls, make sure that nothing is being blocked on your network

Thanks. I am using HA cloud with nothing in the way. At some point, I had a tailscale add-on which I since then disabled. I am not sure where to search.

I supposedly opened a ticket with Nabu Casa. However, I have no email confirmation that it was opened and no way to follow it up online, as far as I know. Thanks for your assistance.

Nabu casa was very prompt to reply with the suggestion of manually setting the external URL the app uses to my remote address. This seems to solve my issue. I understand that I therefore had the same issue as described above (Companion Android app failing to send sensor data or notification actions while on mobile data - #4 by dshokouhi) despite having deleted the external URL value before selecting the “use HA Cloud”.

yea the app retrieves URL during the registration process but it seems in some cases the re-registration does not update the app properly. At least that is our assumption and why we ask users to check the URLs there.

1 Like