NodeRED connectivity issues

Hi. I’m triying to identify the cause of some connectivity issues I’m having to use NodeRED.

I can access NodeRED fine through http://homeassistant.local:8123/ and then clicking on the NodeRED icon on the left. This opens NodeRED “inside” the HA “dashboard” (the column on the left can be minimized but doesn’t disappear).
This works fine until I leave the tab looking for other stuff on the internet, and when I come back a couple of minutes later, the page refreshes.
This causes me to loose any undeployed changes, and also it opens on the first NodeRED tab, interrupting all my flow of thoughts…

I looked for solutions to this, and someone mentioned an alternative way of accessing NodeRED through port 1880 (http://homeassistant.local:1880/). This is great as takes less time to load, and also it has a different icon (which helps with many tabs open).
The problem I’m finding here is that after a couple of minutes of using it, I cannot deploy changes anymore, and this link doesn’t work anymore. To save the changes I made to the flow I have to either restart HA from a different tab (and then after restart I can deploy changes normally) or I have to select the nodes and export them, to paste them later when I manage to open it again.

Can anyone point me on how to troubleshoot this? From these two options with different problems, I would prefer to use the one with the separate port outside the HA dashboard.

Thanks,
Rodrigo.

EDIT: FYI, I’ve been having this issue since I started using HA/NodeRED a couple of months ago, I accepted every update that was available and nothing changed. I’m running HA on a VirtualBox VM on a Windows computer that is not being used at the moment for any other tasks, but it works as a file server with no issues.

NodeRED Current version: 13.5.3
Home Assistant 2022.12.0
Supervisor 2022.11.2
Operating System 9.3
Frontend 20221207.0 - latest

I also have had the same issues with nodeRED opening in the dashboard and refreshing when returning to the browser tab.

Now I right-click on the sidebar icon and choose “Open in a new Window”. Thankfully node-RED is one of the few apps/websites that isn’t limited to an arbitrary page width on my wide monitor screen :wink: so having two browser windows overlapping suits me. It does have the HA sidebar - but coming back to that window does not cause the automatic refresh that “open as a new tab” also suffers from.

Curious, I just tried port 1080, and http://192.168.1.98:/1080 does not work for me, but http://homeassistant.local:1880/ does. Added to my bookmarks now, thanks :slight_smile:

I have not experienced your second issue, and it does sound like a show-stopper :frowning:
FWIW, I’m using a RasPi 4 4GB running HAOS with Rhasspy voice assistant MQTT broker and node-RED all on the one machine.

Can you identify whether it’s Virtualbox slowing down, or the HA running inside it ? Is HA getting enough CPU and memory to run without swapping ?

Hi @donburch888! The VM has 2GB of RAM, and I’m not doing anything intensive, it always has more than 1GB of free RAM.

Everything else in HA keeps working fine, I can access the file browser or the dashboard without any issues. The only problem is with NodeRED.

Thanks :slight_smile:

Like yourself, I found screen refreshes to be a pain. Thank you for posting this information. It is much appreciated

I’m running an HA Blue. I’ll let you know should (when!) I run into the same problem as you.

Good!
I’ve been waiting for my HA Yellow to arrive, and the shippings are being delayed. As soon as I got the news that SmartThings is ending support for WebCoRE on dec 31, I started migrating everything to my provisional HA VirtualBox install. I hope migration is not a pain when I finally get the Yellow…

R.

I don’t think it will be. I migrated to HA Blue from an RPi 4. Started the HA Blue, copied config files from the RPi to the Blue. Rebooted and back in business.

1 Like

HA Yellow is great. I had mine since early October. They just incorporated “Matter” which brought many more items natively in to HA. I thought I have to dig into each different vendor’s integration for sensors data. But was surprised by it in the December update.

Now if I could get devices for American Power Meters and Water Meters without having to design, prototype from kits.

Your issues with refreshed of NodeRed is related to your browser setups.
You need to disable background sleep of inactive tabs and windows.
When the tab or window becomes inactive, then the browser puts it to sleep and when you return later then it request a full refreshbto get the changes that have occured during the sleep period.
Be aware that turning of the sleep can affect your performance on the computer with the browser, because all objects on the website will keep being active including ads and video elements.

Hi @WallyR, could you point me how to disable this in Chrome?
It’s interesting though that this refresh issue doesn’t happen at all when accessing NodeRED through the 1880 port ( http://homeassistant.local:1880/ ), I can leave the tab open in background and come back to it and it won’t refresh. This “way” of accessing NodeRED has other connectivity issues as I mentioned on my first post (deploying becomes unavailable even without ever changing focus to another tab/window).

It would be great to find a way to make the “inside-HA” verson of the NodeRED website behave as the one with the 1880 port and never refresh at all.

Thanks,
Rodrigo

Sorry, I am not sure how you do it on chrome.
I use Firefox and I can’t remember the setting I. Firefox either.

Well, I found a solution for the tab refreshing when opening Node-RED through the Home Assistant sidebar:

On the HA sidebar, click on your profile button (last button on lower left corner), disable “Automatically close connection”. This prevents the HA interface from disconnecting after 5 minutes of “being hidden” and seems to have solved this problem for me.

I still would like a way to use http://homeassistant.local:1880/ without it getting disconnected (different issue, not a reload problem, and doesn’t happen only when leaving the tab in background).

@donburch888 could you try using the 1880 port link? Is it working OK for you?

R.

Source: tab refreshes without warning causing loss of info · Issue #12200 · home-assistant/frontend · GitHub

Alas I have not been having a problem with node-RED refreshing when in its own window - with either the HA sidebar, or since you mentioned using http://homeassistant.local:1880/ Being a lazy sod I leave the browser window open - 1 day now - with no effect.

I also use Firefox (on Ubuntu, not the snap version) and remember on a couple of occasions trying to find the best setting in Firefox’s settings - but don’t remember what they were.

I note that my HA “Automatically close connection” is currently OFF - so that is probably the answer.

1 Like