Skip to content

IoT Core MQTT Client

The “IoT Core MQTT Client” export module establishes the connection to an MQTT broker and publishes status messages under various topics.

Several export instances can be created, but only one instance per broker URL.

Messages are always transmitted as strings and are usually formatted as JSON objects.

The export connection can be created and the parameters configured in the IoT Export area of the web configuration or the BSC Remote.

TCP/SSL and web socket (http/https) connections are supported. Authentication is possible via user name and password or client certificate.

The corresponding certificates or access data can be stored during configuration.

It is possible to customize the basic topics for publishing news.

Parameter Default value Possible values Description
User Available user accounts The user account to be used when accessing the data. It is thus possible to restrict the export of devices or access to commands.
Connection Mode Socket • Socket
• Websocket
Selection whether a TCP or Web Socket connection is used.
Broker IP or DNS name of the broker without protocol or port.
Example: test.mosquitto.org
The broker to which the connection should be established.
Port 1883 1-65535 The port to use when establishing a connection.
Auth User User name for authentication at the broker.
Auth Password Password for authentication at the broker
SSL Off • On
• Trust all
• Off
Option whether an encrypted connection should be established. With the option "Trust all" it is possible to trust all certificates.
SSL Server CRT In SSL mode, the server certificate is used to validate the connection to the broker.
SSL Client CRT In SSL mode, the client certificate is used to validate the client.
SSL Client Key In SSL mode, the private client key is used to authenticate to the broker.
SSL Client Key Password In SSL mode this password is used to unlock the client key.
Retain Messages On • On
• Off
Specifies whether the last messages for a topic should be cached on the broker. Other clients will then receive these messages directly after their login. This way the last known state can be effectively cached on the broker.
Timeout (s) 90 • 0
• 10
• 15
• 30
• 60
• 90
• 120
• 150
• 180
• 300
• 600
• 1200
• 1800
• 3600
Time in seconds which is waited to establish a successful connection. Otherwise this is interpreted as an error.

The value 0 deactivates the timeout, it will be waited until the connection could be established successfully.
Keep Alive Interval (s) 60 • 0
• 10
• 15
• 30
• 60
• 90
• 120
• 150
• 180
• 300
• 600
• 1200
• 1800
• 3600
Maximum time in seconds that may elapse before a data packet must be sent. If there is no regular data traffic within this time, a ping is automatically sent.

The value 0 deactivates this monitoring.
Max Inflight 10000 • 1
• ….
• 65000
In QoS modes 1 and 2, this value determines the maximum number of messages that can be sent without an acknowledgement of receipt being received. This value may have to be increased in very large operating environments.

The topics are implemented on the basis of the “Resource Path” of the object types from the IoT Core Data Model. The “Base Topic” is always placed in front.

If the “Object Topics” option is activated, object messages are each sent in a subtopic. The topic is then made up of “Base Topic”, “Resource Path” and the object ID. This option is ignored for DTO objects without ID support.