Closed will-l-h closed 1 year ago
Looking at the logs it took this long for the HA frontend to notify the app that the connection was established.
11-25 17:13:21.664 2418 2418 D WebviewActivity: Current webview package com.google.android.webview and version 96.0.4664.45
11-25 17:13:32.536 2418 5934 D WebviewActivity: External bus {"type":"connection-status","payload":{"event":"connected"},"id":1
I don't know if this is something the app can fix.
Are you saying this is an issue for everyone on Android companion?
There isn't something that can be done about whatever is blocking the download during that period? My internet connection is fine...
Are you saying this is an issue for everyone on Android companion?
No I haven't seen it yet and this is the first I'm hearing of it. Can you try disabling all custom cards and integrations and see if it gets better?
There isn't something that can be done about whatever is blocking the download during that period? My internet connection is fine...
No the app loads the interface and waits for the frontend to tell us it's ready.
I'll disable custom integrations on HA but "custom cards"... I mentioned I already simplified the Overview to just some switches. What else should I do in that regard?
Lovelace will still attempt to load any custom card resource that you have added to HA under Configuration > Lovelace Dashboard > Resources
Lovelace Dashboard > Resources was already empty. I've disabled all but a few integrations and most anything else I can think of. Any other hints before I start from scratch?
I see you also mentioned that occasionally you get the cannot connect pop-up.. Next time you see that pop-up go to Settings and then get the logs so we can see why that pop-up showed up. That will be the best hint to what the cause might be.
I've started fresh with everything (listed below) and with this setup, I can now use the HA internal IP with Companion. When I'm on my home wifi, the dashboard always opens promptly. When I'm away from home I still get the 15 second delay. I would think this rules out integrations, custom components, or anything within HA on the server since they would slow down the internal IP connection as well, right? Regardless, since it is a fresh install I have kept the install minimal so I only have: Z-Wave JS, Tasmota, MQTT, Mobile App on my integrations page and I haven't added any custom cards.
Here's the log after not using the app for 20 minutes and while waiting for the dashboard to load; wifi off, 5g connected with 62 mbps:
02-26 15:56:04.535 31342 31342 D UrlRepository: localUrl is: true and usesInternalSsid is: false
02-26 15:56:04.535 31342 31342 D UrlRepository: Using external URL
02-26 15:56:04.539 31342 31342 D UrlRepository: localUrl is: true and usesInternalSsid is: false
02-26 15:56:04.542 31342 31420 D UrlRepository: localUrl is: true and usesInternalSsid is: false
02-26 15:56:04.565 31342 31342 D LocBroadcastReceiver: Received location update.
02-26 15:56:04.565 31342 31342 D ForegrndServiceLauncher: Check if service HighAccuracyLocationService is running. Service running = false
02-26 15:56:04.565 31342 31342 D LocBroadcastReceiver: Last Location:
02-26 15:56:04.565 31342 31342 D LocBroadcastReceiver: Coords:(35.9874091, -83.9182206)
02-26 15:56:04.565 31342 31342 D LocBroadcastReceiver: Accuracy: 16.207
02-26 15:56:04.565 31342 31342 D LocBroadcastReceiver: Bearing: 0.0
02-26 15:56:04.565 31342 31342 D LocBroadcastReceiver: Begin evaluating if location update should be skipped
02-26 15:56:04.565 31342 31342 D LocBroadcastReceiver: Received location that is 50 milliseconds old, 1645908964515 compared to 1645908964565 with source fused
02-26 15:56:04.566 31342 31342 D LocBroadcastReceiver: Duplicate location received, not sending to HA
02-26 15:56:04.591 31342 31342 I System.out: recordForce value 5
02-26 15:56:04.591 31342 31342 D WebviewActivity: Current webview package com.google.android.webview and version 98.0.4758.101
02-26 15:56:04.627 31342 31420 D SensorWorker: Updating all Sensors.
02-26 15:56:04.628 31342 31384 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=e03145ec-119f-4ecc-9fad-27cb313f3f6b, tags={ io.homeassistant.companion.android.websocket.WebsocketManager } ]
02-26 15:56:04.634 31342 31384 I WM-Processor: Moving WorkSpec (d254c276-3c22-4501-9030-d350a6d4f8dc) to the foreground
02-26 15:56:04.636 31342 31342 D UrlRepository: localUrl is: true and usesInternalSsid is: false
02-26 15:56:04.636 31342 31342 D UrlRepository: Using external URL
02-26 15:56:04.659 31342 31342 I WM-SystemFgDispatcher: Started foreground service Intent { act=ACTION_START_FOREGROUND cmp=io.homeassistant.companion.android/androidx.work.impl.foreground.SystemForegroundService (has extras) }
02-26 15:56:04.689 31342 31420 D UrlRepository: localUrl is: true and usesInternalSsid is: false
02-26 15:56:04.917 31342 31385 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=d254c276-3c22-4501-9030-d350a6d4f8dc, tags={ io.homeassistant.companion.android.sensors.SensorWorker } ]
02-26 15:56:04.918 31342 31342 I WM-SystemFgDispatcher: Stopping foreground service
02-26 15:56:04.997 31342 32448 D WebviewActivity: External bus {"type":"config/get","id":1}
02-26 15:56:04.999 31342 31342 D WebviewActivity: externalBus({"id":1,"type":"result","success":true,"result":{"hasSettingsScreen":true,"canWriteTag":true,"hasExoPlayer":true}});
02-26 15:56:05.042 31342 31342 D UrlRepository: localUrl is: true and usesInternalSsid is: false
02-26 15:56:05.042 31342 31342 D UrlRepository: Using external URL
02-26 15:56:05.042 31342 31342 D WebviewActivity: Callback null
02-26 15:56:05.042 31342 31342 D WebviewActivity: Color from webview is "#101e24-SPACER-#111111"
02-26 15:56:05.042 31342 31342 D WebviewActivity: Color from webview is "#101e24-SPACER-#111111"
02-26 15:56:05.042 31342 31420 D WebViewPresenterImpl: Try getting color from webview color "#101e24".
02-26 15:56:05.042 31342 31420 I WebViewPresenterImpl: Found color -15720924.
02-26 15:56:05.043 31342 31420 D WebViewPresenterImpl: Try getting color from webview color "#111111".
02-26 15:56:05.043 31342 31420 I WebViewPresenterImpl: Found color -15658735.
02-26 15:56:14.645 31342 31342 D UrlRepository: localUrl is: true and usesInternalSsid is: false
02-26 15:56:21.040 31342 32334 D OpenGLRenderer: endAllActiveAnimators on 0xb4000074064213b0 (RippleDrawable) with handle 0xb400007316397f70
02-26 15:56:21.064 31342 31342 D UrlRepository: localUrl is: true and usesInternalSsid is: false
02-26 15:56:21.064 31342 31342 D UrlRepository: Using external URL
I'm at a loss on what else to do given the barebones setup. Could I get some guidance on what else might be the cause here or could more logging be added to help troubleshoot?
I'm at a loss on what else to do given the barebones setup. Could I get some guidance on what else might be the cause here or could more logging be added to help troubleshoot?
The loading data screen that you see is from the HA frontend and is not a screen in the app. The pop-up you reported gets displayed when the HA frontend tells the app that it has been disconnected. The app is already providing as much logging as we can the delay is out of the apps control.
The recap for the slow opening after 30 minutes is:
But you're saying the issue lies with the HA frontend and not with the Companion app? I've ever tried docker container and not added anything to it, just creating a login--same issue.
Yes that is correct the HA frontend controls the loading data screen and the pop-up only shows up when the frontend tells the app it's disconnected.
just checking in to see if this is still an issue with the latest app version
Closing due to lack of response
Home Assistant Android version: 2021.10.0-full Android version: 12 Phone models: Pixel 6, Pixel 3 Home Assistant version: core-2021.11.5 Last working Home Assistant release (if known):
Description of problem: A cold open of the Android companion (it's been longer than 30 minutes since last open) takes over 15 seconds while waiting on the Loading data screen. If I immediately close the app (including swiping it from recent apps) and open again, it displays the Overview promptly. Using Chrome or the home screen shortcut (from "add to home screen"), is never slow; the page always displays within about a second.
Some other info:
Traceback: Slow, cold load:
Warm, fast reload
Screenshot of problem: Waiting
Occasionally get this while waiting, too