Skip to main content

MQTT

MQTT is an open M2M protocol that is used to transfer notifications and is primarily applied to monitoring and control technical processes with SCADA systems. The device will operate as a client that will send data on a customizable topic to a broker. Other clients can subscribe to this topic, in order to receive the data sent by the device for further processing.


info

This is used for the notification feature of the peripherals (sensors, digital I/Os, watchdogs). Notifications have to be enabled and configured there to be sent by MQTT.

Configuration

Enable

Checkbox

Tick the checkbox to fill out the configuration details and enable the interface.

Send changes after reboot

Checkbox

Tick the checkbox to make the device send saved data for all peripherals at startup. This is additional to the notifications feature. //TODO: Tim, korrekt?

Broker settings

Host
RequiredText

The IP or URL and TCP Port of the MQTT broker

Port
RequiredNumber0-65535

The TCP Port of the MQTT broker

TLS
Checkbox

Tick the checkbox to make requests to the broker use TLS

Client ID
OptionalText

//TODO Optional ?
The ID to identify this client on the broker

User, Password
OptionalText

User name, if access to the broker is gated

User, Password
OptionalText

User password, if access to the broker is gated

Topic Prefix
RequiredText

The MQTT topic on the broker to post MQTT messages to. // TODO: topic name?
This can be used to group multiple devices and interfaces.
The full topic name will be: //TODO

Interval
OptionalNumberminutes

If greater than 0, send MQTT messages in this regular interval.
If 0, send MQTT messages on notification events only

Keep Alive
RequiredNumberseconds

MQTT keep alive is the maximum interval the client and broker expect between control packets to know the other side is still connected.
The client must send a packet (or a PINGREQ if idle) within the specified number in seconds. The broker may drop the connection if no packet is received within ~1.5 times that value.

Retain
info

Retained messages (messages including a Retain Flag) tell the broker to store the message and its QoS. Every topic has one retained message. When a client subscribes to a topic, the broker immediately delivers the retained message.

Retain for * messages
Checkbox

Where *

  • sensor
  • input
  • output
  • watchdog

Check one or multiple checkboxes to include the Retain Flag in the respective messages.

Last Will
info

The broker uses the keep alive timeout to detect unexpected disconnects. If a client is considered dead and a Last Will was provided in CONNECT, the broker will publish that Will.

Last Will Topic
OptionalText

The MQTT topic name the broker will publish to if the client disconnects unexpectedly

Last Will Message
OptionalText

The payload the broker will publish to the Last Will topic

Connect Message
OptionalText

// TODO: Tim, dies wird an normale Connect Message angehangen?

Retain
Checkbox

Signal the broker to include a Retain flag to the Last Will //TODO: Tim, korrekt?

Save the configuration

After filling in the form, click on at the bottom of the page, to persist the configuration.