Adding MQTT Connection to Node-RED Flow
This guide demonstrates how to add an MQTT connection to the the Node-RED flow from the Processing DRO Data in Node-RED guide.
Prerequisites:
Mosquitto MQTT or a similar MQTT broker needs to be installed and running. For instructions on how to install Mosquitto, click here. The necessary flow nodes come preinstalled in Node-RED.
Getting Started
Take the flow from the "Processing DRO Data in Node-RED" example and drag an MQTT Out node into it, connecting it to the Join node.

Configuration Steps:
1. Add the MQTT Out Node:
Drag the MQTT Out node into the flow and connect it to the Join node.
Double-click the MQTT Out node to configure it.
2. Define the Topic:
In the Topic field, enter the topic under which you want to publish the Axes Data from your lathe:
Purdue/IE/Lambertus/BuildatScale/CNC/Acra/ATL-618EVS/Telemetry/Axes
Select QoS 1. QoS (Quality of Service) 1 ensures that the message is delivered at least once, guaranteeing that the subscriber receives the message.
3. Configure the MQTT Broker:
Click the + button next to the Server dropdown to add a new MQTT broker configuration.
Enter the IP address and port of the MQTT broker you have configured. Let it connect automatically.
If you have set up TLS security for your server, configure it accordingly. You can find instructions on setting up TLS here.
4. Configure TLS (if applicable):
Upload the CA Certificate and select the server certificate.
If you're connected via XRDP using Chrome, you may have trouble uploading the CA certificate. To avoid this issue, connect directly to the Raspberry Pi or use Firefox while using XRDP.
5. Set User Credentials:
In the Security tab, enter your MQTT broker username and password.
6. Update and Deploy
Click Update and Deploy to apply the changes.