How to set the default values of MQTT In and Out Nodes to known broker addresses and ports on node-red start up?

Thanks for this. I will try this and report back to this thread. I am aware of Dynamic Connections in MQTT based on Dynamic MQTT node's "actions->connect" guidance needed - #2 by Steve-Mcl

So based on your suggestion, and if I understand it correctly, if I pack the function (or even a change node as mentioned in the thread above) with a dynamic subscription MQTT in a subflow, it can then be made available as _node_itself for the end user?

Edit

as mentioned by @bakman2 I created a pair of subflows for each mqtt broker (4 in total)

  • internal mqtt broker in node
  • internal mqtt broker out node
  • external mqtt broker in node
  • external mqtt broker out node

This make it easier for me to drag-and-drop specific mqtt brokers into the flow

1 Like