Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notifications fail when changing network (MINIMAL edition) #3235

Closed
Rudd-O opened this issue Jan 17, 2023 · 14 comments
Closed

Notifications fail when changing network (MINIMAL edition) #3235

Rudd-O opened this issue Jan 17, 2023 · 14 comments
Labels
bug Something isn't working notifications question Further information is requested

Comments

@Rudd-O
Copy link

Rudd-O commented Jan 17, 2023

Home Assistant Android version:

2022.12.0-minimal

Android version:

13

Phone model:

Pixel 6 Pro

Home Assistant version:

2023.1

Last working Home Assistant release (if known):

Not known. VPN is a new addition to my mix.

Description of problem:

I'm using latest Home Assistant and Companion Android app from F-Droid.

Whenever I change networks (e.g. go off wi-fi, onto mobile, and then turn VPN on) Home Assistant Companion will connect to my home network's (internal IP) Home Assistant server just fine. Same is true when I return home and VPN goes off as the phone connects to wi-fi.

HOWEVER, notifications sent with notify.notify do not reach the phone anymore, and sometimes there's a nasty traceback in the log (see below). Only a force stop and then restart of the app re-establishes the local push token, leading to notifications working again.

It is important to know that the app is functioning properly after changing networks — but the local push notifications feature is not.
Traceback (if applicable, to get the logs you may refer to: https://companion.home-assistant.io/docs/troubleshooting/faqs/#android-crash-logs):

Jan 17 18:30:35 assistant hass[1184825]: 2023-01-17 18:30:35.720 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [126709766522672] Error handling message: Unknown error (unknown_error) from 10.250.4.18 (Home Assistant/LOCAL-1 (Android 13; Pixel 6 Pro))
Jan 17 18:30:35 assistant hass[1184825]: Traceback (most recent call last):
Jan 17 18:30:35 assistant hass[1184825]:   File "/opt/assistant/lib64/python3.10/site-packages/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response
Jan 17 18:30:35 assistant hass[1184825]:     await func(hass, connection, msg)
Jan 17 18:30:35 assistant hass[1184825]:   File "/opt/assistant/lib64/python3.10/site-packages/homeassistant/components/mobile_app/websocket_api.py", line 106, in handle_push_notification_channel
Jan 17 18:30:35 assistant hass[1184825]:     await registered_channels[webhook_id].async_teardown()
Jan 17 18:30:35 assistant hass[1184825]:   File "/opt/assistant/lib64/python3.10/site-packages/homeassistant/components/mobile_app/push_notification.py", line 92, in async_teardown
Jan 17 18:30:35 assistant hass[1184825]:     await asyncio.gather(*cancel_pending_local_tasks)
Jan 17 18:30:35 assistant hass[1184825]:   File "/opt/assistant/lib64/python3.10/site-packages/homeassistant/components/mobile_app/push_notification.py", line 55, in handle_push_failed
Jan 17 18:30:35 assistant hass[1184825]:     await fallback_send(data)
Jan 17 18:30:35 assistant hass[1184825]:   File "/opt/assistant/lib64/python3.10/site-packages/homeassistant/components/mobile_app/notify.py", line 144, in _async_send_remote_message_target
Jan 17 18:30:35 assistant hass[1184825]:     push_token = app_data[ATTR_PUSH_TOKEN]
Jan 17 18:30:35 assistant hass[1184825]: KeyError: 'push_token'

Screenshot of problem:

No screenshot. Nothing happens on the phone.

Additional information:

No additional information.

@Rudd-O Rudd-O added the bug Something isn't working label Jan 17, 2023
@dshokouhi
Copy link
Member

hi please do not delete the issue template that got presented when the issue is created, all requested information is important to help you out.

@dshokouhi dshokouhi added question Further information is requested notifications labels Jan 17, 2023
@Rudd-O
Copy link
Author

Rudd-O commented Jan 17, 2023

Let me reformat everything in the issue template format. One second please...

@dshokouhi
Copy link
Member

Home Assistant Android version:

Latest GrapheneOS (latest Google OS security patches)

Looking for the actual app version here. Settings > Companion App > Version (bottom of settings)

Please also look at the companion app logs when the issue occurs

Settings > Companion App > Show and share logs

we need to see the on device logs when this issue occurs.

You should actually see the app trying to reconnect every 30 seconds so I don't think a force stop is necessary here unless some other error is occurring which the on device logs will show.

@Rudd-O
Copy link
Author

Rudd-O commented Jan 17, 2023

Stand by for logcat.

@Rudd-O
Copy link
Author

Rudd-O commented Jan 17, 2023

Please also look at the companion app logs when the issue occurs

Here are the companion logs. There is obviously nothing on the logs that would indicate an issue since it is the server that can't talk to the client (remember the backtrace), not the other way around. From the perspective of the server, there is a KeyError and nothing more.

--------- beginning of main
01-18 00:54:09.199 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:09.199 25933 25966 D UrlRepository: Using external URL
01-18 00:54:09.201 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:09.202 25933 25966 D UrlRepository: Using external URL
01-18 00:54:09.336 25933 26003 D TrafficStats: tagSocket(76) with statsTag=0xffffffff, statsUid=-1
01-18 00:54:09.399 25933 26003 D WebSocketRepository: Websocket: onOpen
01-18 00:54:09.399 25933 26003 D WebSocketRepository: Websocket: onMessage (text)
01-18 00:54:09.400 25933 26003 D WebSocketRepository: Message number null received
01-18 00:54:09.400 25933 25966 D WebSocketRepository: Auth Requested
01-18 00:54:09.444 25933 26003 D WebSocketRepository: Websocket: onMessage (text)
01-18 00:54:09.445 25933 26003 D WebSocketRepository: Message number null received
01-18 00:54:09.445 25933 25966 D WebSocketRepository: Sending message 688: {type=supported_features, id=688, features={coalesce_messages=1}}
01-18 00:54:09.445 25933 25966 D WebSocketRepository: Resubscribing to active subscriptions...
01-18 00:54:09.445 25933 25966 D WebSocketRepository: Sending message 689: {type=mobile_app/push_notification_channel, webhook_id=e7d9da9b68f9966eb470d93858a55c6676765aeab7992d444b52cd1cd38f0228, support_confirm=true, id=689}
01-18 00:54:09.446 25933 25966 D WebSocketRepository: Message number 689 sent
01-18 00:54:09.484 25933 26003 D WebSocketRepository: Websocket: onMessage (text)
01-18 00:54:09.484 25933 26003 D WebSocketRepository: Message number 688 received
01-18 00:54:09.535 25933 26003 D WebSocketRepository: Websocket: onMessage (text)
01-18 00:54:09.535 25933 26003 D WebSocketRepository: Message number 689 received
01-18 00:54:10.687 25933 25933 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1673999641496, currentMillis: 1673999650687)
01-18 00:54:11.205 25933 25933 I Choreographer: Skipped 61 frames!  The application may be doing too much work on its main thread.
01-18 00:54:11.217 25933 25933 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1673999641496, currentMillis: 1673999651217)
01-18 00:54:11.843 25933 25933 D UrlRepository: Using external URL
01-18 00:54:12.300 25933 25933 D IntegrationRepository: setSessionExpireMillis(): 1673999653300
01-18 00:54:12.300 25933 25933 D IntegrationRepository: setAppActive(): false
01-18 00:54:12.306 25933 25933 D WebviewActivity: Matter commissioning status changed to NOT_STARTED
01-18 00:54:12.306 25933 25933 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1673999653300, currentMillis: 1673999652306)
01-18 00:54:12.390 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:12.391 25933 25982 I WM-Processor: Moving WorkSpec (1f505530-4aa5-4e9c-b297-d29357a7f522) to the foreground
01-18 00:54:12.394 25933 25966 D SensorWorker: Updating all Sensors in foreground.
01-18 00:54:12.399 25933 25933 I WM-SystemFgDispatcher: Started foreground service Intent { act=ACTION_START_FOREGROUND cmp=io.homeassistant.companion.android.minimal/androidx.work.impl.foreground.SystemForegroundService (has extras) }
01-18 00:54:12.407 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:12.412 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:12.448 25933 25933 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1673999653300, currentMillis: 1673999652448)
01-18 00:54:12.451 25933 25933 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:12.451 25933 25933 D UrlRepository: Using external URL
01-18 00:54:12.539 25933  2569 D TrafficStats: tagSocket(177) with statsTag=0xffffffff, statsUid=-1
01-18 00:54:12.617 25933 26124 D WebviewActivity: External bus {"type":"connection-status","payload":{"event":"connected"},"id":9}
01-18 00:54:12.622 25933 25933 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:12.632 25933 25966 E AudioManager: updatePortConfig port not found for handle: 14
01-18 00:54:12.674 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:12.676 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:12.679 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:12.682 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:12.753 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:12.757 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:12.759 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:12.761 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:12.820 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:12.822 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:12.824 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:12.826 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:12.898 25933 25968 D OpenGLRenderer: endAllActiveAnimators on 0xb400c14255f52f00 (RippleDrawable) with handle 0xb400c0260b598a20
01-18 00:54:12.957 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:12.959 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:12.961 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:12.963 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:13.034 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:13.039 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:13.044 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:13.049 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:13.114 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:13.116 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:13.119 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:13.121 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:13.171 25933 26124 D WebviewActivity: External bus {"type":"theme-update","id":10}
01-18 00:54:13.175 25933 25933 D WebviewActivity: Color from webview is "#101e24-SPACER-#111111"
01-18 00:54:13.175 25933 25933 D WebviewActivity: Color from webview is "#101e24-SPACER-#111111"
01-18 00:54:13.176 25933 26029 D WebViewPresenterImpl: Try getting color from webview color "#101e24".
01-18 00:54:13.176 25933 26029 I WebViewPresenterImpl: Found color -15720924.
01-18 00:54:13.177 25933 26029 D WebViewPresenterImpl: Try getting color from webview color "#111111".
01-18 00:54:13.177 25933 26029 I WebViewPresenterImpl: Found color -15658735.
01-18 00:54:13.180 25933 25966 D NextAlarm: No alarm is scheduled, sending unavailable
01-18 00:54:13.210 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:13.285 25933 25962 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=1f505530-4aa5-4e9c-b297-d29357a7f522, tags={ io.homeassistant.companion.android.sensors.SensorWorker } ]
01-18 00:54:13.989 25933 29643 E BLASTBufferQueue: [VRI[WebViewActivity]#133](f:0,a:4) Faking releaseBufferCallback from transactionCompleteCallback
01-18 00:54:13.995 25933 29643 E BLASTBufferQueue: [VRI[WebViewActivity]#133](f:0,a:4) Faking releaseBufferCallback from transactionCompleteCallback
01-18 00:54:13.995 25933 29643 E BLASTBufferQueue: [VRI[WebViewActivity]#133](f:0,a:4) Faking releaseBufferCallback from transactionCompleteCallback
01-18 00:54:14.011 25933 29643 E BLASTBufferQueue: [VRI[WebViewActivity]#133](f:0,a:4) Faking releaseBufferCallback from transactionCompleteCallback
01-18 00:54:14.011 25933 29643 E BLASTBufferQueue: [VRI[WebViewActivity]#133](f:0,a:4) Faking releaseBufferCallback from transactionCompleteCallback
01-18 00:54:14.035 25933 29643 E BLASTBufferQueue: [VRI[WebViewActivity]#133](f:0,a:4) Faking releaseBufferCallback from transactionCompleteCallback
01-18 00:54:14.035 25933 29643 E BLASTBufferQueue: [VRI[WebViewActivity]#133](f:0,a:4) Faking releaseBufferCallback from transactionCompleteCallback
01-18 00:54:14.053 25933 29643 E BLASTBufferQueue: [VRI[WebViewActivity]#133](f:0,a:4) Faking releaseBufferCallback from transactionCompleteCallback
01-18 00:54:14.053 25933 29643 E BLASTBufferQueue: [VRI[WebViewActivity]#133](f:0,a:4) Faking releaseBufferCallback from transactionCompleteCallback
01-18 00:54:16.130 25933 26003 D WebSocketRepository: Websocket: onMessage (text)
01-18 00:54:16.132 25933 26003 D WebSocketRepository: Message number 689 received
01-18 00:54:16.135 25933 25966 D WebSocketRepository: Sending message 690: {type=mobile_app/push_notification_confirm, webhook_id=e7d9da9b68f9966eb470d93858a55c6676765aeab7992d444b52cd1cd38f0228, confirm_id=b45bc86546e28f4baedbd07c6f645034, id=690}
01-18 00:54:16.136 25933 25966 D WebSocketRepository: Message number 690 sent
01-18 00:54:16.178 25933 26003 D WebSocketRepository: Websocket: onMessage (text)
01-18 00:54:16.178 25933 26003 D WebSocketRepository: Message number 690 received
01-18 00:54:16.185 25933 25933 D MessagingService: Creating notification with following data: {message=test}
01-18 00:54:16.194 25933 25933 D MessagingService: Show notification with tag "null" and id "-1037589255"
01-18 00:54:26.420 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:26.420 25933 25966 D WebSocketRepository: Sending message 691: {type=ping, id=691}
01-18 00:54:26.420 25933 25966 D WebSocketRepository: Message number 691 sent
01-18 00:54:26.527 25933 26003 D WebSocketRepository: Websocket: onMessage (text)
01-18 00:54:26.528 25933 26003 D WebSocketRepository: Message number 691 received
01-18 00:54:27.221 25933 25933 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1673999653300, currentMillis: 1673999667221)
01-18 00:54:27.227 25933 25933 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:27.228 25933 25933 D UrlRepository: Using external URL
01-18 00:54:32.254 25933 25933 D SensorReceiver: Received intent: android.net.wifi.WIFI_STATE_CHANGED
01-18 00:54:32.515 25933 25933 D SensorReceiver: Received intent: android.net.wifi.WIFI_STATE_CHANGED
01-18 00:54:32.828 25933 25998 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:32.828 25933 25997 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:32.870 25933 25997 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:32.877 25933 25998 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:32.957 25933  2056 D TrafficStats: tagSocket(94) with statsTag=0xffffffff, statsUid=-1
01-18 00:54:32.991 25933 25998 E AudioManager: updatePortConfig port not found for handle: 14
01-18 00:54:33.143 25933 25998 D NextAlarm: No alarm is scheduled, sending unavailable
01-18 00:54:33.193 25933 25998 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:33.218 25933 25997 D NextAlarm: No alarm is scheduled, sending unavailable
01-18 00:54:33.243 25933 25997 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:34.724 25933 25933 D IntegrationRepository: setSessionExpireMillis(): 1673999675724
01-18 00:54:34.724 25933 25933 D IntegrationRepository: setAppActive(): false
01-18 00:54:34.725 25933 25933 D IntegrationRepository: setSessionExpireMillis(): 1673999675725
01-18 00:54:34.725 25933 25933 D IntegrationRepository: setAppActive(): false
01-18 00:54:34.729 25933 25933 D SensorReceiver: Received intent: io.homeassistant.companion.android.UPDATE_SENSORS
01-18 00:54:34.732 25933 25997 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:34.736 25933 25997 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:34.806 25933 25997 E AudioManager: updatePortConfig port not found for handle: 14
01-18 00:54:34.863 25933 25997 D NextAlarm: No alarm is scheduled, sending unavailable
01-18 00:54:34.881 25933 25997 D UrlRepository: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
01-18 00:54:35.151 25933 25933 D SensorReceiver: Received intent: android.net.wifi.STATE_CHANGE
01-18 00:54:35.158 25933 25998 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: false
01-18 00:54:35.162 25933 25998 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: false
01-18 00:54:35.347 25933 25998 D NextAlarm: No alarm is scheduled, sending unavailable
01-18 00:54:35.367 25933 25933 D SensorReceiver: Received intent: android.net.wifi.STATE_CHANGE
01-18 00:54:35.373 25933 25997 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: false
01-18 00:54:35.376 25933 25998 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: false
01-18 00:54:35.379 25933 25997 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: false
01-18 00:54:35.435 25933 25933 D SensorReceiver: Received intent: android.net.wifi.STATE_CHANGE
01-18 00:54:35.444 25933 25933 D SensorReceiver: Received intent: android.net.wifi.STATE_CHANGE
01-18 00:54:35.547 25933 25997 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: false
01-18 00:54:35.551 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: false
01-18 00:54:35.564 25933 25998 D NextAlarm: No alarm is scheduled, sending unavailable
01-18 00:54:35.586 25933 25998 D SensorReceiver: Nothing to update
01-18 00:54:35.700 25933 25997 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: false
01-18 00:54:35.701 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: false
01-18 00:54:35.756 25933 25933 D SensorReceiver: Received intent: android.net.wifi.STATE_CHANGE
01-18 00:54:35.764 25933 25998 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: false
01-18 00:54:35.771 25933 25998 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: false
01-18 00:54:35.789 25933 25933 D SensorReceiver: Received intent: android.net.wifi.STATE_CHANGE
01-18 00:54:35.812 25933 25998 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: false
01-18 00:54:35.855 25933 25998 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: false
01-18 00:54:36.050 25933 25966 D NextAlarm: No alarm is scheduled, sending unavailable
01-18 00:54:36.069 25933 25933 D TrafficStats: tagSocket(100) with statsTag=0xffffffff, statsUid=-1
01-18 00:54:36.078 25933 25997 D NextAlarm: No alarm is scheduled, sending unavailable
01-18 00:54:36.150 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
01-18 00:54:36.174 25933 25997 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
01-18 00:54:36.200 25933 25999 D NextAlarm: No alarm is scheduled, sending unavailable
01-18 00:54:36.252 25933 25998 D NextAlarm: No alarm is scheduled, sending unavailable
01-18 00:54:36.258 25933 25999 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
01-18 00:54:36.284 25933 25998 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
01-18 00:54:37.631 25933 25933 D SensorReceiver: Received intent: android.net.wifi.STATE_CHANGE
01-18 00:54:37.645 25933 25933 D SensorReceiver: Received intent: android.net.wifi.STATE_CHANGE
01-18 00:54:37.651 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
01-18 00:54:37.651 25933 25998 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
01-18 00:54:37.717 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: false
01-18 00:54:37.718 25933 25998 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: false
01-18 00:54:37.724 25933 25933 D TrafficStats: tagSocket(100) with statsTag=0xffffffff, statsUid=-1
01-18 00:54:37.806 25933 25933 D TrafficStats: tagSocket(100) with statsTag=0xffffffff, statsUid=-1
01-18 00:54:37.843 25933 25998 E AudioManager: updatePortConfig port not found for handle: 14
01-18 00:54:37.858 25933 25933 D SensorReceiver: Received intent: android.net.wifi.STATE_CHANGE
01-18 00:54:37.863 25933 25999 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: false
01-18 00:54:37.867 25933 25999 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: false
01-18 00:54:37.902 25933 25933 D SensorReceiver: Received intent: android.net.wifi.STATE_CHANGE
01-18 00:54:37.907 25933 25933 D SensorReceiver: Received intent: android.net.wifi.STATE_CHANGE
01-18 00:54:38.168 25933 25997 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: false
01-18 00:54:38.168 25933 25999 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: false
01-18 00:54:38.171 25933 25997 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: false
01-18 00:54:38.172 25933 25999 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: false
01-18 00:54:38.209 25933 25998 D NextAlarm: No alarm is scheduled, sending unavailable
01-18 00:54:38.210 25933 25966 D NextAlarm: No alarm is scheduled, sending unavailable
01-18 00:54:38.211 25933 25965 D NextAlarm: No alarm is scheduled, sending unavailable
01-18 00:54:38.312 25933 25933 D SensorReceiver: Received intent: android.net.wifi.STATE_CHANGE
01-18 00:54:38.328 25933 25933 D SensorReceiver: Received intent: android.net.wifi.STATE_CHANGE
01-18 00:54:38.359 25933 25998 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: false
01-18 00:54:38.360 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: false
01-18 00:54:38.362 25933 26030 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: false
01-18 00:54:38.364 25933 25965 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: false
01-18 00:54:38.366 25933 26029 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: false
01-18 00:54:38.390 25933 26029 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: false
01-18 00:54:38.392 25933 26030 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: false
01-18 00:54:38.398 25933  2568 D TrafficStats: tagSocket(100) with statsTag=0xffffffff, statsUid=-1
01-18 00:54:38.535 25933 25999 D NextAlarm: No alarm is scheduled, sending unavailable
01-18 00:54:38.536 25933 25997 D NextAlarm: No alarm is scheduled, sending unavailable
01-18 00:54:38.631 25933 25997 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: false
01-18 00:54:38.632 25933 25999 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: false
01-18 00:54:38.733 25933 25966 D NextAlarm: No alarm is scheduled, sending unavailable
01-18 00:54:38.740 25933 25965 D NextAlarm: No alarm is scheduled, sending unavailable
01-18 00:54:38.765 25933 25933 D TrafficStats: tagSocket(179) with statsTag=0xffffffff, statsUid=-1
01-18 00:54:38.831 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
01-18 00:54:38.887 25933 25965 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
01-18 00:54:46.109 25933 26124 D WebviewActivity: External bus {"type":"connection-status","payload":{"event":"disconnected"},"id":11}
01-18 00:54:46.110 25933 26003 E WebSocketRepository: Websocket: onFailure
01-18 00:54:46.110 25933 26003 E WebSocketRepository: java.net.SocketException: Software caused connection abort
01-18 00:54:46.110 25933 26003 E WebSocketRepository: 	at java.net.SocketInputStream.socketRead0(Native Method)
01-18 00:54:46.110 25933 26003 E WebSocketRepository: 	at java.net.SocketInputStream.socketRead(SocketInputStream.java:118)
01-18 00:54:46.110 25933 26003 E WebSocketRepository: 	at java.net.SocketInputStream.read(SocketInputStream.java:173)
01-18 00:54:46.110 25933 26003 E WebSocketRepository: 	at java.net.SocketInputStream.read(SocketInputStream.java:143)
01-18 00:54:46.110 25933 26003 E WebSocketRepository: 	at okio.InputStreamSource.read(JvmOkio.kt:94)
01-18 00:54:46.110 25933 26003 E WebSocketRepository: 	at okio.AsyncTimeout$source$1.read(AsyncTimeout.kt:125)
01-18 00:54:46.110 25933 26003 E WebSocketRepository: 	at okio.RealBufferedSource.request(RealBufferedSource.kt:206)
01-18 00:54:46.110 25933 26003 E WebSocketRepository: 	at okio.RealBufferedSource.require(RealBufferedSource.kt:199)
01-18 00:54:46.110 25933 26003 E WebSocketRepository: 	at okio.RealBufferedSource.readByte(RealBufferedSource.kt:209)
01-18 00:54:46.110 25933 26003 E WebSocketRepository: 	at okhttp3.internal.ws.WebSocketReader.readHeader(WebSocketReader.kt:119)
01-18 00:54:46.110 25933 26003 E WebSocketRepository: 	at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.kt:102)
01-18 00:54:46.110 25933 26003 E WebSocketRepository: 	at okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.kt:293)
01-18 00:54:46.110 25933 26003 E WebSocketRepository: 	at okhttp3.internal.ws.RealWebSocket$connect$1.onResponse(RealWebSocket.kt:195)
01-18 00:54:46.110 25933 26003 E WebSocketRepository: 	at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
01-18 00:54:46.110 25933 26003 E WebSocketRepository: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
01-18 00:54:46.110 25933 26003 E WebSocketRepository: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
01-18 00:54:46.110 25933 26003 E WebSocketRepository: 	at java.lang.Thread.run(Thread.java:1012)
01-18 00:54:49.792 25933 25933 D WebviewActivity: Matter commissioning status changed to NOT_STARTED
01-18 00:54:49.792 25933 25933 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1673999675725, currentMillis: 1673999689792)
01-18 00:54:49.843 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
01-18 00:54:49.845 25933 25970 I WM-Processor: Moving WorkSpec (f1f3f95c-1c3f-4e32-ba8b-d512d9fc994f) to the foreground
01-18 00:54:49.849 25933 25966 D SensorWorker: Updating all Sensors in foreground.
01-18 00:54:49.851 25933 25933 I WM-SystemFgDispatcher: Started foreground service Intent { act=ACTION_START_FOREGROUND cmp=io.homeassistant.companion.android.minimal/androidx.work.impl.foreground.SystemForegroundService (has extras) }
01-18 00:54:49.853 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
01-18 00:54:49.861 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
01-18 00:54:49.861 25933 25933 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1673999675725, currentMillis: 1673999689861)
01-18 00:54:49.867 25933 25933 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
01-18 00:54:49.867 25933 25933 D UrlRepository: Using external URL
01-18 00:54:49.910 25933  2568 D TrafficStats: tagSocket(94) with statsTag=0xffffffff, statsUid=-1
01-18 00:54:49.933 25933 26124 D WebviewActivity: External bus {"type":"connection-status","payload":{"event":"connected"},"id":12}
01-18 00:54:49.951 25933 25966 E AudioManager: updatePortConfig port not found for handle: 14
01-18 00:54:50.026 25933 25933 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
01-18 00:54:50.063 25933 25966 D NextAlarm: No alarm is scheduled, sending unavailable
01-18 00:54:50.101 25933 25966 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
01-18 00:54:50.276 25933 25971 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=f1f3f95c-1c3f-4e32-ba8b-d512d9fc994f, tags={ io.homeassistant.companion.android.sensors.SensorWorker } ]
01-18 00:54:50.970 25933 26124 D WebviewActivity: External bus {"type":"theme-update","id":13}
01-18 00:54:50.983 25933 25933 D WebviewActivity: Color from webview is "#101e24-SPACER-#111111"
01-18 00:54:50.983 25933 25933 D WebviewActivity: Color from webview is "#101e24-SPACER-#111111"
01-18 00:54:50.983 25933 25965 D WebViewPresenterImpl: Try getting color from webview color "#101e24".
01-18 00:54:50.984 25933 25965 I WebViewPresenterImpl: Found color -15720924.
01-18 00:54:50.987 25933 25965 D WebViewPresenterImpl: Try getting color from webview color "#111111".
01-18 00:54:50.987 25933 25965 I WebViewPresenterImpl: Found color -15658735.
01-18 00:54:56.124 25933 25965 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
01-18 00:54:56.124 25933 25965 D UrlRepository: Using external URL
01-18 00:54:56.133 25933 25965 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
01-18 00:54:56.133 25933 25965 D UrlRepository: Using external URL
01-18 00:54:56.141 25933 26003 D TrafficStats: tagSocket(108) with statsTag=0xffffffff, statsUid=-1
01-18 00:54:56.157 25933 26003 D WebSocketRepository: Websocket: onOpen
01-18 00:54:56.158 25933 26003 D WebSocketRepository: Websocket: onMessage (text)
01-18 00:54:56.158 25933 26003 D WebSocketRepository: Message number null received
01-18 00:54:56.158 25933 25965 D WebSocketRepository: Auth Requested
01-18 00:54:56.165 25933 26003 D WebSocketRepository: Websocket: onMessage (text)
01-18 00:54:56.166 25933 26003 D WebSocketRepository: Message number null received
01-18 00:54:56.166 25933 25966 D WebSocketRepository: Sending message 692: {type=supported_features, id=692, features={coalesce_messages=1}}
01-18 00:54:56.166 25933 25966 D WebSocketRepository: Resubscribing to active subscriptions...
01-18 00:54:56.167 25933 25966 D WebSocketRepository: Sending message 693: {type=mobile_app/push_notification_channel, webhook_id=e7d9da9b68f9966eb470d93858a55c6676765aeab7992d444b52cd1cd38f0228, support_confirm=true, id=693}
01-18 00:54:56.167 25933 25966 D WebSocketRepository: Message number 693 sent
01-18 00:54:56.173 25933 26003 D WebSocketRepository: Websocket: onMessage (text)
01-18 00:54:56.173 25933 26003 D WebSocketRepository: Message number 692 received
01-18 00:54:56.181 25933 26003 D WebSocketRepository: Websocket: onMessage (text)
01-18 00:54:56.181 25933 26003 D WebSocketRepository: Message number 693 received
01-18 00:54:56.181 25933 26029 E WebSocketRepository: Issue re-registering subscription with {type=mobile_app/push_notification_channel, webhook_id=e7d9da9b68f9966eb470d93858a55c6676765aeab7992d444b52cd1cd38f0228, support_confirm=true}
01-18 00:54:56.536 25933 25965 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
01-18 00:54:56.536 25933 25965 D WebSocketRepository: Sending message 694: {type=ping, id=694}
01-18 00:54:56.536 25933 25965 D WebSocketRepository: Message number 694 sent
01-18 00:54:56.545 25933 26003 D WebSocketRepository: Websocket: onMessage (text)
01-18 00:54:56.546 25933 26003 D WebSocketRepository: Message number 694 received
01-18 00:55:00.006 25933 25933 D SensorReceiver: Received intent: android.intent.action.TIME_TICK
01-18 00:55:00.009 25933 25997 I SensorReceiver: Skipping faster update because not charging/different preference
01-18 00:55:12.803 25933 25954 I io.homeassistant.companion.android.minimal: Background concurrent copying GC freed 1222458(41MB) AllocSpace objects, 40(3664KB) LOS objects, 75% free, 19MB/79MB, paused 48us,65us total 122.624ms
01-18 00:55:12.854 25933 25956 W System  : A resource failed to call destroy. 
01-18 00:55:26.554 25933 25997 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
01-18 00:55:26.554 25933 25997 D WebSocketRepository: Sending message 695: {type=ping, id=695}
01-18 00:55:26.554 25933 25997 D WebSocketRepository: Message number 695 sent
01-18 00:55:26.649 25933 26003 D WebSocketRepository: Websocket: onMessage (text)
01-18 00:55:26.650 25933 26003 D WebSocketRepository: Message number 695 received
01-18 00:55:37.289 25933 26124 D WebviewActivity: External bus {"type":"config_screen/show","id":14}
01-18 00:55:37.297 25933 25933 D IntegrationRepository: setSessionExpireMillis(): 1673999738297
01-18 00:55:37.297 25933 25933 D IntegrationRepository: setAppActive(): false
01-18 00:55:37.298 25933 25933 D IntegrationRepository: setSessionExpireMillis(): 1673999738298
01-18 00:55:37.298 25933 25933 D IntegrationRepository: setAppActive(): false
01-18 00:55:37.312 25933 25933 D UrlRepository: Using internal URL
01-18 00:55:37.312 25933 25933 D UrlRepository: Using internal URL
01-18 00:55:37.317 25933 25933 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1673999738298, currentMillis: 1673999737317)
01-18 00:55:37.320 25933 25933 D SensorReceiver: Received intent: io.homeassistant.companion.android.UPDATE_SENSORS
01-18 00:55:37.323 25933 25965 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
01-18 00:55:37.326 25933 25965 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
01-18 00:55:37.349 25933 25933 D UrlRepository: Using external URL
01-18 00:55:37.377 25933 25933 D UrlRepository: Using external URL
01-18 00:55:37.414 25933 25965 D NextAlarm: No alarm is scheduled, sending unavailable
01-18 00:55:37.437 25933 25965 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
01-18 00:55:37.460 25933 25933 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1673999738298, currentMillis: 1673999737460)
01-18 00:55:42.187 25933 25966 D LogcatReader: Read logcat for pid 25933

You should actually see the app trying to reconnect every 30 seconds so I don't think a force stop is necessary here unless some other error is occurring which the on device logs will show.

I am not seeing any such thing in said logs. Remember: the app is connected to Home Assistant — every dashboard and feature is functional, I can turn lights off and on — it's just local push notifications that cease working. The problem might just be server-side.

@dshokouhi
Copy link
Member

Here are the companion logs. There is obviously nothing on the logs that would indicate an issue since it is the server that can't talk to the client (remember the backtrace), not the other way around.

Actually I do see a failure

01-18 00:54:46.110 25933 26003 E WebSocketRepository: Websocket: onFailure
01-18 00:54:46.110 25933 26003 E WebSocketRepository: java.net.SocketException: Software caused connection abort
01-18 00:54:46.110 25933 26003 E WebSocketRepository: 	at java.net.SocketInputStream.socketRead0(Native Method)
01-18 00:54:46.110 25933 26003 E WebSocketRepository: 	at java.net.SocketInputStream.socketRead(SocketInputStream.java:118)
01-18 00:54:46.110 25933 26003 E WebSocketRepository: 	at java.net.SocketInputStream.read(SocketInputStream.java:173)
01-18 00:54:46.110 25933 26003 E WebSocketRepository: 	at java.net.SocketInputStream.read(SocketInputStream.java:143)
01-18 00:54:46.110 25933 26003 E WebSocketRepository: 	at okio.InputStreamSource.read(JvmOkio.kt:94)
01-18 00:54:46.110 25933 26003 E WebSocketRepository: 	at okio.AsyncTimeout$source$1.read(AsyncTimeout.kt:125)
01-18 00:54:46.110 25933 26003 E WebSocketRepository: 	at okio.RealBufferedSource.request(RealBufferedSource.kt:206)
01-18 00:54:46.110 25933 26003 E WebSocketRepository: 	at okio.RealBufferedSource.require(RealBufferedSource.kt:199)
01-18 00:54:46.110 25933 26003 E WebSocketRepository: 	at okio.RealBufferedSource.readByte(RealBufferedSource.kt:209)
01-18 00:54:46.110 25933 26003 E WebSocketRepository: 	at okhttp3.internal.ws.WebSocketReader.readHeader(WebSocketReader.kt:119)
01-18 00:54:46.110 25933 26003 E WebSocketRepository: 	at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.kt:102)
01-18 00:54:46.110 25933 26003 E WebSocketRepository: 	at okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.kt:293)
01-18 00:54:46.110 25933 26003 E WebSocketRepository: 	at okhttp3.internal.ws.RealWebSocket$connect$1.onResponse(RealWebSocket.kt:195)
01-18 00:54:46.110 25933 26003 E WebSocketRepository: 	at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
01-18 00:54:46.110 25933 26003 E WebSocketRepository: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
01-18 00:54:46.110 25933 26003 E WebSocketRepository: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
01-18 00:54:46.110 25933 26003 E WebSocketRepository: 	at java.lang.Thread.run(Thread.java:1012)

Which is then followed by our retry attempt

01-18 00:54:56.166 25933 25966 D WebSocketRepository: Resubscribing to active subscriptions...

Which then proceeds to fail

01-18 00:54:56.181 25933 26029 E WebSocketRepository: Issue re-registering subscription with {type=mobile_app/push_notification_channel, webhook_id=e7d9da9b68f9966eb470d93858a55c6676765aeab7992d444b52cd1cd38f0228, support_confirm=true}

but strangely still pings and gets responses

01-18 00:54:56.536 25933 25965 D WebSocketRepository: Sending message 694: {type=ping, id=694}
01-18 00:54:56.536 25933 25965 D WebSocketRepository: Message number 694 sent
01-18 00:54:56.545 25933 26003 D WebSocketRepository: Websocket: onMessage (text)
01-18 00:54:56.546 25933 26003 D WebSocketRepository: Message number 694 received

From the perspective of the server, there is a KeyError and nothing more.
The problem might just be server-side.

It does appear to be a separate issue because in this particular case you should be seeing an HA core error for "Device not connected to local push". In our case your push token is indeed not provided because the minimal version does not support firebase.

Remember: the app is connected to Home Assistant — every dashboard and feature is functional, I can turn lights off and on

The frontend has a separate websocket connection that is independent of the app and not something we control or use.

Given that I see our retry attempt this might just be a core bug and not 2 separate bugs. From the apps perspective we should retry and reconnect. I am not sure why its failing to reconnect but it does seem to be getting an odd response it seems due to the log.

@dshokouhi
Copy link
Member

P.S. still not the correct version listed, that looks to be a frontend version.

Settings > Companion App > Application Version

Not really needed here based on what I see but in the future the bug may require the correct info :)

@Rudd-O
Copy link
Author

Rudd-O commented Jan 18, 2023

It does appear to be a separate issue because in this particular case you should be seeing an HA core error for "Device not connected to local push". In our case your push token is indeed not provided because the minimal version does not support firebase.

As far as I know that assessment is not correct. Local push does not use Firebase.

Clearly the WebSocket connection is working correctly — it appears that what is not working correctly is core noting that my phone is back online with full WebSocket, and using that for push.

It may just be a bug in the core tho. The traceback is very clear that there is a KeyError in a coroutine.

This would all go away if UnifiedPush was implemented in Home Assistant.

@dshokouhi
Copy link
Member

It does appear to be a separate issue because in this particular case you should be seeing an HA core error for "Device not connected to local push". In our case your push token is indeed not provided because the minimal version does not support firebase.

As far as I know that assessment is not correct. Local push does not use Firebase.

This error message I linked to is only meant to be shown to devices using local push only (basically the minimal builds that you are on). Push token is part of device registration, its null for minimal build and builds that support firebase will contain the actual token.

Clearly the WebSocket connection is working correctly — it appears that what is not working correctly is core noting that my phone is back online with full WebSocket, and using that for push.

It may just be a bug in the core tho. The traceback is very clear that there is a KeyError in a coroutine.

Correct this looks to be a HA core bug and not a bug with the app itself.

@Rudd-O
Copy link
Author

Rudd-O commented Jan 18, 2023

This error message I linked to is only meant to be shown to devices using local push only (basically the minimal builds that you are on). Push token is part of device registration, its null for minimal build and builds that support firebase will contain the actual token.

It could be null or not, but there is code that is not executing because it's not a matter of it being null — the container is throwing a KeyError, so all the code after that... well, it won't run.

@dshokouhi
Copy link
Member

Is this still an issue with the latest HA core update? I think we may need to transfer this issue if it is.

@Rudd-O
Copy link
Author

Rudd-O commented Feb 20, 2023

Yes it is. Please help us transfer this issue.

@jpelgrom
Copy link
Member

Closing due to inactivity. Android issues can't be transferred, so if it is still an issue on the latest core version please create a new issue for core and include the current stacktrace as that appears to be the cause.

@jpelgrom jpelgrom closed this as not planned Won't fix, can't repro, duplicate, stale Jul 27, 2023
@initd0
Copy link

initd0 commented Nov 4, 2023

This issue has to do with the fact that:

  1. The user gets a notification perfectly with notify.notify (if his phone is connected to the internet at the time).
  2. The user does NOT get the missed notification with notify.notify if the user's phone got disconnected at that moment and then reconnected. Meaning HA does not try to resend the missed notification and the user misses it completely and doesnt know it happened.

I am having the exact same issue and obviously this happens on the minimal version since it doesnt use firebase. So is there anything we can do about this to have HA send the notification once the phone reconnects to the internet? Or is this a bug, and is it a bug on Android HA or HA core?

@dshokouhi please advise

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working notifications question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants