Node-Red "Connection Lost"

A test? what test...

I assumed @Safety147 is having the intermittent "disconnected" notifications on the editor. That is often caused by Node-RED crashing and restarting all the time? By the look of the log it doesn't seem so though...

Not a test, but reinstalling Raspbian without the MQTT and password activation

Yes, that's my problem. The logs don't report any problems. I will try a new installation of Raspbian without putting a password and without MQTT.

I don't think they could be the issue here. Do you have a firewall in between that could somehow be causing some issues? Or is the Raspberry on wifi, and if it is, is the connection stable?

Have you read this thread which I believe is about a similar issue Node-red connection lost in google chrome? Perhaps suggestions there could be of help.

No, I didn't install a firewall or antivirus for RPI. I don't have a proxy server either.

Yes, I have seen this post but not having an antivirus it does not apply to me.
The problem is on all my web browsers: Safari, Edge Chromium, Chrome and Firefox :frowning:
Could the problem be the flows I created on Node-Red?

It is possible if they are doing heavy processing, to cause the update back to the browser to be delayed.

Do you have any loops or heavy computation going on in your flows? Working with large images perhaps? Or is the node-red device cpu usage very high?

I'm reading temperature readings on three probes:
1 DHT22 and 2 DS18B20.
The readings are taken every second with the use of the Broker Mosquitto to have a 24 hour history.
I also use the "SMS Free" node to send SMS in case of too low or too high temperature.
Being a new user of Linux and Node-Red, I surely made the system heavier!

I also have a question about my method of installing Node-Red. I use this script found on a tuto : bash <(curl -sl https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)
What do you think?

Surely temperature cannot fluctuate much in 1 second?

Have you tried reducing this to say 30s?

Also, you say 24h history? Where is this historical data saved? In context? 3x60x60x24 == 259200 data points. Are you transmitting these somewhere? Perhaps to a dashboard chart?

That script is the recommended install method for RPI/Ubuntu so I wouldn't be looking there just yet.

I'll test this.

The data is retrieved via Mosquitto so saved on my RPI and visualized on the Node-Red dashboard.

Well if you are sending that amount of data to dashboard every second OR trying to visualise more data than actual pixels, you're asking for trouble :wink:

I overestimated the capabilities of the RPI :wink:
I'm going to lower all this to reduce disk and memory accesses.
I reinstall the system and test without Mosquitto.
Thanks for your support :wink:

Mosquito will be fine. As Steve said it'll be the amount of data you are trying to chart. I'd say once a minute would still be more than enough.

I just reinstalled RPI and Node-Red.
I haven't installed Mosquitto yet (I'll do it step by step to make sure I'm not the one installing the different applications wrongly).
Knowing that these are probes to calculate the temperature of a terrarium, I need accurate data and therefore refreshed frequently. I will test with 30 seconds for now.

Thanks for your support :wink:

1 Like

Measure as often as you like (and then act/control) . Just send to the chart every minute :slight_smile:

1 Like

There was no need to do that, this is not Windows.

4 Likes

All good practise though. I often do same, install an app. Install lots of extra stuff that people “helpfully” suggest on forums until I get it working. Then restart clean and only follow the path that worked.

True, but here we haven't got to the point of getting it working yet.