Node-Red Configuration Nodes Overview

Some nodes like the MQTT-in and MQTT-out nodes share configuration data.

The MQTT-in and MQTT-out nodes share the broker configuration. Settings like broker address, port, clean sessions,authentication are part of the configuration node.



The broker configuration doesn’t have its own configuration node visible on the flow, but is configured as part of the MQTT-IN and MQTT-OUT node.

This is illustrated in the schematic below:

node-red-configuration-nodes-diagram

You can view and edit the configuration nodes in the configuration sidebar.

Configuration Sidebar

configuration-node-sidebar

 

You should notice that the number displayed to the right of the node is the total number of instances of that node in the workspace.

This is very useful for seeing if you have unused configuration nodes in the workspace.

In the screen shot above you can see that I have 2 configuration nodes called localhost that aren’t being used and so can be deleted.

There is also a useful filter in the top right which will display only unused nodes.

view-unused-configuration-nodes

To delete or edit a configuration node then double click it and you will see something similar to the screen shot below (for the MQTT node)

configuration-node-1

Configuration Nodes and Flow Imports

Sometimes you may import a flow file and not have the necessary nodes installed.

So you delete the nodes from the flow as you don’t need them and so don’t want to install them.

However the flow fails to start and complains of missing nodes.

This is because there is a configuration node that is still present and so you will also need to delete that by going to the configuration sidebar.



Configuration Nodes Video

Related Tutorials and resources:

Click to rate this post!
[Total: 0 Average: 0]

4 comments

  1. Is there any way to setup MQTT Broker connection via API? I can put the MQTT out node in flow but i have to access the MQTT out node’s configuration, where is Security tab etc.
    If this is possible, I can create a script which installs modules & inserts a json flow with nodes. I hope you could help with this.

    1. Not as I know. You could try creating it locally and copying the flow over but the security is stored in another file.
      Can you describe in more detail what you need to do and I will give it some thought.
      Rgds
      Steve

  2. Hi Steve would you happen to know if one can already set default values of the MQTT brokers one wishes to connect to before Node-Red starts? Would it be possible to set broker addresses and ports into the MQTT config node so that when one drags either the MQTT In / Out node to the editor the values are available in the drop-down menu even if the user hasn’t configured them in any flow prior?

Leave a Reply to steve Cancel reply

Your email address will not be published. Required fields are marked *