android icon indicating copy to clipboard operation
android copied to clipboard

Adding to Device Controls no longer works on Android 13

Open kineticscreen opened this issue 2 years ago • 6 comments

Home Assistant Android version: 2022.6.0-full

Android version: 13 Beta 4.1

Phone model: Google Pixel 6

Home Assistant version: Home Assistant 2022.7.6 Supervisor 2022.07.0 Operating System 8.2

Last working Home Assistant release (if known): Uncertain - possibly related to Android 13 rather than HA.

Description of problem: Adding Home Assitant entities to the Home Control notification / home screen menu no longer works - just hangs on loading when Home Assistant is selected as the source.

Traceback (if applicable, to get the logs you may refer to: https://companion.home-assistant.io/docs/troubleshooting/faqs/#android-crash-logs):


Screenshot of problem:

Screenshot_20220725-162510 Screenshot_20220725-162458

Additional information:

When Home Assistant is selected as the app to add controls from, it never gets past the "Loading" stage.

Also quite possibly related, updating the Tiles for the quick settings has no effect. Customised Tile 1 with name, icon, entity etc, but still has all 12 listed as "Tile Not Setup".

kineticscreen avatar Jul 25 '22 09:07 kineticscreen

@kineticscreen I've moved your issue to the home-assistant/android repository because the issue concerns the app, not the documentation. Would you be able to copy the template from a new Android issue to this issue and fill it in, to make sure we have all the information?

I'm also seeing the controls not loading on Android 13 if Home Assistant isn't the active app. Logcat shows the following error, suggesting that the app should start providing stateless controls instead of cheating and including state:

2022-07-25 13:44:52.145 29934-30070/io.homeassistant.companion.android.debug W/ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control.

Updated tile names, icons etc only show up when you add them to the quick settings panel. When they are not added, they will continue to show "Tile Not Setup". Did you add a tile to the quick settings panel? If so, does something happen at all when you tap on it?

jpelgrom avatar Jul 25 '22 11:07 jpelgrom

Oh yes you're right, when I dragged what I hoped was Tile 1 into the Quick Settings, it appeared correctly labeled, with icon etc.

Unfortunately this didn't fix the other issue of adding Home Assistant to the Home Automation section.

kineticscreen avatar Jul 25 '22 12:07 kineticscreen

Good to hear quick settings tiles work!

The device controls issue appears to be limited to Android 13, I'm seeing the same (Pixel 4a on the latest beta, using beta-2500 for HA). If the app wasn't showing controls before you click on 'Add controls', loading them will fail most of the time. Switching to stateless controls doesn't help. Also happens with for example Google Home. Opened an issue on Google's issue tracker because no one seems to have reported it yet: https://issuetracker.google.com/issues/240060686

jpelgrom avatar Jul 25 '22 13:07 jpelgrom

@kineticscreen can you please grab the issue template from a new issue and copy it here and fill in the requested info. We need to make sure issues have all requested information.

dshokouhi avatar Jul 25 '22 15:07 dshokouhi

Edited original post with the template format.

kineticscreen avatar Jul 26 '22 01:07 kineticscreen

A workaround I discovered while replying to Google: if you remove all controls, for all apps, and reboot, adding new controls will work most of the time.

(However, if you then try to add controls for a second app, you will most likely end up with endless loading again.)

jpelgrom avatar Jul 26 '22 17:07 jpelgrom

A workaround I discovered while replying to Google: if you remove all controls, for all apps, and reboot, adding new controls will work most of the time.

(However, if you then try to add controls for a second app, you will most likely end up with endless loading again.)

I'm with the Pixel 7 Pro (Android 13) and I confirm this workaround is working, thanks!

Elpatii avatar Oct 14 '22 21:10 Elpatii

hmm has this issue been fixed in a recent update? Just checked and I was able to add controls. Some other apps like Google Home didnt load but others like Tasker and Tinycam alongside ours seem to be loading consistently now.

dshokouhi avatar Dec 20 '22 20:12 dshokouhi

Still not working consistently for me on the December 2022 release. They did add a new animation when adding controls from a different app.

jpelgrom avatar Dec 20 '22 20:12 jpelgrom

yea I noticed that too, it slides lol kinda cool. So I guess the issue is still there :(

dshokouhi avatar Dec 20 '22 20:12 dshokouhi

Hi, I actually use openHAB but I thought I'd let you know that if you click "See other apps", turn the screen off, turn it back on and then click the app, it works 90% of the times.

depau avatar Jan 18 '23 19:01 depau

Hi, I actually use openHAB but I thought I'd let you know that if you click "See other apps", turn the screen off, turn it back on and then click the app, it works 90% of the times.

Dude, I've had this problem since the release of Android 13. What you said just worked!

Many, many thanks indeed!!!

rodrigoswz avatar Jan 18 '23 19:01 rodrigoswz

Wow, nice find. Im not sure I'll use HA here but can confirm this workaround step works for me here (Pixel 7 Pro). Edit: It allso seems once added adding additional entities is also fine.

djgrazzy avatar Jan 18 '23 23:01 djgrazzy

Hi, I actually use openHAB but I thought I'd let you know that if you click "See other apps", turn the screen off, turn it back on and then click the app, it works 90% of the times.

Brilliant workaround, thanks! 👏🏼

RaeesD avatar Apr 15 '23 14:04 RaeesD

Whaha how did you find this out.. great!

Hi, I actually use openHAB but I thought I'd let you know that if you click "See other apps", turn the screen off, turn it back on and then click the app, it works 90% of the times.

SamJongenelen avatar May 15 '23 15:05 SamJongenelen

I'm experiencing exactly the same issues with a Pixel 7 pro on Android 13 build TQ2A.230505.002. Companion app logs show the following: 05-31 23:24:21.103 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.103 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.103 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.103 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.103 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.103 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.103 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.103 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.104 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.104 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.104 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.104 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.104 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.104 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.104 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.105 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.105 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.105 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.106 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.106 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.106 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.106 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.106 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.107 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.107 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.107 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.107 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.107 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.108 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.108 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.108 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.108 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.109 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.109 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.109 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.109 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.109 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.109 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.109 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.109 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.110 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.110 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.110 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.110 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.110 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.110 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.110 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.110 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.111 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.111 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.111 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.111 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.111 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.111 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.111 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.111 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.112 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.112 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.112 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.112 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.112 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.112 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.112 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.112 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.112 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.113 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.113 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.113 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.113 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:21.114 25537 1382 W ControlsProviderService: onNext(): control is not stateless. Use the Control.StatelessBuilder() to build the control. 05-31 23:24:23.827 25537 25537 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1685589854973, currentMillis: 1685589863827

aserper avatar Jun 01 '23 03:06 aserper

Hi, I actually use openHAB but I thought I'd let you know that if you click "See other apps", turn the screen off, turn it back on and then click the app, it works 90% of the times.

This worked first time. Been pulling my hair out, thanks!

wwelles avatar Jun 07 '23 02:06 wwelles

Hi, I actually use openHAB but I thought I'd let you know that if you click "See other apps", turn the screen off, turn it back on and then click the app, it works 90% of the times.

Worked for me. This is so dumb, android.. smh.

azwillnj avatar Jun 14 '23 18:06 azwillnj

Related to this, I think, since the ~Jan security patch release of Android 13 (Pixel 6a), the device controls also deconfigure themselves, even after having been able to set them up correctly.

After some time (say ~1day) the device controls are empty again.

shtrom avatar Jul 11 '23 06:07 shtrom

Related to this, I think, since the ~Jan security patch release of Android 13 (Pixel 6a), the device controls also deconfigure themselves, even after having been able to set them up correctly.

After some time (say ~1day) the device controls are empty again.

I have not noticed this, once saved they are always there on my pixel 7 pro

dshokouhi avatar Jul 11 '23 06:07 dshokouhi

I just reconfirmed this: I added the controls at the time of writing my previous comment, and they are now gone again.

I see there's a new Android 13 release (I'm currently on TQ2A.230405.003.E1), I'll try it out and report if the issue is still present.

shtrom avatar Jul 11 '23 23:07 shtrom

Ok, I no longer see my slightly different issue on TQ3A.230705.001. I'm now all caught up and seeing the forever loading 🤣.

I used the remove all/reboot/readd trick, which works, but now using the Device Controls shows all the tiles themselves never leaving the “Loading...” state.

Note that this is on the 2023.6.0-minimal build from F-Droid.

shtrom avatar Jul 17 '23 12:07 shtrom

Hi, I actually use openHAB but I thought I'd let you know that if you click "See other apps", turn the screen off, turn it back on and then click the app, it works 90% of the times.

This worked! Thanks!

wardwolfram avatar Sep 01 '23 12:09 wardwolfram

The workaround is failing for me on TQ3A.230805.001 after many attempts. But the controls aren't disappearing on a different device with the same patch (which had them added years ago)

pl4nty avatar Sep 24 '23 14:09 pl4nty

Testing again on Android 14 by request from Google (for the issue tracker issue linked in the 4th comment) and controls now seem to load reliably again.

Anyone else here who can confirm?

jpelgrom avatar Oct 19 '23 19:10 jpelgrom

@jpelgrom it's fixed for me on Android 14 (build UP1A.231005.007)

pl4nty avatar Oct 19 '23 21:10 pl4nty

Can confirm it's working. Pixel 7 pro running 14. UP1A.231005.007 Removed the HA app from device controls and re-added a few HA devices without issue or any workaround required.

Good stuff :)

On Fri, 20 Oct 2023, 6:07 am Joris Pelgröm, @.***> wrote:

Testing again on Android 14 by request from Google (for the issue tracker issue linked in the 4th comment) and controls now seem to load reliably again.

Anyone else here who can confirm?

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/android/issues/2710#issuecomment-1771557505, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADU4KKU6NG7MUYCNS3DYFLDYAF26JAVCNFSM54R7ZJEKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCNZXGE2TKNZVGA2Q . You are receiving this because you are subscribed to this thread.Message ID: @.***>

djgrazzy avatar Oct 20 '23 01:10 djgrazzy

Hi, I actually use openHAB but I thought I'd let you know that if you click "See other apps", turn the screen off, turn it back on and then click the app, it works 90% of the times.

Was facing the same issue, also android 13, and it's working with this method. Thank you!

Dagnan avatar Nov 04 '23 21:11 Dagnan