Unable to connect to HASS
-
Seeing this error in MSR logs:
2021-07-29T02:01:27.663Z HassController:NOTICE HassController#hass attempting reconnection to ws://192.168.0.15:8123/api/websocket
2021-07-29T02:01:27.664Z HassController:NOTICE HassController#hass connecting via WS to ws://192.168.0.15:8123/api/websocket
2021-07-29T02:01:27.665Z HassController:WARN HassController#hass websocket error during open/negotation: Error: connect ECONNREFUSED 192.168.0.15:8123
2021-07-29T02:01:27.666Z HassController:NOTICE HassController#hass websocket to ws://192.168.0.15:8123/api/websocket closed during open/negotiation
2021-07-29T02:01:27.666Z HassController:WARN HassController#hass failed to connect/initialize communication: Error: connect ECONNREFUSED 192.168.0.15:8123On latest version of MSR. Also just installed HASS so it is latest as well.
config.yaml in HASS looks like this:# Configure a default setup of Home Assistant (frontend, api, etc) default_config: # Text to speech tts: platform: google_translate http: server_host: 0.0.0.0 websocket_api: sensor: platform: websocket_api group: !include groups.yaml automation: !include automations.yaml script: !include scripts.yaml scene: !include scenes.yaml
Using new LTAT. Have tried several new ones.
Any ideas on what is wrong?
-
Hi!
Are you using duckdns or something similar? Is you´re HA adress a HTTP or a HTTPS?
If you´re using duckdns and have a HTTPS adress, you have to change the following in the MSR config file:
instead of ws://192.168.0.15:8123, write wss://192.168.0.15:8123 (an extra 's') or if you have duckdns, write: wss://duckdns.yourname.org.
Don't forget the accesstoken...
Hopefully that helps! -
Thanks for the reply. I am not using duckdns or any thing similar. I assume that would be needed for off lan access which I don't allow. Am only using http as well so don't think wss is required.
-
Can more detailed logging be enabled?
-
There is mention in the docs.
http://your_reactor_ ip:8111/docs/Logging/#overview -
toggledbitswrote on Jul 31, 2021, 1:06 PM last edited by toggledbits Jul 31, 2021, 9:16 AM
Connection refused indicates a networking problem (or target app/service not running), and usually a more active one.
You can check the more passive side (routing) from the MSR host, by pinging from the MSR host to the IP of the Hass host. If that fails, you have a basic networking problem between the two. That's unlikely to be it with a connection refused, though.
More likely, you've got firewall issue on the Hass host (firewall is blocking external access to the port), or Hass itself is not fully configured and running (remember you have to restart after making configuration changes, and check the Hass logs for startup errors).
Taking MSR out of the equation, you should be able to use
curl
from the MSR host like this:curl -o - 'http://192.168.0.15:8123/api/config'
...and get a response of some kind, even if it's an authentication failure (e.g., code 401, which would show it can connect to Hass and Hass returns an error on the successful connection). If you still get no connection/timeout or a connection refused, then Hass isn't answering on the port for one reason or another, and you need to work that out before MSR (or anything else) can connect to it.
Edit: also, noticed in your Hass config, both of the lines beginning
platform:
should have-
(dash space) in front of them. Keep the indent, just insert dash followed by space where the "p" currently is:tts: - platform: google_translate # other stuff between omitted sensor: - platform: websocket_api
-
Hi Patrick,
When I run the curl command I get a 401: unauthorized response. Looking at documentation to see if I can figure out the LLAT syntax. -
Authentication issue. One would assume that the same will apply to all the URL's you're trying to access
C
-
Doh. Found an ID10t error. Had the wrong IP address in the Reactor config. I definitely have too many computers at my house.
-
@rogero said in Unable to connect to HASS:
Doh. Found an ID10t error. Had the wrong IP address in the Reactor config. I definitely have too many computers at my house.
I have a spreadsheet so I can recall WTF they all do and their IP addresses. Something of an issue when mostly stuff just works. Mostly. </Aliens>
C
-
-
4/10