I don’t understand why this is so difficult. After starting my HA journey with a shinny new RaspPi4 mid-2019 I’ve spent countless hours trying to make a few simple home devices work nicely together but mainly have wasted hours troubleshooting my HA installation.
My initial goal was to remove Alexa and Google smart devices for total local control of a few light switches and a couple Sonoff relay boards. 4 years later my Google Home integrations are much more reliable and accessible.
As an electrical technologist, I consider myself well above the average ‘computer savvy’ user, I understand IPv4 networking and yet trying to get and keep a stable connection to my HA server has been a struggle, especially the local connections.
Initially I had followed guides to setup, a dynamic DNS (duckDNS with Lets’ Encrypt). It’s hacky but it worked for a while. The tradeoff was loosing easy http local access. I used another guide to open a Google developer channel to use google assistant to interact with some HA devices. It isn’t very reliable. I’ve since purchased a handful of other smart devices and created some others with ESP uCs, ESPHome, Tasmota. and I’m a NubaCasa subscriber. Each device has it’s own stability challenges but again the biggest hurdle is local connections to HA.
There must be some setting hidden away in some YAML file, I changed at some point because trying to connect via a web browser is brutal. Sometime one browser works and other don’t, sometimes I need to use different devices. I’ve changed my router, reverted any port forwarding I had setup. The local-IP:8123 works sometimes but not others, the duckdns worked sometimes, I installed the certificate. I can ping the HA server reliably. The homeassisant.local dns address doesn’t usually work. Private browser window does work sometimes.
The HA android app seems to reliably connect but that is likely because of Nubu subscription.
Out of desperation I’ve removed the cert.pem from the configuartion.yaml and reverted back to http only.
Reverse Proxy and other solutions seem just as hacky but even more complex.
If you are a Nabu Casa subscriber you don’t need DuckDNS for remote access. This has the advantage of retaining http access locally too.
I wrote a Community Guide on moving from DuckDNS to Nabu Casa. Go through the checklist and make sure you have completed it all: Switch from DuckDNS to Nabu Casa
I’m not sure this is a good WTH subject? It seems something related to your specific setup, since there are a million users without these problems. Surely there’s a way to fix it and the community might be able to help.
I know I had local connection problems before, and I tried a bunch but in the end I got a different router (for other reasons) and that solved the problem. The networking is weird sometimes, in my case I could sometimes reach the instance through a browser, even on my phone, but not through the companion app despite using the same URL. I didn’t have my instance exposed to the outside world at that time, so there was only a internal URL.
For example, if you had a duplicate IP address problem you would get these same symptoms.
Ping to the duplicated host would always work because something would always respond, not necessarily the thing you wanted. Ping being stateless you could not tell without digging into link layer headers. On the other hand, TCP connections would randomly fail because they require reaching the correct host. Or ping from the duplicated host to the client - sometimes the client response would go elsewhere.
It was more of a rant then anything, and not necessarily a HA problem. I’ve read a lot of posts on here regarding local access issues, many unresolved or without reply. Totally agree it’s probably something unique in my network but it’s only my HA server which seems to work sporadically.
The main complaint is if you want local security (or to be able to access the HA server from outside your network without VPN or Nubu Casa sub) you don’t much have choice but to deal with installing and maintaining certificates.
I’ve removed the certificates from my config.yaml and am now using http connections locally, things are working smoothly.