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

Android iBeacon transmission stops shortly after started #3159

Open
CS-5 opened this issue Dec 16, 2022 · 53 comments · May be fixed by #4347
Open

Android iBeacon transmission stops shortly after started #3159

CS-5 opened this issue Dec 16, 2022 · 53 comments · May be fixed by #4347
Labels
bug Something isn't working sensor-tracking

Comments

@CS-5
Copy link

CS-5 commented Dec 16, 2022

Home Assistant Android version: 2022.11.0-full

Android version: 10

Phone model: LG V40

Home Assistant version: 2022.16

Last working Home Assistant release (if known): N/A

Description of problem:

As far as I can tell, the companion app stops transmitting iBeacon BLE messages shortly after the transmitter is enabled. I have all appropriate permissions (location, battery exclusion) enabled and the transmitter does work shortly after being re-enabled, but will stop working after a few minutes (seems to occur in ~3 minute chunks). Seems to be similar to #1764 and #1855, but those had been resolved some time ago and I am not seeing the same errors.

Traceback
--------- beginning of system
12-16 16:48:58.696 16280 16280 V [WiFiFeature] LGWiFiFeatureManager: LGWiFiFeatureManager:  pid=16280, uid=10427, phoneCount=1
12-16 16:48:58.701 16280 16280 D [WiFiFeature] LGWiFiFeatureManager: registerFeatureChangedObserver is done
--------- beginning of main
12-16 17:28:57.795 16280 16280 D SensorReceiver: Received intent: android.intent.action.SCREEN_ON
12-16 17:28:57.796 16280 16280 D SensorReceiver: Sensor is_interactive corresponding to received event android.intent.action.SCREEN_ON is disabled, skipping sensors update
12-16 17:28:57.799 16280 16280 D ButtonWidget: Broadcast received: 
12-16 17:28:57.799 16280 16280 D ButtonWidget: Broadcast action: android.intent.action.SCREEN_ON
12-16 17:28:57.799 16280 16280 D ButtonWidget: AppWidgetId: -1
12-16 17:28:57.804 16280 16280 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:28:57.809 16280 16280 D MediaPlayCtrlsWidget: Broadcast received: 
12-16 17:28:57.809 16280 16280 D MediaPlayCtrlsWidget: Broadcast action: android.intent.action.SCREEN_ON
12-16 17:28:57.809 16280 16280 D MediaPlayCtrlsWidget: AppWidgetId: -1
12-16 17:28:57.812 16280 16280 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:28:57.815 16280 16280 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:28:57.855 16280 16313 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:28:57.856 16280 16310 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=3e4b5012-5474-49e7-9c96-9ea11618d5e8, tags={ io.homeassistant.companion.android.websocket.WebsocketManager } ]
12-16 17:29:02.788 16280 16280 W ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@5254e0e
12-16 17:29:02.886 16280 16280 D PhoneWindow: windowLightStatusBar : false, disable View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
12-16 17:29:02.936 16280 16280 I TouchFilterInputStageHelper: [needTouchEventFilter] Displayid : 0
12-16 17:29:02.939 16280 16280 D BezellessGripSuppressionFilter: getdisplaysize, x : 1080 y : 2340
12-16 17:29:02.941 16280 16280 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:29:02.941 16280 16280 D UrlRepository: Using external URL
12-16 17:29:02.942 16280 16280 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:29:02.946 16280 16313 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:29:03.011 16280 16280 W mpanion.androi: Accessing hidden method Landroid/content/res/Resources$Theme;->getKey()Landroid/content/res/Resources$ThemeKey; (greylist-max-o, reflection, denied)
12-16 17:29:03.033 16280 21727 I AdrenoGLES: QUALCOMM build                   : d424b94, If195280fd4
12-16 17:29:03.033 16280 21727 I AdrenoGLES: Build Date                       : 12/24/19
12-16 17:29:03.033 16280 21727 I AdrenoGLES: OpenGL ES Shader Compiler Version: EV031.27.05.03
12-16 17:29:03.033 16280 21727 I AdrenoGLES: Local Branch                     : 
12-16 17:29:03.033 16280 21727 I AdrenoGLES: Remote Branch                    : quic/gfx-adreno.lnx.1.0.r72-rel
12-16 17:29:03.033 16280 21727 I AdrenoGLES: Remote Branch                    : NONE
12-16 17:29:03.033 16280 21727 I AdrenoGLES: Reconstruct Branch               : NOTHING
12-16 17:29:03.033 16280 21727 I AdrenoGLES: Build Config                     : S P 8.0.12 AArch64
12-16 17:29:03.036 16280 21727 I AdrenoGLES: PFP: 0x016ee187, ME: 0x00000000
12-16 17:29:03.052 16280 21727 W Gralloc3: mapper 3.x is not supported
12-16 17:29:03.060 16280 16280 D IntegrationRepository: setSessionExpireMillis(): 0
12-16 17:29:03.077 16280 16280 W ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@461c477
12-16 17:29:03.209 16280 21766 E chromium: [ERROR:simple_file_enumerator.cc(43)] readdir /data/user/0/io.homeassistant.companion.android/cache/WebView/Default/HTTP Cache/Code Cache/wasm: No such file or directory (2)
12-16 17:29:03.209 16280 21755 E chromium: [ERROR:simple_file_enumerator.cc(21)] opendir /data/user/0/io.homeassistant.companion.android/cache/WebView/Default/HTTP Cache/Code Cache/js: No such file or directory (2)
12-16 17:29:03.209 16280 21755 E chromium: [ERROR:simple_index_file.cc(614)] Could not reconstruct index from disk
12-16 17:29:03.209 16280 21766 E chromium: [ERROR:simple_index_file.cc(614)] Could not reconstruct index from disk
12-16 17:29:03.285 16280 16280 D PhoneWindow: windowLightStatusBar : false, disable View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
12-16 17:29:03.300 16280 16280 D RenderScript HIDL Adaptation: IRenderScriptDevice::getService()
12-16 17:29:03.321 16280 16280 D RenderScript HIDL Adaptation: IRenderScriptDevice::getService() returned 0x7231b688a0
12-16 17:29:03.321 16280 16280 D RenderScript HIDL Adaptation: HIDL successfully loaded.
12-16 17:29:03.400 16280 21811 V RenderScript: Successfully loaded runtime: libRSDriver_adreno.so
12-16 17:29:03.401 16280 16280 D         : Successfully queried cache dir: /data/user_de/0/io.homeassistant.companion.android/code_cache
12-16 17:29:03.401 16280 16280 D RenderScript: Setting cache dir: /data/user_de/0/io.homeassistant.companion.android/code_cache
12-16 17:29:03.405 16280 16280 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 0, currentMillis: 1671229743405)
12-16 17:29:03.414 16280 16280 W cr_SupportWebSettings: setForceDarkBehavior() is a no-op in an app with targetSdkVersion>=T
12-16 17:29:03.414 16280 16280 W cr_SupportWebSettings: setForceDark() is a no-op in an app with targetSdkVersion>=T
12-16 17:29:03.415 16280 16280 D WebviewActivity: Current webview package com.google.android.webview and version 108.0.5359.128
12-16 17:29:03.417 16280 16280 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 0, currentMillis: 1671229743417)
12-16 17:29:03.524 16280 16280 I TouchFilterInputStageHelper: [needTouchEventFilter] Displayid : 0
12-16 17:29:03.524 16280 16280 D BezellessGripSuppressionFilter: getdisplaysize, x : 1080 y : 2340
12-16 17:29:03.606 16280 16280 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 0, currentMillis: 1671229743605)
12-16 17:29:03.616 16280 16280 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:29:03.616 16280 16280 D UrlRepository: Using external URL
12-16 17:29:03.617 16280 16357 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:29:03.618 16280 16310 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=c103680b-695a-4443-a3a7-07dfb041e213, tags={ io.homeassistant.companion.android.websocket.WebsocketManager } ]
12-16 17:29:03.619 16280 16356 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:29:03.628 16280 16310 I WM-Processor: Moving WorkSpec (2cef44d7-2b5e-4024-a866-c51e92d2d34e) to the foreground
12-16 17:29:03.632 16280 16356 D SensorWorker: Updating all Sensors in foreground.
12-16 17:29:03.634 16280 16356 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:29:03.634 16280 16356 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:29:03.643 16280 16280 I WM-SystemFgDispatcher: Started foreground service Intent { act=ACTION_START_FOREGROUND cmp=io.homeassistant.companion.android/androidx.work.impl.foreground.SystemForegroundService (has extras) }
12-16 17:29:03.645 16280 16280 I Timeline: Timeline: Activity_idle id: android.os.BinderProxy@461c477 time:177923528
12-16 17:29:03.846 16280 21878 D WebviewActivity: External bus {"type":"config/get","id":1}
12-16 17:29:03.848 16280 16280 D WebviewActivity: externalBus({"id":1,"type":"result","success":true,"result":{"hasSettingsScreen":true,"canWriteTag":true,"hasExoPlayer":true}});
12-16 17:29:03.866 16280 16280 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:29:03.866 16280 16280 D UrlRepository: Using external URL
12-16 17:29:03.875 16280 16280 D WebviewActivity: Callback null
12-16 17:29:03.876 16280 16280 E WebviewActivity: Cannot set status bar color 0. Skipping coloring...
12-16 17:29:03.876 16280 16280 E WebviewActivity: Cannot set navigation bar color 0. Skipping coloring...
12-16 17:29:03.973 16280 16356 D SensorReceiver: Nothing to update
12-16 17:29:03.974 16280 16324 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=2cef44d7-2b5e-4024-a866-c51e92d2d34e, tags={ io.homeassistant.companion.android.sensors.SensorWorker } ]
12-16 17:29:03.975 16280 16280 I WM-SystemFgDispatcher: Stopping foreground service
12-16 17:29:04.722 16280 21878 D WebviewActivity: External bus {"type":"connection-status","payload":{"event":"connected"},"id":2}
12-16 17:29:04.724 16280 16280 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:29:05.178 16280 21878 D WebviewActivity: External bus {"type":"theme-update","id":3}
12-16 17:29:05.207 16280 16280 D WebviewActivity: Color from webview is "#101e24-SPACER-#111111"
12-16 17:29:05.208 16280 16280 D WebviewActivity: Color from webview is "#101e24-SPACER-#111111"
12-16 17:29:05.208 16280 16356 D WebViewPresenterImpl: Try getting color from webview color "#101e24".
12-16 17:29:05.208 16280 16356 I WebViewPresenterImpl: Found color -15720924.
12-16 17:29:05.208 16280 16356 D WebViewPresenterImpl: Try getting color from webview color "#111111".
12-16 17:29:05.208 16280 16356 I WebViewPresenterImpl: Found color -15658735.
12-16 17:29:05.909 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:29:06.007 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
12-16 17:29:07.048 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:29:07.097 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
12-16 17:29:07.800 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:29:07.890 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
12-16 17:29:08.487 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:29:08.548 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
12-16 17:29:09.577 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:29:09.646 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
12-16 17:29:10.487 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:29:10.551 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
12-16 17:29:10.569 16280 21878 D WebviewActivity: External bus {"type":"config_screen/show","id":4}
12-16 17:29:10.592 16280 16280 D IntegrationRepository: setSessionExpireMillis(): 1671229751591
12-16 17:29:10.592 16280 16280 D IntegrationRepository: setAppActive(): false
12-16 17:29:10.594 16280 16280 D IntegrationRepository: setSessionExpireMillis(): 1671229751594
12-16 17:29:10.594 16280 16280 D IntegrationRepository: setAppActive(): false
12-16 17:29:10.602 16280 16280 W ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@528ad51
12-16 17:29:10.623 16280 16280 D PhoneWindow: windowLightStatusBar : false, disable View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
12-16 17:29:10.651 16280 16280 D UrlRepository: Using internal URL
12-16 17:29:10.651 16280 16280 D UrlRepository: Using internal URL
12-16 17:29:10.762 16280 16280 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1671229751594, currentMillis: 1671229750762)
12-16 17:29:10.769 16280 16280 I TouchFilterInputStageHelper: [needTouchEventFilter] Displayid : 0
12-16 17:29:10.769 16280 16280 D BezellessGripSuppressionFilter: getdisplaysize, x : 1080 y : 2340
12-16 17:29:10.771 16280 16280 D SensorReceiver: Received intent: io.homeassistant.companion.android.UPDATE_SENSORS
12-16 17:29:10.773 16280 16356 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:29:10.774 16280 16356 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:29:10.855 16280 16280 D UrlRepository: Using external URL
12-16 17:29:10.907 16280 16280 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1671229751594, currentMillis: 1671229750907)
12-16 17:29:10.910 16280 16280 D UrlRepository: Using external URL
12-16 17:29:10.928 16280 16280 D SettingsWearDetection: API unavailable for discovering nodes (no Wear)
12-16 17:29:10.929 16280 16280 I Timeline: Timeline: Activity_idle id: android.os.BinderProxy@528ad51 time:177930811
12-16 17:29:10.991 16280 16314 D SensorReceiver: Nothing to update
12-16 17:29:12.018 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:29:12.106 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
12-16 17:29:42.728 16280 16280 D IntegrationRepository: setSessionExpireMillis(): 1671229783728
12-16 17:29:42.728 16280 16280 D IntegrationRepository: setAppActive(): false
12-16 17:29:43.283 16280 16280 D SensorReceiver: Received intent: android.intent.action.SCREEN_OFF
12-16 17:29:43.284 16280 16280 D SensorReceiver: Sensor is_interactive corresponding to received event android.intent.action.SCREEN_OFF is disabled, skipping sensors update
12-16 17:29:43.291 16280 16280 D ButtonWidget: Broadcast received: 
12-16 17:29:43.291 16280 16280 D ButtonWidget: Broadcast action: android.intent.action.SCREEN_OFF
12-16 17:29:43.291 16280 16280 D ButtonWidget: AppWidgetId: -1
12-16 17:29:43.294 16280 16280 D MediaPlayCtrlsWidget: Broadcast received: 
12-16 17:29:43.294 16280 16280 D MediaPlayCtrlsWidget: Broadcast action: android.intent.action.SCREEN_OFF
12-16 17:29:43.294 16280 16280 D MediaPlayCtrlsWidget: AppWidgetId: -1
12-16 17:29:43.376 16280 16314 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:29:43.377 16280 16310 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=9bb98b29-b714-47c8-b12f-8ce0e1637a69, tags={ io.homeassistant.companion.android.websocket.WebsocketManager } ]
12-16 17:29:44.012 16280 16280 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1671229783728, currentMillis: 1671229784012)
12-16 17:29:44.238 16280 16280 D UrlRepository: Using external URL
12-16 17:29:44.272 16280 16280 I Timeline: Timeline: Activity_idle id: android.os.BinderProxy@528ad51 time:177964155
12-16 17:29:44.855 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:29:44.913 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_CANCEL
12-16 17:29:44.992 16280 16280 D SensorReceiver: Received intent: android.intent.action.SCREEN_ON
12-16 17:29:44.995 16280 16280 D SensorReceiver: Sensor is_interactive corresponding to received event android.intent.action.SCREEN_ON is disabled, skipping sensors update
12-16 17:29:44.997 16280 16280 D ButtonWidget: Broadcast received: 
12-16 17:29:44.997 16280 16280 D ButtonWidget: Broadcast action: android.intent.action.SCREEN_ON
12-16 17:29:44.997 16280 16280 D ButtonWidget: AppWidgetId: -1
12-16 17:29:45.003 16280 16280 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:29:45.004 16280 16280 D MediaPlayCtrlsWidget: Broadcast received: 
12-16 17:29:45.004 16280 16280 D MediaPlayCtrlsWidget: Broadcast action: android.intent.action.SCREEN_ON
12-16 17:29:45.004 16280 16280 D MediaPlayCtrlsWidget: AppWidgetId: -1
12-16 17:29:45.005 16280 16280 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:29:45.007 16280 16280 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:29:45.035 16280 16357 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:29:45.035 16280 16310 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=992e73ef-d6df-41e7-8cad-188f801d06de, tags={ io.homeassistant.companion.android.websocket.WebsocketManager } ]
12-16 17:29:45.682 16280 16280 D IntegrationRepository: setSessionExpireMillis(): 1671229786682
12-16 17:29:45.682 16280 16280 D IntegrationRepository: setAppActive(): false
12-16 17:29:45.683 16280 16280 D IntegrationRepository: setSessionExpireMillis(): 1671229786683
12-16 17:29:45.683 16280 16280 D IntegrationRepository: setAppActive(): false
12-16 17:30:36.435 16280 16280 D SensorReceiver: Received intent: android.intent.action.SCREEN_OFF
12-16 17:30:36.436 16280 16280 D SensorReceiver: Sensor is_interactive corresponding to received event android.intent.action.SCREEN_OFF is disabled, skipping sensors update
12-16 17:30:36.439 16280 16280 D ButtonWidget: Broadcast received: 
12-16 17:30:36.439 16280 16280 D ButtonWidget: Broadcast action: android.intent.action.SCREEN_OFF
12-16 17:30:36.439 16280 16280 D ButtonWidget: AppWidgetId: -1
12-16 17:30:36.441 16280 16280 D MediaPlayCtrlsWidget: Broadcast received: 
12-16 17:30:36.441 16280 16280 D MediaPlayCtrlsWidget: Broadcast action: android.intent.action.SCREEN_OFF
12-16 17:30:36.441 16280 16280 D MediaPlayCtrlsWidget: AppWidgetId: -1
12-16 17:30:36.482 16280 16356 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:30:36.483 16280 16312 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=ca11113e-ecdd-4187-99bf-c0e7c96da1c3, tags={ io.homeassistant.companion.android.websocket.WebsocketManager } ]
12-16 17:41:10.505 16280 16280 D SensorReceiver: Received intent: android.intent.action.SCREEN_ON
12-16 17:41:10.506 16280 16280 D SensorReceiver: Sensor is_interactive corresponding to received event android.intent.action.SCREEN_ON is disabled, skipping sensors update
12-16 17:41:10.507 16280 16280 D ButtonWidget: Broadcast received: 
12-16 17:41:10.507 16280 16280 D ButtonWidget: Broadcast action: android.intent.action.SCREEN_ON
12-16 17:41:10.507 16280 16280 D ButtonWidget: AppWidgetId: -1
12-16 17:41:10.515 16280 16280 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:41:10.517 16280 16280 D MediaPlayCtrlsWidget: Broadcast received: 
12-16 17:41:10.517 16280 16280 D MediaPlayCtrlsWidget: Broadcast action: android.intent.action.SCREEN_ON
12-16 17:41:10.517 16280 16280 D MediaPlayCtrlsWidget: AppWidgetId: -1
12-16 17:41:10.519 16280 16280 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:41:10.523 16280 16280 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:41:10.553 16280 16357 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:41:10.554 16280 16324 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=82142311-8367-4fe5-89fd-13d9d2fd3730, tags={ io.homeassistant.companion.android.websocket.WebsocketManager } ]
12-16 17:41:18.415 16280 16280 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1671229786683, currentMillis: 1671230478415)
12-16 17:41:18.417 16280 16280 D UrlRepository: Using external URL
12-16 17:41:18.438 16280 16280 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1671229786683, currentMillis: 1671230478438)
12-16 17:41:18.447 16280 16280 I Timeline: Timeline: Activity_idle id: android.os.BinderProxy@528ad51 time:178514544
12-16 17:41:19.416 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:41:19.495 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
12-16 17:41:19.982 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:41:20.035 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_CANCEL
12-16 17:41:20.985 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:41:21.066 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
12-16 17:41:22.068 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:41:22.131 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
12-16 17:41:22.132 16280 16280 E mpanion.androi: Invalid ID 0x00000000.
12-16 17:41:22.280 16280 16280 W mpanion.androi: Accessing hidden method Landroid/graphics/Canvas;->drawPatch(Landroid/graphics/NinePatch;Landroid/graphics/Rect;Landroid/graphics/Paint;)V (greylist-max-o, linking, denied)
12-16 17:41:22.281 16280 16280 W mpanion.androi: Accessing hidden method Landroid/graphics/Canvas;->drawPatch(Landroid/graphics/NinePatch;Landroid/graphics/RectF;Landroid/graphics/Paint;)V (greylist-max-o, linking, denied)
12-16 17:41:22.695 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:41:22.784 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
12-16 17:41:23.154 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:41:24.024 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
12-16 17:41:24.262 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:41:24.481 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
12-16 17:41:24.635 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:41:24.690 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
12-16 17:41:24.771 16280 16280 W mpanion.androi: Class androidx.compose.runtime.snapshots.SnapshotStateList failed lock verification and will run slower.
12-16 17:41:24.771 16280 16280 W mpanion.androi: Common causes for lock verification issues are non-optimized dex code
12-16 17:41:24.771 16280 16280 W mpanion.androi: and incorrect proguard optimizations.
12-16 17:41:24.828 16280 16280 D SensorReceiver: Received intent: io.homeassistant.companion.android.UPDATE_SENSORS
12-16 17:41:24.831 16280 16314 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:41:24.833 16280 16314 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:41:25.233 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:41:25.313 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
12-16 17:41:25.340 16280 16314 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:41:28.573 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:41:28.641 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
12-16 17:41:28.673 16280 16280 D PhoneWindow: windowLightStatusBar : false, disable View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
12-16 17:41:28.712 16280 16280 I TouchFilterInputStageHelper: [needTouchEventFilter] Displayid : 0
12-16 17:41:28.714 16280 16280 D BezellessGripSuppressionFilter: getdisplaysize, x : 1080 y : 2340
12-16 17:41:29.745 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:41:29.804 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
12-16 17:41:29.861 16280 16280 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1671229786683, currentMillis: 1671230489861)
12-16 17:41:30.386 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:41:30.413 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
12-16 17:41:30.429 16280 16280 D PhoneWindow: windowLightStatusBar : false, disable View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
12-16 17:41:30.459 16280 16280 I TouchFilterInputStageHelper: [needTouchEventFilter] Displayid : 0
12-16 17:41:30.460 16280 16280 D BezellessGripSuppressionFilter: getdisplaysize, x : 1080 y : 2340
12-16 17:41:31.435 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:41:31.496 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
12-16 17:41:31.528 16280 16280 D BluetoothAdapter: isLeEnabled(): ON
12-16 17:41:31.528 16280 16280 D BluetoothAdapter: isLeEnabled(): ON
12-16 17:41:31.602 16280 16280 D SensorReceiver: Received intent: io.homeassistant.companion.android.UPDATE_SENSORS
12-16 17:41:31.608 16280 16314 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:41:31.610 16280 16314 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:41:31.628 16280 16280 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1671229786683, currentMillis: 1671230491628)
12-16 17:41:31.633 16280 16280 I BeaconTransmitter: Advertisement start succeeded.
12-16 17:41:31.963 16280 16314 D SensorReceiver: Nothing to update
12-16 17:41:33.547 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:41:34.731 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
12-16 17:41:34.978 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:41:35.057 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
12-16 17:41:37.070 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:41:37.140 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
12-16 17:41:51.823 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:41:51.880 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
12-16 17:41:51.896 16280 16280 D PhoneWindow: windowLightStatusBar : false, disable View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
12-16 17:41:51.919 16280 16280 I TouchFilterInputStageHelper: [needTouchEventFilter] Displayid : 0
12-16 17:41:51.920 16280 16280 D BezellessGripSuppressionFilter: getdisplaysize, x : 1080 y : 2340
12-16 17:41:52.601 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:41:52.666 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
12-16 17:41:52.693 16280 16280 D BluetoothAdapter: isLeEnabled(): ON
12-16 17:41:52.693 16280 16280 D BluetoothAdapter: isLeEnabled(): ON
12-16 17:41:52.762 16280 16280 D SensorReceiver: Received intent: io.homeassistant.companion.android.UPDATE_SENSORS
12-16 17:41:52.766 16280 16314 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:41:52.767 16280 16314 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:41:52.781 16280 16280 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1671229786683, currentMillis: 1671230512781)
12-16 17:41:52.784 16280 16280 I BeaconTransmitter: Advertisement start succeeded.
12-16 17:41:53.193 16280 16314 D SensorReceiver: Nothing to update
12-16 17:41:53.838 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:41:53.886 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
12-16 17:42:01.759 16280 16280 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1671229786683, currentMillis: 1671230521758)
12-16 17:42:02.334 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:42:02.383 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
12-16 17:42:02.422 16280 16280 D SensorReceiver: Received intent: io.homeassistant.companion.android.UPDATE_SENSORS
12-16 17:42:02.425 16280 16314 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:42:02.426 16280 16314 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:42:02.631 16280 16314 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:42:02.632 16280 16314 I chatty  : uid=10427(io.homeassistant.companion.android) DefaultDispatch identical 4 lines
12-16 17:42:02.633 16280 16314 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:42:02.915 16280 16314 D SensorReceiver: Nothing to update
12-16 17:42:03.569 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:42:03.625 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
12-16 17:42:03.657 16280 16280 D BluetoothAdapter: isLeEnabled(): ON
12-16 17:42:03.658 16280 16280 D BluetoothAdapter: isLeEnabled(): ON
12-16 17:42:03.698 16280 16280 D SensorReceiver: Received intent: io.homeassistant.companion.android.UPDATE_SENSORS
12-16 17:42:03.702 16280 16314 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:42:03.704 16280 16314 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:42:03.704 16280 16280 I BeaconTransmitter: Advertisement start succeeded.
12-16 17:42:03.925 16280 16314 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:42:03.930 16280 16314 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:42:04.158 16280 16314 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:42:05.748 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:42:05.842 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
12-16 17:42:34.533 16280 23235 W mpanion.androi: Accessing hidden method Landroid/os/WorkSource;->isEmpty()Z (greylist-max-o, reflection, denied)
12-16 17:42:34.555 16280 23240 W FirebaseMessaging: Unable to log event: analytics library is missing
12-16 17:42:34.557 16280 23240 D FCMService: From: 331041709873
12-16 17:42:34.561 16280 23240 D MessagingService: Processing device command
12-16 17:42:34.567 16280 23240 D BluetoothAdapter: isLeEnabled(): ON
12-16 17:42:34.568 16280 23240 D BluetoothAdapter: isLeEnabled(): ON
12-16 17:42:34.636 16280 16280 I BeaconTransmitter: Advertisement start succeeded.
12-16 17:42:36.457 16280 16280 D IntegrationRepository: setSessionExpireMillis(): 1671230557457
12-16 17:42:36.457 16280 16280 D IntegrationRepository: setAppActive(): false
12-16 17:42:37.055 16280 16280 D SensorReceiver: Received intent: android.intent.action.SCREEN_OFF
12-16 17:42:37.057 16280 16280 D SensorReceiver: Sensor is_interactive corresponding to received event android.intent.action.SCREEN_OFF is disabled, skipping sensors update
12-16 17:42:37.060 16280 16280 D ButtonWidget: Broadcast received: 
12-16 17:42:37.060 16280 16280 D ButtonWidget: Broadcast action: android.intent.action.SCREEN_OFF
12-16 17:42:37.060 16280 16280 D ButtonWidget: AppWidgetId: -1
12-16 17:42:37.062 16280 16280 D MediaPlayCtrlsWidget: Broadcast received: 
12-16 17:42:37.062 16280 16280 D MediaPlayCtrlsWidget: Broadcast action: android.intent.action.SCREEN_OFF
12-16 17:42:37.062 16280 16280 D MediaPlayCtrlsWidget: AppWidgetId: -1
12-16 17:42:37.141 16280 16357 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:42:37.143 16280 16312 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=c4caaa4d-d3f8-485c-b389-8a9dd2368ac7, tags={ io.homeassistant.companion.android.websocket.WebsocketManager } ]
12-16 17:43:46.173 16280 16280 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1671230557457, currentMillis: 1671230626173)
12-16 17:43:46.205 16280 16280 I Timeline: Timeline: Activity_idle id: android.os.BinderProxy@528ad51 time:178602284
12-16 17:43:46.318 16280 16280 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1671230557457, currentMillis: 1671230626318)
12-16 17:43:47.112 16280 16280 D SensorReceiver: Received intent: android.intent.action.SCREEN_ON
12-16 17:43:47.113 16280 16280 D SensorReceiver: Sensor is_interactive corresponding to received event android.intent.action.SCREEN_ON is disabled, skipping sensors update
12-16 17:43:47.115 16280 16280 D ButtonWidget: Broadcast received: 
12-16 17:43:47.115 16280 16280 D ButtonWidget: Broadcast action: android.intent.action.SCREEN_ON
12-16 17:43:47.115 16280 16280 D ButtonWidget: AppWidgetId: -1
12-16 17:43:47.122 16280 16280 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:43:47.124 16280 16280 D MediaPlayCtrlsWidget: Broadcast received: 
12-16 17:43:47.124 16280 16280 D MediaPlayCtrlsWidget: Broadcast action: android.intent.action.SCREEN_ON
12-16 17:43:47.124 16280 16280 D MediaPlayCtrlsWidget: AppWidgetId: -1
12-16 17:43:47.125 16280 16280 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:43:47.136 16280 16280 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:43:47.200 16280 16356 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:43:47.202 16280 16312 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=a8ee4479-c861-4999-b561-60d51f61e7cd, tags={ io.homeassistant.companion.android.websocket.WebsocketManager } ]
12-16 17:43:47.887 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:43:47.979 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
12-16 17:43:48.226 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:43:48.669 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
12-16 17:44:04.020 16280 16314 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:44:04.026 16280 16312 I WM-Processor: Moving WorkSpec (2cef44d7-2b5e-4024-a866-c51e92d2d34e) to the foreground
12-16 17:44:04.038 16280 16280 I WM-SystemFgDispatcher: Started foreground service Intent { act=ACTION_START_FOREGROUND cmp=io.homeassistant.companion.android/androidx.work.impl.foreground.SystemForegroundService (has extras) }
12-16 17:44:04.040 16280 16314 D SensorWorker: Updating all Sensors in foreground.
12-16 17:44:04.044 16280 16314 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:44:04.051 16280 16314 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:44:04.356 16280 16314 D SensorReceiver: Nothing to update
12-16 17:44:04.358 16280 16323 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=2cef44d7-2b5e-4024-a866-c51e92d2d34e, tags={ io.homeassistant.companion.android.sensors.SensorWorker } ]
12-16 17:44:04.359 16280 16280 I WM-SystemFgDispatcher: Stopping foreground service
12-16 17:44:19.352 16280 16280 D IntegrationRepository: setSessionExpireMillis(): 1671230660352
12-16 17:44:19.353 16280 16280 D IntegrationRepository: setAppActive(): false
12-16 17:44:19.955 16280 16280 D SensorReceiver: Received intent: android.intent.action.SCREEN_OFF
12-16 17:44:19.956 16280 16280 D SensorReceiver: Sensor is_interactive corresponding to received event android.intent.action.SCREEN_OFF is disabled, skipping sensors update
12-16 17:44:19.965 16280 16280 D ButtonWidget: Broadcast received: 
12-16 17:44:19.965 16280 16280 D ButtonWidget: Broadcast action: android.intent.action.SCREEN_OFF
12-16 17:44:19.965 16280 16280 D ButtonWidget: AppWidgetId: -1
12-16 17:44:19.967 16280 16280 D MediaPlayCtrlsWidget: Broadcast received: 
12-16 17:44:19.967 16280 16280 D MediaPlayCtrlsWidget: Broadcast action: android.intent.action.SCREEN_OFF
12-16 17:44:19.967 16280 16280 D MediaPlayCtrlsWidget: AppWidgetId: -1
12-16 17:44:20.041 16280 16356 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:44:20.044 16280 16310 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=4c29cbd2-3083-4adb-9ab3-35e7e1a7e227, tags={ io.homeassistant.companion.android.websocket.WebsocketManager } ]
12-16 17:44:56.994 16280 16280 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1671230660352, currentMillis: 1671230696994)
12-16 17:44:57.024 16280 16280 I Timeline: Timeline: Activity_idle id: android.os.BinderProxy@528ad51 time:178644927
12-16 17:44:57.162 16280 16280 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1671230660352, currentMillis: 1671230697162)
12-16 17:44:57.437 16280 16280 D SensorReceiver: Received intent: android.intent.action.SCREEN_ON
12-16 17:44:57.437 16280 16280 D SensorReceiver: Sensor is_interactive corresponding to received event android.intent.action.SCREEN_ON is disabled, skipping sensors update
12-16 17:44:57.441 16280 16280 D ButtonWidget: Broadcast received: 
12-16 17:44:57.441 16280 16280 D ButtonWidget: Broadcast action: android.intent.action.SCREEN_ON
12-16 17:44:57.441 16280 16280 D ButtonWidget: AppWidgetId: -1
12-16 17:44:57.445 16280 16280 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:44:57.446 16280 16280 D MediaPlayCtrlsWidget: Broadcast received: 
12-16 17:44:57.446 16280 16280 D MediaPlayCtrlsWidget: Broadcast action: android.intent.action.SCREEN_ON
12-16 17:44:57.446 16280 16280 D MediaPlayCtrlsWidget: AppWidgetId: -1
12-16 17:44:57.448 16280 16280 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:44:57.450 16280 16280 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:44:57.490 16280 16357 D UrlRepository: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
12-16 17:44:57.491 16280 16324 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=65d08cae-fc49-4f09-83f8-d16cd550a258, tags={ io.homeassistant.companion.android.websocket.WebsocketManager } ]
12-16 17:45:00.173 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:45:00.208 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_CANCEL
12-16 17:45:00.259 16280 16280 I ViewRootImpl: ViewRoot's KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_BACK, scanCode=0, metaState=0, flags=0x8, repeatCount=0, eventTime=178648157, downTime=178648157, deviceId=-1, source=0x101, displayId=0 } to DecorView@ccbe67c[SettingsActivity]
12-16 17:45:00.264 16280 16280 I ViewRootImpl: ViewRoot's KeyEvent { action=ACTION_UP, keyCode=KEYCODE_BACK, scanCode=0, metaState=0, flags=0x8, repeatCount=0, eventTime=178648161, downTime=178648161, deviceId=-1, source=0x101, displayId=0 } to DecorView@ccbe67c[SettingsActivity]
12-16 17:45:01.077 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:45:01.103 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_CANCEL
12-16 17:45:01.162 16280 16280 I ViewRootImpl: ViewRoot's KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_BACK, scanCode=0, metaState=0, flags=0x8, repeatCount=0, eventTime=178649062, downTime=178649062, deviceId=-1, source=0x101, displayId=0 } to DecorView@ccbe67c[SettingsActivity]
12-16 17:45:01.164 16280 16280 I ViewRootImpl: ViewRoot's KeyEvent { action=ACTION_UP, keyCode=KEYCODE_BACK, scanCode=0, metaState=0, flags=0x8, repeatCount=0, eventTime=178649064, downTime=178649064, deviceId=-1, source=0x101, displayId=0 } to DecorView@ccbe67c[SettingsActivity]
12-16 17:45:01.182 16280 16280 D UrlRepository: Using external URL
12-16 17:45:01.737 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:45:01.818 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
12-16 17:45:03.632 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:45:03.889 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
12-16 17:45:04.178 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-16 17:45:04.218 16280 16280 I ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
12-16 17:45:04.219 16280 16280 E mpanion.androi: Invalid ID 0x00000000.
12-16 17:45:04.361 16280 16314 D LogcatReader: Read logcat for pid 16280

Screenshot of problem:
Screenshot 2022-12-16 173918

Note that, with one exception*, each of the increments where my phone is transmitting for ~3 minutes. *The single longer segment is double that of the smaller time-frames.

Additional information:

I am using ESPresense sensors around my home for presence detection. In devices where bluetooth beaconing is built-in (Apple devices, primarily) these sensors have worked very well, so I am confident the sensors are not the problem.

I am also using an automation to turn on/off my transmitter when my phone disconnects from my home Wi-Fi, but this automation is working properly and actually helped me narrow down this issue in the first place. As the screenshots show, there are brief periods where my phone is transmitting and does get detected by my sensors, but the transmission quickly stops despite the transmitter still being enabled and within range.

I have tried many combinations of Advertise mode and Transmitter power, as well as various distances from the sensors.

@CS-5 CS-5 added the bug Something isn't working label Dec 16, 2022
@dshokouhi
Copy link
Member

These logs do not indicate that the transmitter stopped or crashed. Are you certain its stopping? Can you run a quick test using the beacon monitor sensor to see if you see the same issue there please?

Most of these issues usually come down to some configuration issue either in the sensor settings or on the other end like ESPresence.

I am unable to reproduce as I have several devices that transmit and get picked up properly via the beacon monitor sensor.

@CS-5
Copy link
Author

CS-5 commented Dec 17, 2022

Here is another screenshot with the transmitter's state alongside the results from ESPresense. It does not appear the transmitter has stopped, but is it possible that some sort of Android battery management (or similar) disabled BLE even though the transmitter is still enabled? I do not know enough about the inner workings of Android to troubleshoot further in that direction.

Screenshot 2022-12-17 072940

As far as ESPresense, my configuration is pretty much default. Unfortunately I do not have another Android device to test with, but the beaconing from my phone is working. As soon as I toggle the transmitter state off/on it will send a few packets (I'm watching them come in directly on MQTT) and then stop. Will only start again after toggling the transmitter again.

@dshokouhi
Copy link
Member

Here is another screenshot with the transmitter's state alongside the results from ESPresense. It does not appear the transmitter has stopped, but is it possible that some sort of Android battery management (or similar) disabled BLE even though the transmitter is still enabled? I do not know enough about the inner workings of Android to troubleshoot further in that direction.

There would be an error if the transmitter stopped, or BLE got disabled.

As far as ESPresense, my configuration is pretty much default.

More than likely default configuration may not work. I suggest looking on the forums for what others have done. We won't be able to really troubleshoot how other integrations pick up the transmitter as there is too much to look at. The beacon monitor sensor uses the same library and is a great indicator if the transmission actually stopped. What I can tell you is that there are users out there who have this working and I think some do use ESPresence.

@dshokouhi dshokouhi added the question Further information is requested label Dec 22, 2022
@TwoWheelDev
Copy link

I too am experiencing what would appear to be the same issue with a different phone.

It transmits for a few minutes then stops (almost as if its being battery managed, but it has unrestricted battery use) and the rest of HA background continues to work correctly.

If I wake the device and open the HA app, it will start working again for a while. I don't seem to be able to get any logs relating to the BLE, as reopening the app seems to clear the log.

I have a couple of other iBeacons and these are both correctly reporting status from ESPresence and into MQTT

If you have any suggestions on how I can provide logs etc, gratefully receive them

@CS-5
Copy link
Author

CS-5 commented Dec 28, 2022

@TwoWheelDev Your description matches my exact issue, including the note about opening the HA app and the transmission starting up again.

@dshokouhi I have done some additional troubleshooting on the ESPresense end, with my phone, and the app. So far, I've not found any solutions that work, but several that end up exhibiting the same issue. Are there any additional indicators on the HA App/Android side that I can use to help pinpoint the root cause?

@dshokouhi
Copy link
Member

It transmits for a few minutes then stops (almost as if its being battery managed, but it has unrestricted battery use) and the rest of HA background continues to work correctly.

If I wake the device and open the HA app, it will start working again for a while. I don't seem to be able to get any logs relating to the BLE, as reopening the app seems to clear the log.

your symptoms sound like the app is being killed in the background, depending on the device there may be more battery optimization settings you need to adjust.

Are there any additional indicators on the HA App/Android side that I can use to help pinpoint the root cause?

the best test to see if the transmitter is still transmitting is to have 2 android devices with one using the beacon monitor and the other using the transmitter, if you see the monitor showing the transmitter then you know its still transmitting and the issue lies in setup of the other monitor.

This test is important because both the transmitter and monitor use the same library and this will tell us if its actually working.

@dshokouhi dshokouhi removed the question Further information is requested label Dec 28, 2022
@TwoWheelDev
Copy link

So I've played around with some of the settings a bit more and so far it seems to be stable. What seems to have made a difference is changing the Transmitter Power from the default of ultra-low to low.

The device has now been correctly detected in HA for over 3 hours

@Scags104
Copy link

Im having this same issue. Ive been experimenting with the settings, transmitter power on high definately seems to work the best but its only picking up if im sitting near a beacon for extended periods of time. Once connected it will hold but im still getting too much "not home" status mixed throughout the day compared to other devices like my phone running the HA app.

for the last few days ive been making sure my phone and watch are always in the same room and in the same vicinity. there is quite a large difference in how they are reporting. both are on High transmitter power and low latency

watch:
watch

phone:
phone

any help would be appreciated so i can rely more on the watch app. happy to provide logs or test as needed
Thanks

@tbclark3
Copy link

tbclark3 commented Apr 2, 2023

I have the same issue. If I make a change in the configuration, eg change the transmit power, my Pixel 6 pro running Android 13 will typically send 2 or 3 BLE messages, then stop. There are no errors, and the status still says "transmitting." I am verifying by using MQTT Explorer. The Home Assistant app is exempt from battery control and has all of the permissions it requested, including fine location all of the time. I can't find any settings that work consistently. Killing the app and restarting it doesn't restart the transmission. Rebooting the phone doesn't restart it either. The only thing that works is changing something in the configuration.

@Mikescotland
Copy link

Same here. And it is definitely related to HA application for Android.
HA app is not battery restricted, GPS works flawlessly and updates in the background without any problem.
BLE beacon transmitter is very "lazy" or stopping after some time and only changing settings of it restarts it. It's despite it has always "transmitting" status.
Espresence is not a culprit here!
HA companion app - if works, espresence picks it up after 2 minutes or more.
I installed BeaconScope app and set the beacon, and... espresence with HA picks it up in LESS than 2 seconds, even if running in the background.
So, there must be a problem with HA companion app implementation of the BLE beacon. Exactly the same behaviour was spotted by some reddit users via testing.
Can anyone look into it?

@Mikescotland
Copy link

Here is the log from the companion app
beginning of main
02-15 03:55:24.461 25675 25675 E libc : Access denied finding property "persist.device_config.runtime_native.use_app_image_startup_cache"
02-15 03:55:24.462 25675 25675 E mpanion.androi: LoadAppImageStartupCache enabled : 1
02-15 03:55:24.464 25675 25675 E mpanion.androi: Not starting debugger since process cannot load the jdwp agent.
02-15 03:55:24.484 25675 25694 E BehaviorCollectManager: Fail to acquire dataAnalyzerService...
02-15 03:55:24.575 25675 25709 E AwareLog: AtomicFileUtils: readFileLines file not exist: android.util.AtomicFile@ec748c2
02-15 03:55:25.232 25675 25675 E HwViewGroupImpl: parse speed value length error
02-15 03:55:25.474 25675 25675 E WebviewActivity: Cannot set status bar color. Skipping coloring...
02-15 03:55:25.474 25675 25675 E WebviewActivity: Cannot set navigation bar color. Skipping coloring...
02-15 03:55:26.027 25675 25675 E WebviewActivity: Cannot set status bar color. Skipping coloring...
02-15 03:55:26.163 25675 25675 E WebviewActivity: onReceivedHttpError: 404 : Not Found for: http://192.168.1.10:8123/webrtc/webrtc-camera.js?v3.1.0
02-15 03:56:38.799 25675 25675 E AwareLog: DynBufManager: endFling hash null

Nothing regarding BLE and it's the same with two android phones.

@isewise
Copy link

isewise commented Mar 26, 2024

Has there been any progress on this matter?

I noticed this morning the Android companion app added functionality to limit BLE transmission to Home WiFi..

I tried again to test out the BLE beacon with my properly configured ESPresence.

Looks like it still isn't working.

@coxtor
Copy link

coxtor commented Apr 9, 2024

I also have this issue that the transmitter stop shortly after starting

@dshokouhi
Copy link
Member

For those facing this issue can you do me a favor? Now this test may lead to more drain however the library that we use had mentioned the foreground service used in the beacon monitor should also correct this.

While designed largely for background beacon detections, using the library’s included Foreground Service will also enable your app to continuously run a beacon transmitter in the background.

So please enable the beacon monitor sensor so the foreground service can start and see if that corrects the issue for you. If it does then the appropriate fix would be to have both sensors enabled.

So again enable both the transmitter and the beacon monitor.

@isewise
Copy link

isewise commented Apr 17, 2024

I enabled the beacon sensor and toggled the BLE transmitter sensor a couple times. So far, no luck.

I confirmed my espresense nodes are correctly working as well. I began charging a battery powered Chipolo device that I have and my nodes immediately picked it up.

Screenshots of my companion app settings
Screenshot_20240417-110701 1
Screenshot_20240417-110740 1

@dshokouhi
Copy link
Member

@isewise try changing Advertise Mode to Low Latency and maybe adjust Measured Power to -75 (that number is what my fire tablets like otherwise I will see no data)

@isewise
Copy link

isewise commented Apr 17, 2024

@isewise try changing Advertise Mode to Low Latency and maybe adjust Measured Power to -75 (that number is what my fire tablets like otherwise I will see no data)

Changed both settings and no detection by my nodes unfortunately.

@dshokouhi
Copy link
Member

Changed both settings and no detection by my nodes unfortunately.

that is actually not the same issue as the one you are commenting on. The issue here is that it starts advertising and then stops. Your issue is that its never detected period which suggests you still need to make adjustments either in the companion app or in whatever detection method you are using. Not sure what changes are needed. If you see the beacon showing up in the beacon monitor sensor attributes then the transmission is working as expected.

if using the ibeacon integration make sure to whitelist the UUID so it can be processed there.

@isewise
Copy link

isewise commented Apr 17, 2024

I definitely think something is wrong with HA companion app.

I just created a test BLE iBeacon using this app, went through the procedure of adding a sensor via ESPresense (YAML config, editing a node via its GUI, restart the node & restarted HA) and HA picked it up right away.

So I dont think how my detection is being configured is the issue.

Your issue is that its never detected period which suggests you still need to make adjustments either in the companion app...

What other settings need to be changed in the companion app?

...or in whatever detection method you are using.

As I stated above, I don't my detection method is improperly configured. As you'll see from the YAML screenshot below, the configuration is identical except for the actual iBeacon UUID.

Screenshot of test ibeacon from the simulator app:
image

Screenshot of my YAML config:
image)

@dshokouhi
Copy link
Member

dshokouhi commented Apr 17, 2024

I definitely think something is wrong with HA companion app.

the best way to verify that is to get 2 android devices. 1 with the beacon monitor enabled and the other with BLE transmitter enabled. If you dont see the beacon monitor picking up the transmitter then yes something is wrong. If you do see it but you dont see it elsewhere then the issue relies with the configuration.

please search github issues for past issues you will see many users with different beacons getting things working with various settings. The docs also outline those settings as well.

either way your issue is unrelated to this issue so please file a new issue so we can keep this issue focused on the actual original reported issue.

edit: here is an example of a user having success https://community.home-assistant.io/t/espresense-android-ha-companion-app/531843/7?u=dshokouhi and another https://community.home-assistant.io/t/espresense-wear-os-and-tips-tricks/518970

@isewise
Copy link

isewise commented Apr 17, 2024

I connected my ESP M5 atom to my PC to read the logs of the node as it detects devices. The node is a beacon monitor after all.

I turned off BLE transmitter sensor in the companion app, brought my phone near the node, then turned on BLE transmitter sensor. It popped up in the logs as "New", then "Close" then "Left" within 1 second. See the yellow highlighted logs.

This is the exact behavior described in the issue: "Android iBeacon transmission stops shortly after started"
In this particular iteration of the issue, it stops immediately after it starts.

I didn't move my phone away from the node, I didnt turn off the BLE transmitter sensor and subsequent attempts of me bringing my phone near the node to attempt to have it register as "Close" again, as it should, did not work.

I appreciate you sharing some tips, but I do think this is related. I've had this presence detection enabled and working for quite some time using the HA companion app until, I, as the other people who have commented in this thread noticed it was no longer working.

image

@dshokouhi
Copy link
Member

do you see that same behavior with my recommendation from earlier of keeping both sensors (Beacon Monitor and BLE Transmitter) enabled and transmitting/monitoring? The beacon monitor sensor once enabled will post a persistent notification on your device to keep things alive, thats whats important for my actual ask. Did you see that notification show up once the monitor is enabled?

you mentioned earlier in your comment no detection which lead me to believe you were experiencing a different issue. Appreciate the screenshot showing the original issue :)

@isewise
Copy link

isewise commented Apr 18, 2024

I think at some point the companion app must have changed the UUID. I went through everything and discovered that some of the middle digits and letters had changed but the ending, minor & major, had remained the same.

I overlooked it because I was only paying attention to the last pattern of major and minor at the end of the iBeacon string. But in reviewing all the settings more closely I discovered the discrepancy.

I know I didn't change it, I never had any reason to do so.

Others might want to check the beacon string if they are having issues as well.

I'm pretty ashamed that it was such a simple issue 😞 I apologize.

As for the beacon monitoring sensor, I've been testing without it enabled and so far it's been working well.

I would imagine other phones and devices might have different results.

My current settings:
Measured power: -75
Transmitter power: low
Advertise frequency: Balanced
Pixel 7 Pro, latest version of companion app and Android as of writing.

@dshokouhi
Copy link
Member

I think at some point the companion app must have changed the UUID.

This only happens when app database was lost like if you factory reset, changed devices. Or even if you got logged out of the only added server in your device. It is a random UUID the first time the sensor is enabled, once created it stays static unless the data is lost.

https://github.com/home-assistant/android/blob/master/common/src/main/java/io/homeassistant/companion/android/common/sensors/BluetoothSensorManager.kt#L255

minor & major, had remained the same.

yes they are hardcoded

https://github.com/home-assistant/android/blob/master/common/src/main/java/io/homeassistant/companion/android/common/sensors/BluetoothSensorManager.kt#L55-L56

As for the beacon monitoring sensor, I've been testing without it enabled and so far it's been working well.

Good to know the feature is working for you, if you see it stop after some time like 10 minutes then you are impacted by this issue.

For the others who are actually experiencing this issue please see my comments from yesterday about the debug APK testing to see if we can solve this issue.

@umglurf
Copy link

umglurf commented Apr 18, 2024

Hi, I have the same issue and have tried the debug build. Both versions have the same issue, a beacon is received immediately when I turn on the transmitter, then no more beacons are received. Turning the transmitter off and on again I receive a new beacon in both versions of the app. With the debug build, I get the notification, but it does not seem to change anything.
One thing I noticed when setting up the debug app which has a new uuid is that every time the transmitter is turned off and on again, the phone uses a new mac address. I remember the same with the official app, thus needs to turn off and on again around 10 times in order to get the iBeacon integration to correlate them.

@dshokouhi
Copy link
Member

@umglurf you need to add the UUID to the ibeacon integration whitelist as mentioned earlier. You wont see the UUIDs without it as not all devices send a name.

@umglurf
Copy link

umglurf commented Apr 18, 2024

@umglurf you need to add the UUID to the ibeacon integration whitelist as mentioned earlier. You wont see the UUIDs without it as not all devices send a name.

Hi, I added the UUID for both apps in order to get them to appear in the iBeacon integration.

@dshokouhi
Copy link
Member

can you please share screenshots and more data to go by? you also do not need to turn the transmitter on and off like that, it takes some time for the 10 tries to get picked up. Also did you make sure to grant the app background access? If on a samsung device you have more than 1 setting to turn off.

@dshokouhi
Copy link
Member

for the record here is my amazon tablet wth transmitter enabled, very frequent updates and this is without debug build but app kept open

image

image

@umglurf
Copy link

umglurf commented Apr 18, 2024

can you please share screenshots and more data to go by?

This is without the debug build:

image
image

With the debug build:

image
image

you also do not need to turn the transmitter on and off like that, it takes some time for the 10 tries to get picked up.

Yes, it was a quick way to get the debug app correlated.

Also did you make sure to grant the app background access? If on a samsung device you have more than 1 setting to turn off.

Yes, background access is granted. The device is a Faiphone 3

@dshokouhi
Copy link
Member

any reason why you changed measured power to 81? try the default of -59

what about the device tracker? is that showing away? your screenshots dont show the device disconnected as the state will be unavailable then.

also adjust transmit power to be high and advertise mode to be low latency

@umglurf
Copy link

umglurf commented Apr 18, 2024

any reason why you changed measured power to 81? try the default of -59

I changed it to match the measured power 1 meter away, but have set it to -59 now

what about the device tracker? is that showing away? your screenshots dont show the device disconnected as the state will be unavailable then.

also adjust transmit power to be high and advertise mode to be low latency

non debug build, low latency, high power, -59db:

image

debug build, same parameters:

image

@dshokouhi
Copy link
Member

so the detection is on and off? also can you please confirm you dont have additional background settings? some manufacturers add multiple settings to turn off with different names like power save, data save etc... you will need to dig deep into phone settings for this as every device is different.

@umglurf
Copy link

umglurf commented Apr 18, 2024

so the detection is on and off?

Yes, whenever I toggle the transmitter in the app, I seem to get 1 beacon, and then it stops

also can you please confirm you dont have additional background settings? some manufacturers add multiple settings to turn off with different names like power save, data save etc... you will need to dig deep into phone settings for this as every device is different.

As far as I've been able to dig, there is no additional background settings restricting the app

@dshokouhi
Copy link
Member

Yes, whenever I toggle the transmitter in the app, I seem to get 1 beacon, and then it stops

can you check for errors in the companion app maybe something is there.

As far as I've been able to dig, there is no additional background settings restricting the app

when this happens do you see other things stopping in the background like sensor or location updates?

@umglurf
Copy link

umglurf commented Apr 18, 2024

Yes, whenever I toggle the transmitter in the app, I seem to get 1 beacon, and then it stops

can you check for errors in the companion app maybe something is there.

In the debug build I got this

04-18 19:06:29.391 1104 1341 I SensorReceiver: Sensor updates and sync completed
04-18 19:06:29.883 1104 9986 D BluetoothAdapter: isLeEnabled(): ON
04-18 19:06:29.884 1104 9986 D BluetoothLeScanner: could not find callback wrapper
04-18 19:06:29.886 1104 9986 D BluetoothAdapter: isLeEnabled(): ON
04-18 19:06:29.898 1104 9986 E CycledLeScannerForLollipop: Cannot start scan. Security Exception: Need android.permission.BLUETOOTH_SCAN permission for android.content.AttributionSource@5d61179f: GattService registerScanner
04-18 19:06:37.671 1104 1341 D LogcatReader: Read logcat for pid 1104

As far as I've been able to dig, there is no additional background settings restricting the app

when this happens do you see other things stopping in the background like sensor or location updates?

No, location update works correctly

@dshokouhi
Copy link
Member

04-18 19:06:29.898 1104 9986 E CycledLeScannerForLollipop: Cannot start scan. Security Exception: Need android.permission.BLUETOOTH_SCAN permission for android.content.AttributionSource@5d61179f: GattService registerScanner

ah that would explain it.

in the meantime can you enable the beacon monitor sensor and just grant permissions there....it should avoid that error will work on getting that fixed in the PR. You can disable the sensor after granting whatever permission it requests

@umglurf
Copy link

umglurf commented Apr 18, 2024

04-18 19:06:29.898 1104 9986 E CycledLeScannerForLollipop: Cannot start scan. Security Exception: Need android.permission.BLUETOOTH_SCAN permission for android.content.AttributionSource@5d61179f: GattService registerScanner

ah that would explain it.

Great

in the meantime can you enable the beacon monitor sensor and just grant permissions there....it should avoid that error will work on getting that fixed in the PR. You can disable the sensor after granting whatever permission it requests

I didn't get asked for any permissions, but the logs changed afterwards

04-18 19:18:32.981 1104 1380 D LogcatReader: Read logcat for pid 1104
04-18 19:18:32.984 1104 1104 D CycledLeScannerForLollipop: got record
04-18 19:18:32.984 1104 1104 D CycledLeScannerForLollipop: with service uuid: 0000fe9f-0000-1000-8000-00805f9b34fb
04-18 19:18:32.984 1104 1104 D CycledLeScannerForLollipop: got a filtered scan result in the background.
04-18 19:18:32.984 1104 13478 D ScanHelper: Processing packet
04-18 19:18:32.984 1104 13478 W ScanHelper: API No beacon parsers registered when decoding beacon
04-18 19:18:33.005 1104 1104 D CycledLeScannerForLollipop: got record
04-18 19:18:33.006 1104 1104 D CycledLeScannerForLollipop: with service uuid: 802a0000-4ef4-4e59-b573-2bed4a4ac159
04-18 19:18:33.006 1104 1104 D CycledLeScannerForLollipop: got a filtered scan result in the background.
04-18 19:18:33.006 1104 13475 D ScanHelper: Processing packet
04-18 19:18:33.006 1104 13475 W ScanHelper: API No beacon parsers registered when decoding beacon
04-18 19:18:33.019 1104 1104 D CycledLeScannerForLollipop: got record
04-18 19:18:33.019 1104 1104 D CycledLeScannerForLollipop: with service uuid: 0000fe07-0000-1000-8000-00805f9b34fb
04-18 19:18:33.019 1104 1104 D CycledLeScannerForLollipop: got a filtered scan result in the background.
04-18 19:18:33.019 1104 13479 D ScanHelper: Processing packet
04-18 19:18:33.019 1104 13479 W ScanHelper: API No beacon parsers registered when decoding beacon
04-18 19:18:33.021 1104 1104 D CycledLeScannerForLollipop: got record
04-18 19:18:33.022 1104 1104 D CycledLeScannerForLollipop: got a filtered scan result in the background.
04-18 19:18:33.022 1104 13474 D ScanHelper: Processing packet
04-18 19:18:33.022 1104 13474 W ScanHelper: API No beacon parsers registered when decoding beacon
04-18 19:18:33.027 1104 1104 D CycledLeScannerForLollipop: got record
04-18 19:18:33.028 1104 1104 D CycledLeScannerForLollipop: with service uuid: 0000fe07-0000-1000-8000-00805f9b34fb
04-18 19:18:33.028 1104 1104 D CycledLeScannerForLollipop: got a filtered scan result in the

@dshokouhi
Copy link
Member

I didn't get asked for any permissions, but the logs changed afterwards

yea some permissions are silently granted once requested others require end user confirmation. Now that the permission error is gone did that improve the situation?

For myself I started another test on my Pixel 8 pro using the production version and more than 1 hour later I am still transmitting

image
image

so the foreground service should work as long as the app has proper background access. Unfortunately fairphone is not listed in dontkillmyapp.com however that site does offer good pointers to avoid the background work from stopping

@umglurf
Copy link

umglurf commented Apr 18, 2024

I didn't get asked for any permissions, but the logs changed afterwards

yea some permissions are silently granted once requested others require end user confirmation. Now that the permission error is gone did that improve the situation?

No, it's the same as before.

@dshokouhi
Copy link
Member

ok appreciate you checking.

Updated debug APK with permission fix is here: https://github.com/home-assistant/android/actions/runs/8742056238

are there any HA core errors at the time the issue happens (maybe even debug logs for the integration)? Also are you using bluetooth proxies for detection?

Theres a lot of variables at play here, increasingly difficult if we cannot replicate the issue either.

Do you have another android device to test with by chance? I think its time we start looking at common denominators in this issue. I would still like for some others with the issue to test with the proposed fix still too.

@umglurf
Copy link

umglurf commented Apr 18, 2024

ok appreciate you checking.

Updated debug APK with permission fix is here: https://github.com/home-assistant/android/actions/runs/8742056238

I'll give it a test tomorrow

are there any HA core errors at the time the issue happens (maybe even debug logs for the integration)? Also are you using bluetooth proxies for detection?

No errors in the HA log. I'm using an esp32 bluetooth proxy

Theres a lot of variables at play here, increasingly difficult if we cannot replicate the issue either.

Do you have another android device to test with by chance?

Yes, I should be able to test that tomorrow

I think its time we start looking at common denominators in this issue. I would still like for some others with the issue to test with the proposed fix still too.

@dshokouhi
Copy link
Member

Just left the house and came back with the transmitter left on, it detected me just fine.

image

theres gotta be something else at play here

@umglurf
Copy link

umglurf commented Apr 19, 2024

ok appreciate you checking.
Updated debug APK with permission fix is here: https://github.com/home-assistant/android/actions/runs/8742056238

I'll give it a test tomorrow

I tested the new build, it seems to have the same issue. Attaching more logs, I will also make sure to turn it on on the way home this afternoon and see how it behaves then

image

homeassistant_companion_log_3-19-2024_6-38-6.txt

2024-04-19 06:36:20.495 DEBUG (MainThread) [homeassistant.components.ibeacon.coordinator] update beacon fbe7f3d3-c2f5-41a5-8a1f-dbe663df63d4
2024-04-19 06:36:20.496 DEBUG (MainThread) [homeassistant.components.ibeacon.coordinator] ignoring new beacon fbe7f3d3-c2f5-41a5-8a1f-dbe663df63d4_100_1_E4:A8:DF:39:1D:54 due to empty device name
2024-04-19 06:36:22.531 DEBUG (MainThread) [homeassistant.components.ibeacon.coordinator] update beacon fbe7f3d3-c2f5-41a5-8a1f-dbe663df63d4
2024-04-19 06:36:55.830 DEBUG (MainThread) [homeassistant.components.ibeacon.coordinator] update beacon cec02cd1-1eb5-4858-b369-c2740f58a132

@dshokouhi
Copy link
Member

thanks for testing again looks like there was an error

Error
04-19 06:36:12.573  6230  6335 E SensorReceiver: Issue requesting updates for Bluetooth sensors
04-19 06:36:12.573  6230  6335 E SensorReceiver: kotlin.UninitializedPropertyAccessException: lateinit property beaconManager has not been initialized
04-19 06:36:12.573  6230  6335 E SensorReceiver: 	at io.homeassistant.companion.android.common.bluetooth.ble.TransmitterManager.stopTransmitting(TransmitterManager.kt:155)
04-19 06:36:12.573  6230  6335 E SensorReceiver: 	at io.homeassistant.companion.android.common.sensors.BluetoothSensorManager.updateBLESensor(BluetoothSensorManager.kt:363)
04-19 06:36:12.573  6230  6335 E SensorReceiver: 	at io.homeassistant.companion.android.common.sensors.BluetoothSensorManager.requestSensorUpdate(BluetoothSensorManager.kt:195)
04-19 06:36:12.573  6230  6335 E SensorReceiver: 	at io.homeassistant.companion.android.common.sensors.SensorManager$DefaultImpls.requestSensorUpdate(SensorManager.kt:138)
04-19 06:36:12.573  6230  6335 E SensorReceiver: 	at io.homeassistant.companion.android.common.sensors.BluetoothSensorManager.requestSensorUpdate(BluetoothSensorManager.kt:27)
04-19 06:36:12.573  6230  6335 E SensorReceiver: 	at io.homeassistant.companion.android.common.sensors.SensorReceiverBase.updateSensors(SensorReceiverBase.kt:190)
04-19 06:36:12.573  6230  6335 E SensorReceiver: 	at io.homeassistant.companion.android.common.sensors.SensorReceiverBase$onReceive$3.invokeSuspend(SensorReceiverBase.kt:160)
04-19 06:36:12.573  6230  6335 E SensorReceiver: 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
04-19 06:36:12.573  6230  6335 E SensorReceiver: 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
04-19 06:36:12.573  6230  6335 E SensorReceiver: 	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)
04-19 06:36:12.573  6230  6335 E SensorReceiver: 	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)
04-19 06:36:12.573  6230  6335 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585)
04-19 06:36:12.573  6230  6335 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802)
04-19 06:36:12.573  6230  6335 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706)
04-19 06:36:12.573  6230  6335 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693)

should be fixed in but I dont think this will fix the scenario for you.

https://github.com/home-assistant/android/actions/runs/8755457666

your companion app logs are about 2 minutes long. At what point does it get connected and disconnected? your screenshots also do not show that as the sensor is left as connected. We may need to see logs when the issue occurs.

your HA core logs do show the beacon being detected so not sure whats wrong there

@umglurf
Copy link

umglurf commented Apr 19, 2024

thanks for testing again looks like there was an error
Error

should be fixed in but I dont think this will fix the scenario for you.

https://github.com/home-assistant/android/actions/runs/8755457666

Thanks, installed this now

your companion app logs are about 2 minutes long. At what point does it get connected and disconnected? your screenshots also do not show that as the sensor is left as connected. We may need to see logs when the issue occurs.

your HA core logs do show the beacon being detected so not sure whats wrong there

I've let it run longer now, attaching logs. Whenever the transmitter toggle is changed from off to on, I immediately receive a beacon and then it takes minutes before the next beacon.

homeassistant_companion_log_3-19-2024_18-33-49.txt

2024-04-19 18:15:34.694 DEBUG (MainThread) [homeassistant.components.ibeacon.coordinator] update beacon cec02cd1-1eb5-4858-b369-c2740f58a132
2024-04-19 18:15:38.784 DEBUG (MainThread) [homeassistant.components.ibeacon.coordinator] update beacon cec02cd1-1eb5-4858-b369-c2740f58a132
2024-04-19 18:17:03.580 DEBUG (MainThread) [homeassistant.components.ibeacon.coordinator] update beacon cec02cd1-1eb5-4858-b369-c2740f58a132
2024-04-19 18:17:18.425 DEBUG (MainThread) [homeassistant.components.ibeacon.coordinator] update beacon cec02cd1-1eb5-4858-b369-c2740f58a132
2024-04-19 18:17:51.806 DEBUG (MainThread) [homeassistant.components.ibeacon.coordinator] update beacon cec02cd1-1eb5-4858-b369-c2740f58a132
2024-04-19 18:26:14.084 DEBUG (MainThread) [homeassistant.components.ibeacon.coordinator] update beacon fbe7f3d3-c2f5-41a5-8a1f-dbe663df63d4
2024-04-19 18:26:14.136 DEBUG (MainThread) [homeassistant.components.ibeacon.coordinator] update beacon cec02cd1-1eb5-4858-b369-c2740f58a132
2024-04-19 18:28:03.653 DEBUG (MainThread) [homeassistant.components.ibeacon.coordinator] update beacon fbe7f3d3-c2f5-41a5-8a1f-dbe663df63d4
2024-04-19 18:31:25.585 DEBUG (MainThread) [homeassistant.components.ibeacon.coordinator] update beacon cec02cd1-1eb5-4858-b369-c2340f58a132
2024-04-19 18:31:25.999 DEBUG (MainThread) [homeassistant.components.ibeacon.coordinator] update beacon cec02cd1-1eb5-4858-b369-c2740f58a132

image
image

@dshokouhi
Copy link
Member

Looks like an unrelated error from the Beacon Monitor sensor, if you enabled it for this test you can turn it off now that the foreground service is part of the transmitter

04-19 18:33:20.927  4820  6372 E SensorReceiver: Issue requesting updates for Bluetooth sensors
04-19 18:33:20.927  4820  6372 E SensorReceiver: kotlin.UninitializedPropertyAccessException: lateinit property region has not been initialized
04-19 18:33:20.927  4820  6372 E SensorReceiver: 	at io.homeassistant.companion.android.common.bluetooth.ble.MonitoringManager.stopMonitoring(MonitoringManager.kt:77)
04-19 18:33:20.927  4820  6372 E SensorReceiver: 	at io.homeassistant.companion.android.common.sensors.BluetoothSensorManager.updateBeaconMonitoringSensor(BluetoothSensorManager.kt:387)
04-19 18:33:20.927  4820  6372 E SensorReceiver: 	at io.homeassistant.companion.android.common.sensors.BluetoothSensorManager.requestSensorUpdate(BluetoothSensorManager.kt:198)
04-19 18:33:20.927  4820  6372 E SensorReceiver: 	at io.homeassistant.companion.android.common.sensors.SensorManager$DefaultImpls.requestSensorUpdate(SensorManager.kt:138)
04-19 18:33:20.927  4820  6372 E SensorReceiver: 	at io.homeassistant.companion.android.common.sensors.BluetoothSensorManager.requestSensorUpdate(BluetoothSensorManager.kt:27)
04-19 18:33:20.927  4820  6372 E SensorReceiver: 	at io.homeassistant.companion.android.common.sensors.SensorReceiverBase.updateSensors(SensorReceiverBase.kt:190)
04-19 18:33:20.927  4820  6372 E SensorReceiver: 	at io.homeassistant.companion.android.common.sensors.SensorReceiverBase$onReceive$3.invokeSuspend(SensorReceiverBase.kt:160)
04-19 18:33:20.927  4820  6372 E SensorReceiver: 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
04-19 18:33:20.927  4820  6372 E SensorReceiver: 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
04-19 18:33:20.927  4820  6372 E SensorReceiver: 	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)
04-19 18:33:20.927  4820  6372 E SensorReceiver: 	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)
04-19 18:33:20.927  4820  6372 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585)
04-19 18:33:20.927  4820  6372 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802)
04-19 18:33:20.927  4820  6372 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706)
04-19 18:33:20.927  4820  6372 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693)

Also noticed this

04-19 18:33:34.782 4820 4820 D BeaconTransmitter: Stopping advertising with object android.bluetooth.le.BluetoothLeAdvertiser@e6b29dc

did you stop the transmitter here or did it stop on its own? It does not look like the action was stopped but good to confirm

we can see somethings seemingly being killed

04-19 18:33:34.912  4820  4820 E BeaconService: onDestroy()
04-19 18:33:34.912  4820  4820 I BeaconService: onDestroy called.  stopping scanning
04-19 18:33:34.912  4820  4820 D CycledLeScanner: stop called
04-19 18:33:34.912  4820  4820 D CycledLeScanner: scanning already stopped
04-19 18:33:34.912  4820  4820 D CycledLeScannerForLollipop: unregistering ScreenOffReceiver as we stop the cycled scanner
04-19 18:33:34.912  4820  4820 D CycledLeScanner: Destroying
04-19 18:33:34.912  4820  6366 D CycledLeScanner: Quitting scan thread
04-19 18:33:35.046  4820  4870 D BeaconManager: API stopMonitoring id1: ffffffff-ffff-ffff-ffff-ffffffffffff id2: null id3: null
04-19 18:33:35.046  4820  4870 D BeaconManager: API disableForegroundServiceScanning
04-19 18:33:35.171  4820  4869 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: false, usesWifi is: true
04-19 18:33:35.174  4820  4869 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: false, usesWifi is: true
04-19 18:33:35.488  4820  4869 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: false, usesWifi is: true
04-19 18:33:35.698  4820  4869 I SensorReceiver: Sensor updates and sync completed
04-19 18:33:35.819  4820  4833 I n.android.debug: Background young concurrent copying GC freed 745735(31MB) AllocSpace objects, 73(1864KB) LOS objects, 54% free, 26MB/58MB, paused 542us,68us total 453.044ms

@umglurf
Copy link

umglurf commented Apr 19, 2024

Looks like an unrelated error from the Beacon Monitor sensor, if you enabled it for this test you can turn it off now that the foreground service is part of the transmitter

Thats strange, it is turned off according to the GUI

Also noticed this

04-19 18:33:34.782 4820 4820 D BeaconTransmitter: Stopping advertising with object android.bluetooth.le.BluetoothLeAdvertiser@e6b29dc

did you stop the transmitter here or did it stop on its own? It does not look like the action was stopped but good to confirm

Yes, this was when I stopped the transmitter and then collected the logs

@dshokouhi
Copy link
Member

Yes, this was when I stopped the transmitter and then collected the logs

im still not following the issue here because the device tracker shows it disconnected after you turned off teh transmitter which feels expected here.

are you expecting things to be faster than they may actually be?

@umglurf
Copy link

umglurf commented Apr 19, 2024

Yes, this was when I stopped the transmitter and then collected the logs

im still not following the issue here because the device tracker shows it disconnected after you turned off teh transmitter which feels expected here.

are you expecting things to be faster than they may actually be?

That might be the case. When the app says 1Hz, 3Hz or 10Hz for the diffent modes, I would expect there to be beacons every second, 3 every second or 10 every second. Even is this is not true, I thought there should be at least several beacons per minute, not that there is many minutes between beacons.
Are these assumptions incorrect?

@dshokouhi
Copy link
Member

not easy digging through our library to see where the values. As far as I can tell we are setting the advertise mode per what Android expects

https://github.com/AltBeacon/android-beacon-library/blob/master/lib/src/main/java/org/altbeacon/beacon/BeaconTransmitter.java#L209

as far as I can tell these values are being added and accepted by the OS

@umglurf
Copy link

umglurf commented Apr 19, 2024

not easy digging through our library to see where the values. As far as I can tell we are setting the advertise mode per what Android expects

https://github.com/AltBeacon/android-beacon-library/blob/master/lib/src/main/java/org/altbeacon/beacon/BeaconTransmitter.java#L209

as far as I can tell these values are being added and accepted by the OS

Ok, thanks. Since the app does send beacons, but they have long intervals between them, then it looks like it's not quite the same issue as originally reported and that it is most likely an issue outside of the home assistant app for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sensor-tracking
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants