I have recently came across an issue with the MQTT nodes on node Red.
Randomly the mqtt node will disconnect requiring a restart or reboot of Node Red- I was wondering if this has to do with the keep alive time or if its something else but similar?
Could you explain what you mean by a local broker? The AWS broker we have is online, so we submit everything via lan to a router which speak to the aws server on line?
I assume the connect reconnect command is on node red, does the mqtt node also tell me when it disconnects?
I mean local to your node-red (i.e. mosquitto installed on the same server or a device on your LAN - e.g NOT AWS)
Yes, you would issue a msg to an MQTT node, formatted to tell the node-red client connection to the broker to connect/disconnect (which you can of course automate)
Yes, you can cpature the status of a node using a status node. Therefore you can point a status node at an MQTT node & it will send a message everytime the status of that node changes (essentially providing you with a means to understand the state of the MQTT connection & therefore a means to automate a reconnection)
May I ask if the keep alive function on the mqtt node would do anything? I was thinking perhaps the mqtt is timing out due to inactivity hence the keep alive could improve it?
I had a Tasmota MQTT configured device which had a bad connection to the 230V supply, it was going on and off many times a day (in batches) due to the intermittent connection. The Node-RED MQTT connection always reconnected.
The MQTT device was installed before April 2020, not sure which version of Node-RED, but this was well before V2 was released, and I had seen no problems. As to the intermittent connection, not sure when that began as I only started tracking the connections last September, and that was for a completely different reason. It was only when I created this flow that I found the problem.
Okay , I gathered that, however checking in the palette there doesn`t seem to be a latest node that is capable of this - do you have any node package suggestions? Thank you.