No Autocompletion/Connection to Homeassistant

Hi,
currently I am facing an issue which make it impossible to edit existing flow´s or create new ones.
The websocket connection to homeassisant doesn´t seem to be working, I assume, because on the call service node, the domains/services etc are not loaded:

And in the background this is happening (don´t know if it has to be like this):

The problem is, I don´t know when it stopped working - I´ll always try to keep everything updated and seem to have missed something.

Upon start of the Add-On, the log doesn´t seem to provide anything suspicous:

8 Nov 11:15:28 - [debug] red/nodes/flows.start : starting flow : 09ea1da58b76c19b
8 Nov 11:15:28 - [debug] red/nodes/flows.start : starting flow : 43a9260d5b033349
8 Nov 11:15:28 - [debug] red/nodes/flows.start : starting flow : e043d801b88fdaac
8 Nov 11:15:28 - [debug] red/nodes/flows.start : starting flow : 37ae1fbcc9c80610
8 Nov 11:15:28 - [debug] red/nodes/flows.start : starting flow : f39c4ace3960891e
8 Nov 11:15:28 - [debug] [server-state-changed:BWM Treppenhaus] instantiated node, name: BWM Treppenhaus
8 Nov 11:15:28 - [debug] [server-state-changed:BWM Diele] instantiated node, name: BWM Diele
8 Nov 11:15:28 - [debug] [api-current-state:531c4eb920d6b6a6] instantiated node, name: 
8 Nov 11:15:28 - [debug] [api-current-state:ef5aeba045550551] instantiated node, name: 
8 Nov 11:15:28 - [debug] [api-call-service:Licht Diele aus] instantiated node, name: Licht Diele aus
8 Nov 11:15:28 - [debug] [api-call-service:Licht Diele] instantiated node, name: Licht Diele
8 Nov 11:15:28 - [debug] [api-call-service:Rollladen EG hoch] instantiated node, name: Rollladen EG hoch
8 Nov 11:15:28 - [debug] [api-call-service:SChreibtisch an ] instantiated node, name: SChreibtisch an 
8 Nov 11:15:28 - [debug] [api-call-service:a4aa215a2beae2a3] instantiated node, name: undefined
8 Nov 11:15:28 - [debug] [api-call-service:MorgenRoutine zurücksetzen] instantiated node, name: MorgenRoutine zurücksetzen
8 Nov 11:15:28 - [debug] [inject:4 Uhr morgens] crontab = 00 04 * * *
8 Nov 11:15:28 - [debug] [api-current-state:Morgen Routine ausgeführt?] instantiated node, name: Morgen Routine ausgeführt?
8 Nov 11:15:28 - [debug] [api-call-service:Spiele NJOY] instantiated node, name: Spiele NJOY
8 Nov 11:15:28 - [debug] [api-call-service:Morgen Routine true] instantiated node, name: Morgen Routine true
8 Nov 11:15:28 - [debug] [server-state-changed:Switch betätigt] instantiated node, name: Switch betätigt
8 Nov 11:15:28 - [debug] [api-call-service:Unterbauleuchten] instantiated node, name: Unterbauleuchten
8 Nov 11:15:28 - [debug] [api-call-service:Unterbauleuchten] instantiated node, name: Unterbauleuchten
8 Nov 11:15:28 - [debug] [api-call-service:255c69b6e6ee1858] instantiated node, name: undefined
8 Nov 11:15:28 - [debug] [api-call-service:7b45f84e4216490c] instantiated node, name: undefined
8 Nov 11:15:28 - [debug] [api-current-state:PV Batterie > 20%] instantiated node, name: PV Batterie > 20%
8 Nov 11:15:28 - [debug] [api-call-service:Heizung AN] instantiated node, name: Heizung AN
8 Nov 11:15:28 - [debug] [api-call-service:Heizung AUS] instantiated node, name: Heizung AUS
8 Nov 11:15:28 - [debug] [api-current-state:Heizung auf Auto] instantiated node, name: Heizung auf Auto
8 Nov 11:15:28 - [debug] [api-current-state:Heizung auf Auto] instantiated node, name: Heizung auf Auto
8 Nov 11:15:28 - [debug] [server-state-changed:Aktueller Bezug > 500] instantiated node, name: Aktueller Bezug > 500
8 Nov 11:15:28 - [debug] [poll-state:PV Leistung > 600] instantiated node, name: PV Leistung > 600
8 Nov 11:15:28 - [debug] [api-current-state:PC An ? ] instantiated node, name: PC An ? 
8 Nov 11:15:28 - [debug] [server-state-changed:Aktueller Bezug < -300] instantiated node, name: Aktueller Bezug < -300
8 Nov 11:15:28 - [debug] [api-current-state:Heizung auf Auto] instantiated node, name: Heizung auf Auto
8 Nov 11:15:28 - [debug] [api-call-service:a041ebf088797b50] instantiated node, name: undefined
8 Nov 11:15:28 - [debug] [server-state-changed:579c66e38a2bdb50] instantiated node, name: 
8 Nov 11:15:28 - [debug] [api-call-service:bebe0755b258c659] instantiated node, name: undefined
8 Nov 11:15:28 - [debug] [server-state-changed:Briefkasten Kontaktsensor] instantiated node, name: Briefkasten Kontaktsensor
8 Nov 11:15:28 - [debug] [api-call-service:b47d67a909c28461] instantiated node, name: undefined
8 Nov 11:15:28 - [debug] [server-state-changed:Rollladen OG ] instantiated node, name: Rollladen OG 
8 Nov 11:15:28 - [debug] [api-call-service:Alle Lichter im OG aus] instantiated node, name: Alle Lichter im OG aus
8 Nov 11:15:28 - [debug] [api-current-state:Wenn die Sonne über dem Horizont steht] instantiated node, name: Wenn die Sonne über dem Horizont steht
8 Nov 11:15:28 - [debug] [api-call-service:123b87844a10ae58] instantiated node, name: undefined
8 Nov 11:15:28 - [debug] [server-state-changed:Briefkasten Tür geöffnet] instantiated node, name: Briefkasten Tür geöffnet
8 Nov 11:15:28 - [debug] [api-call-service:Anzeige zurücksetzen] instantiated node, name: Anzeige zurücksetzen
8 Nov 11:15:28 - [debug] [api-call-service:Lichter Flur/WZ aus] instantiated node, name: Lichter Flur/WZ aus
8 Nov 11:15:28 - [debug] [api-call-service:TV Stromlos] instantiated node, name: TV Stromlos
8 Nov 11:15:28 - [debug] [server-state-changed:Energieverbrauch des TVs <40W für 5 Minuten] instantiated node, name: Energieverbrauch des TVs <40W für 5 Minuten
8 Nov 11:15:28 - [debug] [api-call-service:Panel aus] instantiated node, name: Panel aus
8 Nov 11:15:28 - [debug] [inject:3ddd39216290ce77] crontab = 00 07 * * *
8 Nov 11:15:28 - [debug] [api-call-service:Wallpanel & Lichter an] instantiated node, name: Wallpanel & Lichter an
8 Nov 11:15:28 - [debug] [api-call-service:0f2f3cbacf6af928] instantiated node, name: undefined
8 Nov 11:15:28 - [debug] [api-call-service:Lichter Küche Aus] instantiated node, name: Lichter Küche Aus
8 Nov 11:15:28 - [debug] [flow:43a9260d5b033349] not starting disabled node : 5baca957548002f7
8 Nov 11:15:28 - [debug] [api-call-service:92a8edfa9ccf6bbb] instantiated node, name: undefined
8 Nov 11:15:28 - [debug] [api-current-state:02d99352c4e6ec0a] instantiated node, name: 
8 Nov 11:15:28 - [debug] [api-call-service:13bf7600898b76ed] instantiated node, name: undefined
8 Nov 11:15:28 - [debug] [api-call-service:Zeige schlafsymbol auf der SmartClock] instantiated node, name: Zeige schlafsymbol auf der SmartClock
8 Nov 11:15:28 - [debug] [api-call-service:731594b27c2fb6df] instantiated node, name: undefined
8 Nov 11:15:28 - [debug] [api-call-service:SmartClock Display An] instantiated node, name: SmartClock Display An
8 Nov 11:15:28 - [debug] [server-state-changed:BWM im Treppenhaus] instantiated node, name: BWM im Treppenhaus
8 Nov 11:15:28 - [debug] [api-call-service:b7d01346b7673a5d] instantiated node, name: undefined
8 Nov 11:15:28 - [debug] [api-call-service:SleepDisplay entfernen] instantiated node, name: SleepDisplay entfernen
8 Nov 11:15:28 - [debug] [server-state-changed:ae909fbc4a3b4e4b] instantiated node, name: 
8 Nov 11:15:28 - [debug] [api-call-service:becf1c543d63ee88] instantiated node, name: undefined
8 Nov 11:15:28 - [debug] [api-call-service:da9c743b6cde517c] instantiated node, name: undefined
8 Nov 11:15:28 - [debug] [api-current-state:9e71dcf909cc0647] instantiated node, name: 
8 Nov 11:15:28 - [debug] [server-events:iOS Event received] instantiated node, name: iOS Event received
8 Nov 11:15:28 - [debug] [api-call-service:Verfügbar Schalten] instantiated node, name: Verfügbar Schalten
8 Nov 11:15:28 - [debug] [api-call-service:Ist Ok Schalten] instantiated node, name: Ist Ok Schalten
8 Nov 11:15:28 - [debug] [api-call-service:Nur wenn Wichtig Schalten] instantiated node, name: Nur wenn Wichtig Schalten
8 Nov 11:15:28 - [debug] [api-call-service:Nicht Stören Schalten] instantiated node, name: Nicht Stören Schalten
8 Nov 11:15:28 - [debug] [poll-state:7eb587801ab80496] instantiated node, name: 
8 Nov 11:15:28 - [debug] [api-call-service:Screens Entfernen] instantiated node, name: Screens Entfernen
8 Nov 11:15:28 - [debug] [api-call-service:TEMPLATE zum kopieren] instantiated node, name: TEMPLATE zum kopieren
8 Nov 11:15:28 - [debug] [server-state-changed:Verfügbarkeitsstatus hat sich geändert] instantiated node, name: Verfügbarkeitsstatus hat sich geändert
8 Nov 11:15:28 - [debug] [api-call-service:Setze Screen] instantiated node, name: Setze Screen
8 Nov 11:15:28 - [debug] [poll-state:6d8b0568d3432705] instantiated node, name: 
8 Nov 11:15:28 - [debug] [flow:f39c4ace3960891e] not starting disabled node : 52e1d33f19f33ab4
8 Nov 11:15:28 - [debug] [api-call-service:Setze Alert] instantiated node, name: Setze Alert
8 Nov 11:15:28 - [debug] [api-call-service:SingleMode Icon mit mit DisplayText] instantiated node, name: SingleMode Icon mit mit DisplayText
8 Nov 11:15:28 - [debug] [server-state-changed:cbfd37be60f9c752] instantiated node, name: 
8 Nov 11:15:28 - [debug] [api-call-service:Zeige Solarbatterieladung an] instantiated node, name: Zeige Solarbatterieladung an
8 Nov 11:15:28 - [debug] [poll-state:Restmüll] instantiated node, name: Restmüll
8 Nov 11:15:28 - [debug] [api-call-service:Alerts verstecken] instantiated node, name: Alerts verstecken
8 Nov 11:15:28 - [debug] [inject:50b96aee7a7f2702] repeat = 60000
8 Nov 11:15:28 - [debug] [api-call-service:Uhrzeit anzeigen] instantiated node, name: Uhrzeit anzeigen
8 Nov 11:15:28 - [debug] [api-current-state:31c597735f154d53] instantiated node, name: 
8 Nov 11:15:28 - [debug] [poll-state:Alpapier] instantiated node, name: Alpapier
8 Nov 11:15:28 - [debug] [poll-state:Gelber SAck] instantiated node, name: Gelber SAck
8 Nov 11:15:28 - [debug] [poll-state:c8b4417e94c04a9c] instantiated node, name: 
8 Nov 11:15:28 - [debug] [poll-state:3ff132ca2261a7bf] instantiated node, name: 
8 Nov 11:15:28 - [info] Started flows
[11:15:28] INFO: Starting NGinx...
8 Nov 11:15:33 - [info] [server:Home Assistant] Connecting to http://supervisor/core
8 Nov 11:15:33 - [info] [server:Home Assistant] Connected to http://supervisor/core
8 Nov 11:15:33 - [debug] [server:Home Assistant] States Loaded
8 Nov 11:15:33 - [debug] [server:Home Assistant] Integration: loaded
8 Nov 11:15:33 - [debug] [server:Home Assistant] Services Loaded
8 Nov 11:15:33 - [debug] [server:Home Assistant] HA State: running

Anyone got a suggestion where to look ?

Make sure all your pallets in Node Red are up-to-date.
Make sure that your HA addon is up to date.
Remember to restart Node Red and not just HA Core.

Hi, thanks for the reply.
Cross checked everything, for me it looks good:


s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting
-----------------------------------------------------------
 Add-on: Node-RED
 Flow-based programming for the Internet of Things
-----------------------------------------------------------
 Add-on version: 15.0.0
 You are running the latest version of this add-on.
 System: Ubuntu 22.04.2 LTS  (amd64 / qemux86-64)
 Home Assistant Core: 2023.11.1
 Home Assistant Supervisor: 2023.10.1
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
Log level is set to DEBUG
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-nginx: starting
s6-rc: info: service init-customizations: starting
s6-rc: info: service init-customizations successfully started
s6-rc: info: service init-nodered: starting
s6-rc: info: service init-nginx successfully started

Yeah, add-on restarted, vm restarted, browser cache deleted, tried new browser, through reverse proxy with valid cert, tried through local IP etc…

Don’t forget the Node-RED Companion (integration).

That is the bit that sits inside HA and does the talking back to Node-RED. I update mine manually, and a recent update to NR and to the websocket nodes caused an issue as the companion needed updating also.

https://github.com/zachowj/hass-node-red

This is now v3+, and I guess that anything below 3 will not work too well with the latest NR and websocket nodes.

Edit: there is also a warning on the Companion V3 release that it requires HA nodes 0.57+ and won’t work with older, so updating NR, HA nodes, and companion is best done all together.

Thanks, checked it, it´s all up to date …

Reinstall first the integration and if that does not work, then make a backup of the Node Red addon and reinstall it too.
I am not sure a backup is really necessary, but just to be safe.

Reinstalled the Add-on but it didn´t help.
What bugs me the most, is, that there are no hints whatsoever could be wrong…

The existing flow´s are running without any problem …

What I find interesting is the part from the add-on log:

System: Ubuntu 22.04.2 LTS (amd64 / qemux86-64)

Are you running a supervised installation based on Ubuntu?

If so, Ubuntu is not supported as an OS, I know of other add-ons that also have problems connecting to APIs via the supervisor (incl. core websocket access).

Youre right, running supervised installation on Ubuntu.
I´ll try to move it today to a different installation :slight_smile:

1 Like

So, I´ve moved my installation to HAOS and after restoring the backup I still got the same issue.

What I just tried:
I´ve removed the whole node-red config directory and started from scratch, but this didn´t helped either.

I´ve drilled down the issue a bit further:

When accessing HA through my public domain and then loading node-red UI via ingress → doesn´t work.

When accessing HA through the internal IP and then loading node-red UI via ingress → doesn´t work.

When accessing node-red directly via :1880 → works…
WSS is connected instantly and there seems to be no issues at all.

For me this is kind of ok, because I just use it once in a while, but it bugs me that it isn´t working as intended/expected.

Thank god, somebody else!

I have been facing this same issue for MONTHS, I have two issues open on Github one against the HA addon and one against the Node-Red Palette. Had to recreate the one against the addon as I was piggybacking someone else who just up and went I’:

Out of curiosity I saw you mentioned Reverse Proxy/Local IP, do you use the below options in your HA config?

http:
  use_x_forwarded_for: true
  trusted_proxies:
    - x.x.x.x

I am wondering if this is something to do with handling of the X-Forwarded-For header value?

Hi, yes I´m using it and it worked always properly…

Short update on this story.

While using Node-Red directly via the :1880 worked for a while, I´ve had issues deploying updated configs, it always resulted in a timeout.

So I started creating/editing the nodes via :1880 , then copying the config, and pasting it in node-red via ingress… so annoying …

I´ve just spun up a seperate node-red container, migrated everything and have no more at all…

So in case somebody else stumbles upon such issues, try it with a standalone container before spending hours of troubleshooting.

So I had the same problem after updating my Home Assistant.
After updating all addons and integrations (including NodeRED Companion), restarting, rebooting multiple times the problem persisted.
For me it simply got fixed by ‘Reloading’ the NodeRED Companion integration. I would have thought that this would happen with a restart or reboot but I was wrong.

That’s the exact point I was missing. Cheers man!
Holy cow…3 hours of reboots, changing the HA config Node within NodeRed, trying to connect to HA. It sort of connected in very short iterations but instantly lost connection again, lagged, didn’t work stable. The ONLY hint I got from the log was, it kept saying the “integration was not loaded”. That puzzled and concerned me and made clear, something was missing. I just didn’t have a clue which integration it was talking about^^

→ It was asking for the HACS integration. Great. I installed it, rebooted. No success. Damn.
And then I re-read your post and thought…ahm…let’s check the classic HA integrations. And oh I was surprised to find this missing piece in my puzzle (which I had just added via HACS but just didn’t think of it). Activated it, restarted the NodeRed add-on. Aaaaand: woho! It just worked as I am used to, stable and without increasing the CPU load again.

BTW: I was having a fresh install of NodeRed, making it extra frustrating as I never had the issue before.

Let’s sum up:

  1. Install NodeRed Addon if it doesn’t exist already
  2. Install HACS Component if not done already
  3. Configure the matching HA integration under Settings → Devices & Services, search for NodeRed, click configure, done.
  4. Last step: restart NodeRed Addon - have fun!

Make sure, the HA config Node in NodeRed is configured correct and you are all set.