NODE-RED et Mosquitto déconnection

I made a water leak detection system for the house which uses a Raspberry PI 3 B + as the server on which NODE-RED and Mosquitto are installed. This system communicates with 5 Wemos D1 Mini via WIFI network.
The problem is that NODE-RED disconnects several times a day from the MQTT Mosquitto broker and does not restart afterwards.
I have to disconnect my raspberry PI each time and restart my applications. Each Wemos D1 Mini has a different name to avoid conflicts.
NODE-RED V0.18.4
NODE-JS V4.8.2

Did someone experience a similar problem? ..... Thanks in advance

I don't think so, it should be 8.x, 10.x or 12.x. Can you post the startup log when you run
node-red-stop
node-red-start
After it fails run can you connect to mosquitto using mosquitto_sub or mqtt_explorer (or another client).

It certainly could be Node 4.x running Node-RED 0.18 - that was a perfectly valid combination and if the Pi hasn't been updated for some time, then they would be running these older levels.

@stepg We haven't had similar reports of issues with the MQTT nodes - although as you have seen, you are on quite an older version of Node-RED.

Do you have any logs from Mosquitto to give any hints as to why it is disconnecting?

Thank you 2 for your answers.

After verification, it is really these versions which are indicated in the logs from NODE-RED. Do you think I should install the latest version of NODE-RED on my Raspberry?
In addition, can a simple loss of the wifi network cause this problem? I cannot consult any logs after the crash because the Raspberry PI is frozen.

You said initially that node red disconnects from the mosquitto server, which is running on the same Pi as node-red. Now you tell us that actually the Pi has crashed, but also ask if this could be caused by wifi loss.
It is important to know what is actually happening. If the pi is really crashing then it could well be a power supply issue, but if it is just the wifi dropping out then it could be many things.
Are you able to tell what is actually happening?

I know what I said.
However, this is what is happening. The few times I have been able to consult the NODE-RED terminal, it is written that there has been a loss of communication with the broker on port 1883. For the other times I cannot see anything because the PI is frozen and I am in the obligation of
close the PI power supply and restart it. It is not a power supply problem. I wondered afterwards if a loss of the WIFI internet network could lead to this problem.
I updated the version of NODE-RED and so far it seems to be working, but it is too early to conclude.

How do you know that the pi has frozen?
How do you know the freeze is not a power supply issue. The most common causes of complete freeze are poor quality SD cards and power issues, in my experience.
When you run a terminal is that on the pi itself or are you reliant on a connection to it?
Losing WiFi will not stop node red communicating with a mosquito server on the same pc, provided you referenced it as localhost.

I know that the PI is frozen because it no longer reacts to the mouse and the keyboard.
For supply, I have the one recommended by Raspberry and supplied with it.
For the SD card it is difficult to know if it is of good quality.
For the internet signal, you are right since the broker and NODE-RED are local on the same raspberry. It's logic.
Since the installation of the new version of NOED-RED, it seems to work well and the problem is not reproduced.

Thanks for taking the time to respond.

The most important things are that it is branded with a well known name, and bought from a reputable supplier. If when you bought it you thought that it was a good deal then it may well be a fake branded, or just a cheap unbranded, card.

Upgrade to latest to save yourself and others trying to help a lot of problems and uncertainties

Yes I think that the problem is solved since my new version because no more crash.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.