mqtt

MQTT Integration

MQTT (Message Queuing Telemetry Transport) is an open standard messaging protocol designed for the Internet of Things (IoT). It is based on the Publish/Subscribe communication model, allowing devices to exchange information with minimal resource and network bandwidth requirements.

The main elements of an MQTT system are:

  • Client: a device or application that publishes messages (Publisher), receives messages (Subscriber), or performs both functions.
  • Broker: a server that manages client subscriptions, receives published messages and distributes them to the interested clients.
  • Topic: an identifier used to organize messages and determine which information is published or received by clients.

The Thinknx server can be configured as an MQTT client, connecting to an external or internal broker, or as an MQTT broker itself, directly managing subscriptions and message distribution.

For further information about the MQTT protocol, refer to the documentation available at mqtt.org.

MQTT overview

Figure: MQTT Overview

The MQTT Client system object allows the Thinknx server to be configured as an MQTT client, connecting either to an external broker or to the internal MQTT broker.

Virtual Inputs and Virtual Outputs allow the server to receive and publish values associated with specific MQTT topics.

These values can be used within the user interface, in other system objects or to exchange information with the KNX bus.

The Data Format Editor allows incoming data to be processed and the format of outgoing messages to be customized.

Thinknx supports both unencrypted and encrypted communication using the TLS protocol.

TLS communication compatibility depends on the capabilities of the MQTT broker and the Thinknx server model. Older generations of Thinknx servers may not support all TLS configurations.

  • Local Broker: if enabled, the internal MQTT broker of the Thinknx server is used. Otherwise, a connection to an external MQTT broker must be configured.
  • IP Port: port used by the MQTT broker. The default port for unencrypted communication is 1883.
  • IP Address/Hostname: IP address or hostname of the external MQTT broker.
  • Use Credentials: enables authentication using a username and password.
  • Username: username used to authenticate with the MQTT broker.
  • Password: password used to authenticate with the MQTT broker.
  • Secure TLS: enables encrypted communication using the TLS protocol.
  • Client Certificate: allows the selection of the digital certificate (.crt) used for client authentication.
  • Client Key: allows the selection of the client's private key (.key).
  • Virtual Inputs: allows the configuration of MQTT Virtual Inputs (Subscribers).
  • Virtual Outputs: allows the configuration of MQTT Virtual Outputs (Publishers).

Virtual Inputs allow the Thinknx server to subscribe to specific MQTT topics and receive values published by other clients.

The received values can be used within the user interface, in other system objects or transmitted to the KNX bus.

  • Topic: MQTT topic to subscribe to.
  • Use Credentials: if enabled, specific credentials are used to authenticate with the external service and retrieve the input value.
  • Username: username used to authenticate with the external service.
  • Password: password used to authenticate with the external service.
  • Data Format Input: opens the Data Format Editor to configure the format and processing of incoming data.
  • Send Trigger: defines the condition that triggers the update of the Virtual Input.
  • Use KNX gateway: if enabled, values received through MQTT are forwarded to the KNX bus.
  • KNX value feedback group: KNX group address used to transmit the received value.
  • KNX datatype: KNX data type (DPT) used to transmit the value on the bus.

Data Format Editor

The Data Format Editor allows the configuration of how incoming MQTT data is interpreted and processed.

  1. Select the incoming data format (XML, String or JSON).
  2. Configure the path from which the value is extracted, where required.
  3. Select the data type to which the received value must be converted (Bit, Int, Double, Enum or String).

Virtual Outputs allow the Thinknx server to publish values to specific MQTT topics, making them available to other subscribed clients.

The values to be published can originate from the user interface, other system objects or specific KNX group addresses.

  • Topic: MQTT topic to which the message is published.
  • Send Trigger: defines the condition that triggers message publication.
  • Data Format Input: opens the Data Format Editor to customize the format of the outgoing data.
  • Use KNX gateway: if enabled, values received from the KNX bus can be used to publish MQTT messages.
  • KNX value group: KNX group address used to trigger the publisher and retrieve the value to be published.
  • KNX datatype: KNX data type (DPT) used to interpret the value received from the bus.

Data Format Editor

The Data Format Editor allows the configuration of the format of data published through MQTT.

  1. Select the outgoing data format (XML, String, Parameters or JSON).
  2. Select the data type to which the published value must be converted (Bit, Int, Double, Enum or String).

Example 1: Thinknx Server as MQTT Client (Shelly H&T)

This functionality is available starting from Thinknx server firmware version 1.1.10.34.

The MQTT Client Authentication API allows third-party software and systems to check and modify the credentials used by the Thinknx server to connect to an MQTT broker, without modifying or uploading the project again through Thinknx Configurator and without restarting the server.

The API allows third-party systems to:

  • Check the authentication and connection status of the MQTT client.
  • Modify the username and password used by the MQTT client.
  • Enable or disable authentication with the MQTT broker.
  • Restore the credentials defined in the project.

Credentials configured through the API take priority over those defined in the project and are retained after server restarts and new project uploads.

Changes only affect the authentication settings. The broker address, port, TLS certificates, Client ID, Virtual Inputs and Virtual Outputs remain unchanged.

The use of this API requires the Integration Kit license on the Thinknx server.

The API must be accessed directly through the HTTPS interface of the server and is not available through Thinknx Cloud.

For further information about the requirements, authentication methods and available endpoints, refer to the dedicated documentation:

  • mqtt.txt
  • Last modified: 2026/11/30 16:41
  • by francesco