Skip to main content

MQTT Interface

Written by DataFromSky

The MQTT Interface allows FLOW devices to publish selected widget data and diagnostic information to external systems using the MQTT protocol. MQTT communication is based on a broker, which acts as a central server that receives and distributes messages between connected clients.

The interface is available by default for all FLOW devices under Interfaces->MQTT interfaces.

Figure: MQTT interface settings.

Configure the interface in FLOW according to the server (broker) setup, as follows:

  • Name – User-defined.

  • Address – MQTT broker address in the format:

mqtt://<host>:<port> - TCP
tcp://<host>:<port> - TCP
ws://<host>:<port> - Unsecure websockets
unix://<path>
SECURE:
wss://<host>:<port> - Secure websockets
mqtts://<host>:<port> - SSL/TLS
ssl://<host>:<port> - SSL/TLS
  • Quality of Service (QoS) – Delivery reliability.

    • QoS 0 – At most once

    • QoS 1 – At least once

    • QoS 2 – Exactly once

  • Username / Password – Optional credentials used for broker authentication.

  • Use client certificate – Enables client certificate authentication.

  • Use CA certificate – Optional CA certificate for broker verification.

  • Verify server certificate – Verifies the broker TLS certificate against.

  • Disable hostname verification – Disables hostname verification against the certificate.

  • Topic prefix – User-defined topic prefix added to all published MQTT topics. Device ID is automatically added to the topic prefix.

  • Device ID type – Determines how the device identifier is generated in MQTT topics.

    • Block name

    • Custom

  • Show logs – Communication logs.

Outputs

The MQTT interface publishes selected outputs with a configured sending policy:

  • On create – Publish when a new event is created.

  • On update – Publish whenever the event is updated.

  • On closing – Publish when the event is closed.

Figure: Outputs list.

Figure: MQTT interface output definition.

Published Data

Depending on the selected outputs, MQTT can publish:

  • Widget snapshots (same payloads as Webhook outputs)

  • System and network information - part of system diagnostics

  • Network information

  • Processing state - block processing diagnostics, uptime, timestamp, memory usage etc.

Did this answer your question?