Android "add to home screen" bug with ssl

Thanks for posting that info from the other linked thread. I found this thread first. I just wanted to add that I am experiencing the same issue. The workaround did work for me so at least it is working properly for now. Hopefully the devs can find the real issue and get it resolved in a future release.

Im having the same issue. Without ssl enabled, adding to the Home screen worked perfectly fine and created the web-app. After setting up DuckDNS and Let’s Encrypt, it now opens a tab in chrome instead. I’m still working on getting the push notifications working but not sure if that will fix the issue.

Same issue here

Found another quick little work around after reading this post.
just go into your config and # out ssl_certificate: /ssl/fullchain.pem and ssl_key: /ssl/privkey.pem. Then restart home assistant. while its restarting navigate to your https url and hit add to home screen and it should work normal. Then un # your ssl_certificate and ssl_key in your config and issue another restart. Now your shortcut on your home screen should be working =]

1 Like

I was able to port forward 443 to 8123 on my router and it fixed the issue with the certificate. Now loading https://example.duckdns.org and Adding to home screen works fine. It’s still an issue if you use https://example.duckdns.org:8123 or https://www.example.duckdns.org since the certificate using the DuckDNS addon doesnt get a cert for that domain.

2 Likes

thank you for that @Neil_Grewal! you saved my evening [was just starting to curse very loud at my hass.io installation ;)]

1 Like

No problem! Glad I could help. I went through the same thing, reset my whole Hass.io setup and was about to give up and found that small trick worked.

Never had this issue, as i added it to my old phone before i setup a valid ssl cert. now added it to my new phone and i get this :frowning:

Tried using 443 instead of 8123 and it works properly. Somehow Android Chrome it isn’t liking HTTPS on a non-standard port.

Just for those still looking to resolve this. I found a super simple method. just turn your phone on Airplane mode, reload the page and than add it while it’s trying to load. it worked for me.

Than of course turn of airplane and the shortcut loads with no issues :slight_smile:

11 Likes

Surprisingly the airplane mode workaround worked for me as well. There is only one caveat: At least in my case the shortcut isn’t created with the home assistant icon but with a generic “first letter of the domain” icon that chrome uses if it can’t load the favicon from the server (obviously because it’s in airplane mode).

If you use a more fancy launcher in android you may be able to change the icon after the shortcut was created by editing the properties of the shortcut.

Here’s a workaround for Nova Launcher users:

Make sure, you still have a shortcut with a proper HA icon in the app list. Apparently the “buggy” shortcut you crated before, that opens a chrome tab instead of the kiosk mode web app works fine.

Create the proper shortcut in airplane mode (see last post by @calberttj). Long tap the new shortcut, choose “Edit” and tap on the icon. Then choose Built-In from the list and select the HA icon from the old shortcut.

After that you may delete and uninstall the old web app. This doesn’t affect the newly created shortcut.

I just tried this on Android 8 and it worked to create the kiosk view but I cant change the icon. The only options I get from a long press are ‘select items’ and ‘remove from home’. That snot the end of the world though, i’m far happier than it opening a chrome tab every time.

As said, changing app icons is a feature, which isn’t offered by most standard Android launchers. The workaround above is for Nova Launcher users only.

If you don’t want to switch to another launcher, there are some apps on the store, which allow to change app icons. Most of them loaded with ads though. But nevertheless they should work as well.

ah, thanks. I should have read the post properly! :roll_eyes:

Note that the actual solution seems to be having Home Assistant on port 443. Either by port forwarding it directly to that or by reverse proxy. (That’s what I have done at least, and it works fine.)

I think the issue lies with Android, not Home Assistant.

Hasn’t been an issue for ages, at least not if you’re on an up to date version of Oreo. Yes, it was an Android/Chrome issue and no, you don’t need to use 443.

my phone only got the Oreo update on Monday.

1 Like

Very graceful solution =) Thanks, worked for me.
By the way, have a latest Oreo as well.

Wow it worked! Thanks a lot!

I for the life of me cannot get this to work. Switching to airplane mode, reload the page, hit More, but can never get the Add to Home Screen option to show. Not sure what i’m missing here.