Mobile app sensors not registered when connecting to HA

My mobile app sensors stopped updating, specifically the wifi connection, so I followed the instructions Start fresh with the android app, but now no sensors are showing up. I followed the instructions specifically, not skipping any steps, but now every time I connect the app to my HA instance, all it does is create a single device and single entity under the mobile app integration. The default sensors, i.e. battery level don’t show at all. Any advice on how to fix this?

you should only need to connect once, any reason why you keep connecting?

are you able to get to the companion app logs? Settings > Companion App > Troubleshooting > show and share logs

I keep connecting to try different things to get it to work, basically keep doing the ‘start from fresh’ instructions. Here’s the first registration exception:

11-07 10:54:30.446 18503 18503 E IntegrationRepository: Unable to save device registration
11-07 10:54:30.446 18503 18503 E IntegrationRepository: io.homeassistant.companion.android.common.data.integration.IntegrationException: retrofit2.HttpException: HTTP 502 
11-07 10:54:30.446 18503 18503 E IntegrationRepository: 	at io.homeassistant.companion.android.common.data.integration.impl.IntegrationRepositoryImpl.getConfig(IntegrationRepositoryImpl.kt:532)
11-07 10:54:30.446 18503 18503 E IntegrationRepository: 	at io.homeassistant.companion.android.common.data.integration.impl.IntegrationRepositoryImpl$getConfig$1.invokeSuspend(Unknown Source:14)
11-07 10:54:30.446 18503 18503 E IntegrationRepository: 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
11-07 10:54:30.446 18503 18503 E IntegrationRepository: 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
11-07 10:54:30.446 18503 18503 E IntegrationRepository: 	at android.os.Handler.handleCallback(Handler.java:942)
11-07 10:54:30.446 18503 18503 E IntegrationRepository: 	at android.os.Handler.dispatchMessage(Handler.java:99)
11-07 10:54:30.446 18503 18503 E IntegrationRepository: 	at android.os.Looper.loopOnce(Looper.java:226)
11-07 10:54:30.446 18503 18503 E IntegrationRepository: 	at android.os.Looper.loop(Looper.java:313)
11-07 10:54:30.446 18503 18503 E IntegrationRepository: 	at android.app.ActivityThread.main(ActivityThread.java:8805)
11-07 10:54:30.446 18503 18503 E IntegrationRepository: 	at java.lang.reflect.Method.invoke(Native Method)
11-07 10:54:30.446 18503 18503 E IntegrationRepository: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604)
11-07 10:54:30.446 18503 18503 E IntegrationRepository: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
11-07 10:54:30.446 18503 18503 E IntegrationRepository: Caused by: retrofit2.HttpException: HTTP 502 
11-07 10:54:30.446 18503 18503 E IntegrationRepository: 	at retrofit2.KotlinExtensions$await$2$2.onResponse(KotlinExtensions.kt:53)
11-07 10:54:30.446 18503 18503 E IntegrationRepository: 	at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:161)
11-07 10:54:30.446 18503 18503 E IntegrationRepository: 	at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
11-07 10:54:30.446 18503 18503 E IntegrationRepository: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
11-07 10:54:30.446 18503 18503 E IntegrationRepository: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
11-07 10:54:30.446 18503 18503 E IntegrationRepository: 	at java.lang.Thread.run(Thread.java:1012)
11-07 10:54:30.458 18503 18503 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: false, usesWifi is: true

Another:

11-07 10:54:30.730 18503 19866 E LocBroadcastReceiver: Error receiving zones from Home Assistant
11-07 10:54:30.730 18503 19866 E LocBroadcastReceiver: io.homeassistant.companion.android.common.data.integration.IntegrationException: retrofit2.HttpException: HTTP 502 
11-07 10:54:30.730 18503 19866 E LocBroadcastReceiver: 	at io.homeassistant.companion.android.common.data.integration.impl.IntegrationRepositoryImpl.getZones(IntegrationRepositoryImpl.kt:401)
11-07 10:54:30.730 18503 19866 E LocBroadcastReceiver: 	at io.homeassistant.companion.android.common.data.integration.impl.IntegrationRepositoryImpl$getZones$1.invokeSuspend(Unknown Source:14)
11-07 10:54:30.730 18503 19866 E LocBroadcastReceiver: 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
11-07 10:54:30.730 18503 19866 E LocBroadcastReceiver: 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
11-07 10:54:30.730 18503 19866 E LocBroadcastReceiver: 	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
11-07 10:54:30.730 18503 19866 E LocBroadcastReceiver: 	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
11-07 10:54:30.730 18503 19866 E LocBroadcastReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
11-07 10:54:30.730 18503 19866 E LocBroadcastReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
11-07 10:54:30.730 18503 19866 E LocBroadcastReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
11-07 10:54:30.730 18503 19866 E LocBroadcastReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
11-07 10:54:30.730 18503 19866 E LocBroadcastReceiver: Caused by: retrofit2.HttpException: HTTP 502 
11-07 10:54:30.730 18503 19866 E LocBroadcastReceiver: 	at retrofit2.KotlinExtensions$await$2$2.onResponse(KotlinExtensions.kt:53)
11-07 10:54:30.730 18503 19866 E LocBroadcastReceiver: 	at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:161)
11-07 10:54:30.730 18503 19866 E LocBroadcastReceiver: 	at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
11-07 10:54:30.730 18503 19866 E LocBroadcastReceiver: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
11-07 10:54:30.730 18503 19866 E LocBroadcastReceiver: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
11-07 10:54:30.730 18503 19866 E LocBroadcastReceiver: 	at java.lang.Thread.run(Thread.java:1012)
11-07 10:54:30.730 18503 19866 W LocBroadcastReceiver: No zones, skipping zone based location updates

Another:

11-07 10:54:30.757 18503 18551 E IntegrationRepository: Issue getting new version from core.
11-07 10:54:30.757 18503 18551 E IntegrationRepository: io.homeassistant.companion.android.common.data.integration.IntegrationException: retrofit2.HttpException: HTTP 502 
11-07 10:54:30.757 18503 18551 E IntegrationRepository: 	at io.homeassistant.companion.android.common.data.integration.impl.IntegrationRepositoryImpl.getConfig(IntegrationRepositoryImpl.kt:532)
11-07 10:54:30.757 18503 18551 E IntegrationRepository: 	at io.homeassistant.companion.android.common.data.integration.impl.IntegrationRepositoryImpl$getConfig$1.invokeSuspend(Unknown Source:14)
11-07 10:54:30.757 18503 18551 E IntegrationRepository: 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
11-07 10:54:30.757 18503 18551 E IntegrationRepository: 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
11-07 10:54:30.757 18503 18551 E IntegrationRepository: 	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
11-07 10:54:30.757 18503 18551 E IntegrationRepository: 	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
11-07 10:54:30.757 18503 18551 E IntegrationRepository: 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
11-07 10:54:30.757 18503 18551 E IntegrationRepository: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
11-07 10:54:30.757 18503 18551 E IntegrationRepository: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
11-07 10:54:30.757 18503 18551 E IntegrationRepository: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
11-07 10:54:30.757 18503 18551 E IntegrationRepository: Caused by: retrofit2.HttpException: HTTP 502 
11-07 10:54:30.757 18503 18551 E IntegrationRepository: 	at retrofit2.KotlinExtensions$await$2$2.onResponse(KotlinExtensions.kt:53)
11-07 10:54:30.757 18503 18551 E IntegrationRepository: 	at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:161)
11-07 10:54:30.757 18503 18551 E IntegrationRepository: 	at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
11-07 10:54:30.757 18503 18551 E IntegrationRepository: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
11-07 10:54:30.757 18503 18551 E IntegrationRepository: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
11-07 10:54:30.757 18503 18551 E IntegrationRepository: 	at java.lang.Thread.run(Thread.java:1012)

Another:

11-07 10:54:30.847 18503 19866 E SensorReceiver: Issue registering sensor battery_level
11-07 10:54:30.847 18503 19866 E SensorReceiver: io.homeassistant.companion.android.common.data.integration.IntegrationException: Error calling integration request register_sensor
11-07 10:54:30.847 18503 19866 E SensorReceiver: 	at io.homeassistant.companion.android.common.data.integration.impl.IntegrationRepositoryImpl.registerSensor(IntegrationRepositoryImpl.kt:746)
11-07 10:54:30.847 18503 19866 E SensorReceiver: 	at io.homeassistant.companion.android.common.data.integration.impl.IntegrationRepositoryImpl$registerSensor$1.invokeSuspend(Unknown Source:15)
11-07 10:54:30.847 18503 19866 E SensorReceiver: 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
11-07 10:54:30.847 18503 19866 E SensorReceiver: 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
11-07 10:54:30.847 18503 19866 E SensorReceiver: 	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
11-07 10:54:30.847 18503 19866 E SensorReceiver: 	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
11-07 10:54:30.847 18503 19866 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
11-07 10:54:30.847 18503 19866 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
11-07 10:54:30.847 18503 19866 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
11-07 10:54:30.847 18503 19866 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)

For some reason I’m getting a 502 HTTP Error, but I’m not sure where to look as there’s no errors on my HA server about any of this.

whats your networking setup like? Proxy? DNS? Nabu Casa?

I have CloudFlare handling my domain name to ISP IP Address translation, that hits my NGinx Proxy Manager, which then forwards to HA instance.

your issue is probably somewhere in that mix, check to make sure you are not blocking the HA API calls, I have no idea where the issue may be but if you bypass that entire setup chances are things will work.

if you havent already tried reboot everything and try again.

1 Like

Thank you, that was it. I checked in my NGINX Proxy Manager and I had a different host name in the custom locations section for the /api/webhook, NGINX automagically did that when I switched it so they didn’t match. Once I changed it to matching host names, it works as expected. I appreciate the time you took to knock me in the head to look outside the box a bit :slight_smile:

1 Like