The home assistant app

yesterday i set up duckdns like in this video: Home Assistant Remote Access for FREE - DuckDNS + LetsEncrypt + Single URL - YouTube, and now i have a problem: the home assistant app can no longer connect to my home assistant server. it keeps giving me an error:

failed to perform SSL handshake

when i use firefox on my phone or tablet, it works. but the phone doesn’t report its battery level or location to home assistant.

so, i can connect using firefox but not the home assistant app. the question is, why? any ideas?

1 Like

Sorry i don’t have an answer but ,I have this problem on one of my tablets (the one I use for wallpanel) I have 2 phones and one tablet connected fine, just the one which doesn’t connect, due to SSL issues. I tried to find the problem but never have. Hope someone can help.

1 Like

have you tried connecting using a browser? i use firefox and that works for me.

Did you update the Home Assistant URL inside the Home Assistant app, after you setup DuckDNS?
Is the same URL configured, which is working inside the web browser?

What app is that?

With mine it is pointing at the correct https://“stuff” and works fine on all but one device. It detects the correct address and asks for a sign in then has trouble with ssl stuff.and sends me back to the address page.

1 Like

of course. i use the same URL in firefox on my computer and on my androids, and in the home assistant app. same protocol, same domain name, same port, same everything. the difference is, in firefox it works :slight_smile: , in the app i get that error :frowning:

i forward ports 443 and 8123 to my home assistant server (a pi 4 in my case). do i need any other ports?

Don’t forward 8123, only your ssl port

Well that depends which port you are using ssl on.

Generally speaking, if you are using duckdns and nginx to remote into your HA instance, you only need to expose the SSH port you are using. DO NOT EXPOSE THE HTTP PORT. You lose security.

whats the actual traceback failure? SSL errors are not ones the app can solve but Google does offer some tips based on the actual error: https://developer.android.com/training/articles/security-ssl#CommonProblems

Some android devices can be picky than others, really depends on the CA’s the device already knows. Check the companion app logs for the actual failure then refer to the link above from Google on possible solutions.

How can I check the logs if I cant get into the app?

If you are getting an SSL error then the app provided messaging is correct, whats your actual error message in the pop-up?

For the logs its standard android logcat, you can use an app like logcat reader and grant the special permissions to read it.

Maybe try Cloudflare integration instead. I found it far more easy and works almost instantly without hassle of forwarding ports. See this video

1 Like

The message i get is

"failed to connect to home assistant.

failed to perform SSL handshake, please ensure your certificate is valid"

I have 3 devices that connect perfectly so changing to cloudflare wil make no difference.

The difference is, with Cloudflare you don’t have to setup your own SSL. They handle that for you. Also there’s no port forwarding involved

Did I set up my own SSL? I don’t remember doing that. Duckdns addon did that stuff didn’t it? Port forwarding is easy and has been working for over a year now.

True but the DuckDNS addon downloads the SSL with Let’s Encrypt to your machine, so it’s internally hosted.
Anyway, just trying to help and give a different option, which works very well for me (after trying DuckDns/nginx path also)

i don’t forward port 80, only 443 and 8123

that’s exactly the message i get too.

1 Like