I was running HAss through a dedicated port for a while. Now I’ve pulled my finger out and connected “hass” through nginx. It’s all resolving and accessible. However, I’m getting the “Connection lost. Reconnecting…” message permanently and not receiving updates without refreshing the page.
Any ideas on what might be causing this issue?
Could anyone share their nginx config to see if there’s anything missing?
It would probably be more help for you to share your Nginx config, and if you are trying to do SSL, your configuration.yaml entry for HTTP, etc. My setup will probably be very different from yours.
What is likely happening is that your page is cached in your browser. Try clearing your cache. You probably don’t have any traffic going through Nginx. Double check that your site is enabled (symlink from sites available), and that Nginx is actually running (on debian/rasbian that would be ‘systemctl status nginx’). If those are both good, check your /var/logs/daemon.log for Nginx Errors.
The upgrade line takes care of the websocket connection (which is responsible for the live update of the UI). So yes you need it. But the way it’s documented it didn’t work for me as well, so i just added another location for the socket path. ATM I’m on mobile so i can’t look it up, but press F12 in Cjrome or Firefox and have a look at the log
I’ll try to post my config when I’m home.
I’m Assuming your Nginx instance is on another box from your HASS instance? Otherwise you should be using localhost instead of the full IP.
You don’t need the second "proxy_buffering off;’ line.
I assume your “hass.mydomain.com” is a substitute for a real domain that exists and you have something on your network registering with DNS? This could be your issue likely.
tracert (windows) (traceroute for linux) your domain to see if packets are making it where you expect them to.
Do you have a mobile phone with data? Try accessing it from your phone with wifi turned off. If it works, you have to setup local DNS redirection on your router.
Hi guys,
I’m having a similar problem here with safari on an iphone6 having a “Connection error. Reconnecting…”
The frontend is not updating on “Safari”. It does how ever work for my Android and Windows devices.
Could you please take a look at my nginx.conf and point out any issues. Note I’m using client certificate authentication.
I have checked it against the guide in the HomeAssistant documentation.
I also have nginx authentication turned on instead of the built in HASS auth.
Unfortunately this is the issue. This is a long term bug that no one seems to be getting fixed in WebKit where web sockets don’t respond correctly to the need to authenticate, thus the issue would be present on iOS and macOS Safari both. I think it’s nuts it hasn’t been addressed by now…