home-assistant / android

:iphone: Home Assistant Companion for Android
https://companion.home-assistant.io/
Apache License 2.0
2.07k stars 587 forks source link

Command_activity stopped working? #4351

Closed SurfingSpider closed 1 month ago

SurfingSpider commented 1 month ago

Home Assistant Android app version(s): 2024.4.1-full Android version(s): 14 Device model(s): Oneplus 8t Home Assistant version: 2024.4.3 Last working Home Assistant release (if known): ? Description of problem, include YAML if issue is related to notifications:

I have had a automation running for a long time that sets my alarm using a command_activity notification. it has stopped working.

I have checked that Draw over other apps permission is enabled. I do get a "command_activity" pop up on the screen which i didnt used to get. I have tried running the example command (search google maps) from the documentation and I get the same thing.

It looks to me like it is not trying to trigger the command, just displaying a notification. any suggestions?

service: notify.mobile_app_chris_oneplus_8t
data:
  message: command_activity
  data:
    intent_package_name: com.google.android.deskclock
    intent_extras: >-
      android.intent.extra.alarm.HOUR:7,android.intent.extra.alarm.MINUTES:30,android.intent.extra.alarm.SKIP_UI:true,android.label:Home
      Assistant Alarm,android.intent.extra.alarm.MESSAGE:Home Assistant Alarm
    intent_action: android.intent.action.SET_ALARM

Companion App Logs: Setting alarm notification

04-19 09:57:16.250 28294 28294 D ViewRootImplExtImpl: MotionEvent MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=376.34863, y[0]=1499.625, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x800, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=202698068, downTime=202698013, deviceId=-1, source=0x1002, displayId=0, eventId=260699005 } handled by client, just return
04-19 09:57:31.900 28294 28460 D WebSocketRepository: Websocket: onMessage (text)
04-19 09:57:31.901 28294 28460 D WebSocketRepository: Message number 2 received
04-19 09:57:31.912 28294 28387 D WebSocketRepository: Sending message 32: {type=mobile_app/push_notification_confirm, webhook_id=d02ba6f39e43c7######redacted######e07a24482bb7aa0aebfc37f617d43f7, confirm_id=80a8e834b08df1729b5fc742d990c132, id=32}
04-19 09:57:31.913 28294 28387 D WebSocketRepository: Message number 32 sent
04-19 09:57:31.917 28294 28460 D WebSocketRepository: Websocket: onMessage (text)
04-19 09:57:31.918 28294 28460 D WebSocketRepository: Message number 32 received
04-19 09:57:31.927 28294 28294 D MessagingService: Creating notification with following data: {intent_package_name=com.google.android.deskclock, intent_extras=android.intent.extra.alarm.HOUR:7,android.intent.extra.alarm.MINUTES:30,android.intent.extra.alarm.SKIP_UI:true,android.label:Home Assistant Alarm,android.intent.extra.alarm.MESSAGE:Home Assistant Alarm, intent_action=android.intent.action.SET_ALARM, message=command_activity, webhook_id=d02ba6f39e43c######redacted######ebfc37f617d43f7, server_id=1}
04-19 09:57:31.948 28294 28294 D MessagingService: Show notification with tag "null" and id "-174899183"
04-19 09:57:34.691 28294 28294 D ScrollOptim [SceneManager]: updateCurrentActivity: mCurrentActivityName=null, isOptEnable=true, isAnimAheadEnable=true, isFrameInsertEnable=true, InsertNum=1, isEnabledForScrollChanged=false
04-19 09:57:34.691 28294 28294 D IntegrationRepository: setAppActive(): false
04-19 09:57:34.692 28294 28294 D IntegrationRepository: setAppActive(): false

Trying example code from documenation

04-19 09:57:35.932 28294 29990 D OplusScrollToTopManager: io.homeassistant.companion.android/io.homeassistant.companion.android.webview.WebViewActivity,This DecorView@837bd6d[WebViewActivity] change focus to true
04-19 09:57:38.044 28294 28460 D WebSocketRepository: Websocket: onMessage (text)
04-19 09:57:38.044 28294 28460 D WebSocketRepository: Message number 2 received
04-19 09:57:38.047 28294  3068 D WebSocketRepository: Sending message 33: {type=mobile_app/push_notification_confirm, webhook_id=d02ba6f39e43c7######redacted######e7a24482bb7aa0aebfc37f617d43f7, confirm_id=376434860b517dde1352f4d6a2920b7c, id=33}
04-19 09:57:38.048 28294  3068 D WebSocketRepository: Message number 33 sent
04-19 09:57:38.053 28294 28460 D WebSocketRepository: Websocket: onMessage (text)
04-19 09:57:38.053 28294 28460 D WebSocketRepository: Message number 33 received
04-19 09:57:38.055 28294 28294 D MessagingService: Creating notification with following data: {intent_package_name=com.google.android.apps.maps, intent_extras=android.intent.action.VIEW, intent_action=google.navigation:q=arbys, message=command_activity, webhook_id=d02ba6f39e43c######redacted######e24482bb7aa0aebfc37f617d43f7, server_id=1}
04-19 09:57:38.061 28294 28294 D MessagingService: Show notification with tag "null" and id "-174893050"
04-19 09:57:39.942 28294 28294 D LocBroadcastReceiver: Received location update.
04-19 09:57:39.944 28294 28294 D ForegrndServiceLauncher: Check if service HighAccuracyLocationService is running. Service running = false
04-19 09:57:39.945 28294  3068 D LocBroadcastReceiver: Last Location: 
04-19 09:57:39.945 28294  3068 D LocBroadcastReceiver: Coords:(53.2713137, -2.541937)
04-19 09:57:39.945 28294  3068 D LocBroadcastReceiver: Accuracy: 100.0
04-19 09:57:39.945 28294  3068 D LocBroadcastReceiver: Bearing: 0.0
04-19 09:57:39.946 28294  3068 D LocBroadcastReceiver: Begin evaluating if location update should be skipped
04-19 09:57:39.946 28294  3068 D LocBroadcastReceiver: Received location that is 36 milliseconds old, 1713517059910 compared to 1713517059946 with source fused
04-19 09:57:39.946 28294  3068 D LocBroadcastReceiver: Duplicate location received, not sending to HA
04-19 09:57:41.557 28294  3068 D ServerConnectionInfo: localUrl is: true, usesInternalSsid is: true, usesWifi is: true

Screenshot or video of problem: Notification popup I didnt used to get Screenshot_2024-04-19-10-31-44-28_b783bf344239542886fee7b48fa4b892

Additional information:

dshokouhi commented 1 month ago

Settings > companion app > select your server

Did you turn off the option to remotely control the device?

SurfingSpider commented 1 month ago

Doh! you are absolutely right I must have. I was in that menu recently setting the internal connection url. I must have switched it off by mistake.

Thank you so much for your time. This problem was driving me crazy!