I am using the MQTT IN and OUT nodes for different tasks. The most complicated thing is to identify, why a node can't subscribe or send.
Sending by an ivalid topic or bad Client ID result in a disconnect. Since in the WATCH node I receive the "connect/disconnect" events, I see, that there is something - but I don't see why.
Is there a way to get more informations, why a node disconnects than this? {"status":{"fill":"red","shape":"ring","text":"node-red:common.status.disconnected","source":{"id":"77f5b7fb.eff5a8","type":"mqtt out","name":"MQTT Local Mosquitto"}},"_msgid":"ffbd525c.1a32e8"}
And also if I put a wrong server / credentials to the subscription I get a connecting event ...
{"status":{"fill":"yellow","shape":"ring","text":"node-red:common.status.connecting","source":{"id":"77f5b7fb.eff5a8","type":"mqtt out","name":"MQTT Local Mosquitto"}},"_msgid":"ffbd565c.2e55e8"}
I like robust and speaking diagnosis for IT products - so I think, it would be worth investigating this issue. Actually it's pretty hard to tell, whats wrong. I would like to wheather send me a mail or post it into ELK Diagnosis to make it easy to maintain.
If you have two clients with the same client id then they will keep disconnecting as only one can connect at a time. Either make sure they are unique or leave them blank.
Sending an invalid topic should not cause a disconnect.
@Colin .... yes I found this already as one reason. Blanking them is with our broker not possible, since our IT implemented some rules (<23 chars, no "-" and so on ...).
Another are reboots of server and changing firewalls. Since my NodeRED is 4 networks away from the broker, there can be a lot of reasons for problems. Anyway, as knolleary said, MQTT in this version does not support feedback.
The Client ID still exists in the broker config doesn't it? As I understand it @lostbits problem is that his IT department enforces rules on the client ID so he can't leave it blank, and wants to set it up dynamically rather than at config time.