I’m facing an issue connecting node-red-contrib-home-assistant-websocket to my Home Assistant. The logs show an entry, every 5 seconds
[info] [server:Home Assistant] Connecting to http://homeassistant:8123
My install is all managed with docker-compose, Home Assistant and node-red are in the same docker network. From either container I can ping/curl the other, but no matter what I’ve tried I don’t seem to be able to get node-red to connect to HA. If it matters, node-red happily connects to a MQTT server also running in the same docker network.
versions:
HA - 0.114.3
node-red - 1.1.3
node-red-contrib-home-assistant-websocket - 0.24.1
Have you created the server node and defined the long live token that NR needs to connect with HA?
I have the same setup (so not Supervised version but “independent” docker images) and you have to do this manually. I use the IP address of my host in the node definition (not the “private” docker one).
GV
Ok, thoroughly confused now, on a whim, I flipped my HA config node over to use “Legacy API Password” and deployed. Got an error in the logs, as expected. But when I unchecked that option and redeployed, it connected…
First thing to point out is you need to click “Deploy” in the top right after inserting HA details. I assumed clicking “done” was enough.
Second thins is a complete guess, but I feel like I needed to click “OK” to confirm the Long Life Token create (had it open so I could refer to it) and restart HA to get it working.
Also I have HA on host networking, so I had to use the host IP address.
That opens up a whole other host (terrible pun, I’m so sorry ) of issues in my network. My Docker host is responsible for a fair other number of workloads, running host networking just isn’t in the cards.
And, I actually figured it out, a setting I forgot to change, I had removed the ip_ban_enabled setting this afternoon, but hadn’t actually checked it till the evening. Checking in ip_bans.yaml indeed lists a docker network IP
I was banging my head against the wall with this last night. This makes absolutely no sense, but it worked. How can I create code to deploy if I can’t assign devices to nodes? It makes no sense! But all is well now that I clicked deploy on a flow with a single device node sitting in it. Thank you so much! I created an account just to say that… I don’t care that I am reviving this thread, since it is clearly still a hang-up that can happen today.