> For the complete documentation index, see [llms.txt](https://captic-2.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://captic-2.gitbook.io/docs/overview/hands-on/integrating-your-robot/integration-flow/protocols/mqtt.md).

# MQTT

Publish results to and subscribe to an MQTT broker.

Use the MQTT nodes to exchange messages through an MQTT broker, for example to publish results to a dashboard or an IIoT platform. You'll find them under **mqtt** in the palette.

| Node     | What it does                                   |
| -------- | ---------------------------------------------- |
| mqtt in  | Subscribes to a topic and outputs each message |
| mqtt out | Publishes a message to a topic                 |

## Connect

Add an MQTT broker configuration with the broker's address and port (usually `1883`, or `8883` with TLS), and credentials if your broker needs them.

{% hint style="info" %}
If the broker is outside the device's network segment, make sure your firewall allows the connection.
{% endhint %}

For node details, see the [Node-RED documentation](https://nodered.org/docs/user-guide/nodes).
