I'm having what appears to be stability problems with the MQTT_out node. I have two issues:
My flow appears to work and then at some point it loses connectivity (the green indicator turns red) and of course the flow ceases to work. If I make the slightest change, like adding a space in a comment line in an associated function node and "deploy", it connects and works again??
The MQTT node show that it's connected (green indicator) but messages are neiher sent nor received.
To fill in the picture, I'm trying to connect to a Shelly-1, which I have enabled for MQTT pointing to my pi IP_Add:1883. If I check the MQTT log I see that the Shelly1 is connected.
I've used both modified flow and full deploy. Keep in mind that it sometimes works.
Node.js is V14.21.3 and NodeRed is: node-red V3.0.2 on linux 5.15.84
'''pi@wrapit-hub:~ $ node-red start
31 Jan 22:21:45 - [info]
Welcome to Node-RED
31 Jan 22:21:45 - [info] Node-RED version: v3.0.2
31 Jan 22:21:45 - [info] Node.js version: v14.21.3
31 Jan 22:21:45 - [info] Linux 5.15.84-v7+ arm LE
31 Jan 22:21:46 - [info] Loading palette nodes
31 Jan 22:21:52 - [info] Dashboard version 3.6.5 started at /ui
31 Jan 22:21:53 - [info] Settings file : /home/pi/.node-red/settings.js
31 Jan 22:21:53 - [info] Context store : 'default' [module=memory]
31 Jan 22:21:53 - [info] User directory : /home/pi/.node-red
31 Jan 22:21:53 - [warn] Projects disabled : editorTheme.projects.enabled=false
31 Jan 22:21:53 - [info] Flows file : /home/pi/.node-red/start
31 Jan 22:21:53 - [info] Creating new flow file
31 Jan 22:21:53 - [warn]
Your flow credentials file is encrypted using a system-generated key.
If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.
You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
31 Jan 22:21:53 - [warn] Encrypted credentials not found
31 Jan 22:21:53 - [error] Uncaught Exception:
31 Jan 22:21:53 - [error] Error: listen EADDRINUSE: address already in use 0.0.0.0:1880
at Server.setupListenHandle [as _listen2] (net.js:1331:16)
at listenInCluster (net.js:1379:12)
at doListen (net.js:1516:7)t`
at processTicksAndRejections (internal/process/task_queues.js:83:21)'''
I had a problem with Node-red continually disconnecting from Mosquitto.
I don't know if it's the same as your issue but I was on Node-red 3.0.2, the problem went away with NR 3.1.
Oh, look, you are on 3.0.2!
Your node.js is out of date, your Node-red is out of date and your Linux is out of date.
Your Mosquitto might be out of date too - mine is 2.0.11 but I'm not sure if that's up to date either
You could update the OS with sudo apt update && sudo apt -y full-upgrade, then re-run the NR installation script to update node.js and Node-red.
Alternatively get a new uSD card, burn the latest RPiOS 64 bit, install Node-red, Mosquitto and any other services then transfer your flows.
You did not run node-red-stop first to stop node-red. It fails to start up again because the current one is using the port. Stop it then start it again so we can see the mqtt messages.
Yes, I realise that an update is well overdue but this system is part of an existing installation with one purpose only; to run the nodered environment to control monitor a few devices. There was no need for an upgrade (if it aiIt' broke ...) and it's been working fine with no problems but this new flow has been giving me grief. I will do an upgrade but first would like to understand what's been going on. The MQTT flow was working at som point and the green indicators show that's it's connected to the broker ???
Yes Jbudd, I do fully agree. I was hoping that someone might be able to see something that I've missed. It's strange when a flow works and then just doesn't. I'm hoping someone might spot something stupid that I've done.
There is something really STRANGE happening here.
My debug messages are disappearing; I mean they just remove themselves from the debug screen one at a time. I've never seen this before.