Hi,
Is it possible to set the properties of a mqtt out node e.g. server name, port, protocol, username, password etc from a function in node red? Along the same line as msg.qos=2 and msg.retain=false and msg.topic="my/topic"
MikeyMikey:
Is it possible to set the properties of a mqtt out node e.g. server name, port, protocol, username, password etc from a function in node red
yes.
From the built in help...
Demo...
The dynamic connection does not overwrite fields. It simply connects to the broker specified in the msg you send.
You just add a broker (with any settings you like) and set it to NOT auto connect
[image]
then you send the appropriate msg to set up and connect.
Here is a working demo...
[mqtt-dyn]
[{"id":"a7f43be0a40d080b","type":"mqtt out","z":"8afdb9e0485c9da7","name":"mqtt out","topic":"","qos":"0","retain":"false","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","…
Thanks Steve-Mcl, much appreciated.