home-assistant / android

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

Navigation in Android Auto is jittery when using rotary input #3328

Closed angrycatmeowmeow closed 1 year ago

angrycatmeowmeow commented 1 year ago

Home Assistant Android app version(s): 2023.1.1.full

Android version(s): 13

Device model(s): Samsung Z Fold 4

Home Assistant version: 2023.2.3

Last working Home Assistant release (if known):

Description of problem, include YAML if issue is related to notifications: 2018 Audi MMI only has rotary input. While using HA in AA, scrolling is unpredictable and the cursor doesn't always go where it should.

Companion App Logs:

Screenshot or video of problem: https://photos.app.goo.gl/BfE8Skn2Dm7oqCfa9 Additional information:

Icexist commented 1 year ago

Chiming in here to agree. Same visual as shown.

Home Assistant Android app version(s): 2023.1.1.full

Android version(s): 13

Device model(s): Pixel 4a 5g

Home Assistant version: 2023.2.2

Car: 2021 Mazda CX-5

dshokouhi commented 1 year ago

What version of the android auto app are you guys running?

This issue sounds similar to

https://9to5google.com/2022/11/16/android-auto-rotary-control-bug/

and

https://support.google.com/androidauto/thread/189072311/rotary-controls-broken?hl=en

As of now I do not see any thing in the docs about specifics on how to handle rotary input, this looks like a platform bug rather than an app bug.

angrycatmeowmeow commented 1 year ago

8.9.130604-release.daily here

I remember that bug. I lost the highlighting/cursor and had some occasional crashes. That's long gone though. The only time I have issues using the rotary input is inside of the HA app in AA. I can scroll the app launcher, coolwalk panels or a Spotify playlist with no issue.

dshokouhi commented 1 year ago

Does the scrolling issue only happen when viewing entities or does it also happen on the first page where we list the domains?

Icexist commented 1 year ago

8.7.630264-release

I haven't ever had issues with rotary controls on mine. I only see the jitter in HA app.

It happens in both the main page and the entities for me.

angrycatmeowmeow commented 1 year ago

It's kind of hard to see in the video, but yes it happens on the domains page too. You can see when I continue to turn the input to the right (down) and the cursor jumps all over the list.

dshokouhi commented 1 year ago

Does it also happen in the Navigation screen which is the last item on the main page?

angrycatmeowmeow commented 1 year ago

Yes, all pages in HA. I also checked and the behavior is the same on a wireless or wired connection. https://photos.app.goo.gl/hsfLHy3cfWfY9dJ66

Icexist commented 1 year ago

Not sure if it's related but I was seeing the selector blink without any input on the main entities page.

jpelgrom commented 1 year ago

Could it be that the app invalidating the screen on state changes causes this behavior?

Do you have any idea how frequent state changes on your server are?

angrycatmeowmeow commented 1 year ago

If you're talking about states of entities, then quite frequent. There are thousands of entities.

GSzabados commented 1 year ago

Just to join in.

Mazda 6 2016, same rotary knob solution.

I see a selector flashing without any input changes. I can see it jumping back to previous elements as well. Both on the main list and the on any entity list.

I also can say that it is not reacting to presses time to time either. I have two input_buttons to start automations. Sometimes it recognises the press sometimes it does not.

My original feeling about the issue, that it must be some forced refresh when it looses focus. Probably @jpelgrom's idea is the right one.

State changes are quite frequent with thousands of entities.

GSzabados commented 1 year ago

Some logs to add, coords has been edited only:

02-16 13:22:56.738 10060 11356 D WebSocketRepository: Websocket: onMessage (text)
02-16 13:22:56.739 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:22:56.857 10060 11356 D WebSocketRepository: Websocket: onMessage (text)
02-16 13:22:56.857 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:22:56.858 10060 11356 I chatty  : uid=10437(io.homeassistant.companion.android) .8.174:8123/... identical 1 line
02-16 13:22:56.858 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:22:57.247 10060 11356 D WebSocketRepository: Websocket: onMessage (text)
02-16 13:22:57.247 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:22:57.438 10060 10060 I ViewRootImpl@a2bf3[SettingsActivity]: ViewPostIme pointer 0
02-16 13:22:57.929 10060 10060 I ViewRootImpl@a2bf3[SettingsActivity]: ViewPostIme pointer 1
02-16 13:22:57.964 10060 11356 D WebSocketRepository: Websocket: onMessage (text)
02-16 13:22:57.965 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:22:57.965 10060 11356 I chatty  : uid=10437(io.homeassistant.companion.android) .8.174:8123/... identical 1 line
02-16 13:22:57.965 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:22:58.050 10060 11356 D WebSocketRepository: Websocket: onMessage (text)
02-16 13:22:58.051 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:22:58.052 10060 11356 I chatty  : uid=10437(io.homeassistant.companion.android) .8.174:8123/... identical 3 lines
02-16 13:22:58.052 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:22:58.989 10060 11356 D WebSocketRepository: Websocket: onMessage (text)
02-16 13:22:58.992 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:22:58.993 10060 11356 I chatty  : uid=10437(io.homeassistant.companion.android) .8.174:8123/... identical 7 lines
02-16 13:22:58.993 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:22:59.196 10060 10060 D LocBroadcastReceiver: Received location update.
02-16 13:22:59.200 10060 10060 D ForegrndServiceLauncher: Check if service HighAccuracyLocationService is running. Service running = false
02-16 13:22:59.200 10060 10060 D LocBroadcastReceiver: Last Location: 
02-16 13:22:59.200 10060 10060 D LocBroadcastReceiver: Coords:(45.9999999, 13.9999999)
02-16 13:22:59.200 10060 10060 D LocBroadcastReceiver: Accuracy: 5.67
02-16 13:22:59.200 10060 10060 D LocBroadcastReceiver: Bearing: 0.0
02-16 13:22:59.203 10060 10060 D UrlRepository: localUrl is: true, usesInternalSsid is: true, usesWifi is: true
02-16 13:22:59.206 10060 10060 D LocBroadcastReceiver: Begin evaluating if location update should be skipped
02-16 13:22:59.206 10060 10060 D LocBroadcastReceiver: Received location that is 33 milliseconds old, 1676550179173 compared to 1676550179206 with source fused
02-16 13:22:59.206 10060 10060 D LocBroadcastReceiver: Duplicate location received, not sending to HA
02-16 13:22:59.405 10060 11356 D WebSocketRepository: Websocket: onMessage (text)
02-16 13:22:59.405 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:22:59.706 10060 11356 D WebSocketRepository: Websocket: onMessage (text)
02-16 13:22:59.707 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:22:59.707 10060 11356 I chatty  : uid=10437(io.homeassistant.companion.android) .8.174:8123/... identical 1 line
02-16 13:22:59.707 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:22:59.707 10060 11356 D WebSocketRepository: Websocket: onMessage (text)
02-16 13:22:59.716 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:22:59.869 10060 11356 D WebSocketRepository: Websocket: onMessage (text)
02-16 13:22:59.870 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:22:59.877 10060 11356 D WebSocketRepository: Websocket: onMessage (text)
02-16 13:22:59.878 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:22:59.888 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:23:00.524 10060 11356 D WebSocketRepository: Websocket: onMessage (text)
02-16 13:23:00.525 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:23:00.718 10060 11356 D WebSocketRepository: Websocket: onMessage (text)
02-16 13:23:00.721 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:23:00.894 10060 11356 D WebSocketRepository: Websocket: onMessage (text)
02-16 13:23:00.896 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:23:00.896 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:23:01.446 10060 11356 D WebSocketRepository: Websocket: onMessage (text)
02-16 13:23:01.447 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:23:01.588 10060 10072 I mpanion.androi: Background concurrent copying GC freed 538701(19MB) AllocSpace objects, 10(928KB) LOS objects, 49% free, 20MB/40MB, paused 45us total 132.202ms
02-16 13:23:01.860 10060 11356 D WebSocketRepository: Websocket: onMessage (text)
02-16 13:23:01.862 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:23:01.863 10060 11356 I chatty  : uid=10437(io.homeassistant.companion.android) .8.174:8123/... identical 5 lines
02-16 13:23:01.863 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:23:01.865 10060 11356 D WebSocketRepository: Websocket: onMessage (text)
02-16 13:23:01.865 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:23:01.891 10060 11356 D WebSocketRepository: Websocket: onMessage (text)
02-16 13:23:01.893 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:23:01.911 10060 11356 D WebSocketRepository: Websocket: onMessage (text)
02-16 13:23:01.913 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:23:01.913 10060 11356 I chatty  : uid=10437(io.homeassistant.companion.android) .8.174:8123/... identical 1 line
02-16 13:23:01.913 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:23:01.916 10060 11356 D WebSocketRepository: Websocket: onMessage (text)
02-16 13:23:01.917 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:23:01.969 10060 11356 D WebSocketRepository: Websocket: onMessage (text)
02-16 13:23:01.975 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:23:01.978 10060 11356 I chatty  : uid=10437(io.homeassistant.companion.android) .8.174:8123/... identical 7 lines
02-16 13:23:01.978 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:23:02.265 10060 11356 D WebSocketRepository: Websocket: onMessage (text)
02-16 13:23:02.265 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:23:02.882 10060 11356 D WebSocketRepository: Websocket: onMessage (text)
02-16 13:23:02.882 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:23:02.930 10060 11356 D WebSocketRepository: Websocket: onMessage (text)
02-16 13:23:02.931 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:23:02.931 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:23:02.935 10060 11356 D WebSocketRepository: Websocket: onMessage (text)
02-16 13:23:02.936 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:23:02.966 10060 11356 D WebSocketRepository: Websocket: onMessage (text)
02-16 13:23:02.967 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:23:03.699 10060 11356 D WebSocketRepository: Websocket: onMessage (text)
02-16 13:23:03.699 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:23:03.831 10060 11356 D WebSocketRepository: Websocket: onMessage (text)
02-16 13:23:03.833 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:23:03.947 10060 11356 D WebSocketRepository: Websocket: onMessage (text)
02-16 13:23:03.948 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:23:03.948 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:23:04.041 10060 11356 D WebSocketRepository: Websocket: onMessage (text)
02-16 13:23:04.042 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:23:04.314 10060 11356 D WebSocketRepository: Websocket: onMessage (text)
02-16 13:23:04.323 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:23:04.324 10060 11356 I chatty  : uid=10437(io.homeassistant.companion.android) .8.174:8123/... identical 8 lines
02-16 13:23:04.325 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:23:04.620 10060 11356 D WebSocketRepository: Websocket: onMessage (text)
02-16 13:23:04.623 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:23:04.624 10060 11356 I chatty  : uid=10437(io.homeassistant.companion.android) .8.174:8123/... identical 4 lines
02-16 13:23:04.625 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:23:04.626 10060 11356 D WebSocketRepository: Websocket: onMessage (text)
02-16 13:23:04.628 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:23:04.628 10060 11356 I chatty  : uid=10437(io.homeassistant.companion.android) .8.174:8123/... identical 1 line
02-16 13:23:04.629 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:23:04.699 10060 11356 D WebSocketRepository: Websocket: onMessage (text)
02-16 13:23:04.702 10060 10060 I ViewRootImpl@a2bf3[SettingsActivity]: ViewPostIme pointer 0
02-16 13:23:04.704 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:23:04.705 10060 11356 I chatty  : uid=10437(io.homeassistant.companion.android) .8.174:8123/... identical 6 lines
02-16 13:23:04.705 10060 11356 D WebSocketRepository: Message number 3 received
02-16 13:23:04.777 10060 10060 I ViewRootImpl@a2bf3[SettingsActivity]: ViewPostIme pointer 1
02-16 13:23:04.782 10060 13969 D LogcatReader: Read logcat for pid 10060

Main (first) menu (page) of HA AA is open, scrolling down and "normal" flickering of the selector, when stopping the scroll.