Skip to content

Simple EnOcean MQTT Client

The export module “Simple EnOcean MQTT Client” establishes the connection to an MQTT broker and publishes messages under different topics.

Multiple 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.

In the IoT Export area of the Web configuration or the BSC Remote, the export connection can be created and the parameters configured.

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

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

There is a possibility 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.
HTTPS Hostname Verification On • On
• Off
In SSL mode, the hostname used is explicitly checked in the broker's certificate.
QoS 0 • 0
• 1
• 2
The QoS value determines how messages are delivered. The higher the QoS value, the greater the latency of message delivery.

QoS 0 means that the messages are sent without confirmation of receipt. A classic "fire & forget".

QoS 1, on the other hand, sends the message until a confirmation of receipt is received by the broker. The client can be sure that the broker has received the message. It is possible that a message is sent or delivered multiple times.

QoS 2 uses a double confirmation to ensure that a message is delivered only once. For this purpose, the broker confirms receipt to the client, and the client in turn confirms receipt of the confirmation to the broker. Thus client and broker both know that the message was delivered correctly and only once.

By using event IDs and timestamps in the message containers used by this implementation, it is possible to deal with duplicate messages and thus avoid the high latencies of QoS 2 and implement similar security with QoS 1. In principle, QoS 0 can also be used in environments with stable connections.
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.
Parameter Default value Possible values Description
EnOcean Topic Prefix enocean All Thing updates are published in topics with this prefix.
Gateway Topic Prefix gateway Status messages regarding the gateway are published under this prefix.

All messages are transferred as JSON objects.

Basic information for message assignment is available in all objects.

Field Data type Description
nodeId String A unique ID that identifies the gateway.
timestamp Number Difference, measured in seconds, between current time and 01/01/1970 00:00 based on UTC time zone.

In addition to the basic fields, the following fields are available in the device object.

Field Data type Description
name String The name stored for the device.
eurid String The unique EnOcean EURID of the device.
refId String A unique internal identifier of the device type.
channels Array A list of available channels and their values.

The key is also the channel ID, the value is either a number or a text.
Example data
FSB14
{
"nodeId": "ACDBDA5906EE",
"timestamp": 1689865668,
"name": "FSB 14",
"eurid": "2a3df3d",
"refId": "enocean.eltako.fsb14",
"channels": {
"JalousieSlat": "UNKNOWN",
"Jalousie": 65.0,
"Priority": "OFF",
"JalousieState": "UNKNOWN"
}
}
FSR14
{
"nodeId": "ACDBDA5906EE",
"timestamp": 1689865842,
"name": "fsr14",
"eurid": "c23df34",
"refId": "enocean.eltako.fsr14",
"channels": {
"Switch": "ON",
"Priority": "OFF"
}
}

In addition to the basic fields, the following fields are available in the gateway status object.

Field Data type Description
version String The software version currently in use.
online Boolean Indicates whether the device is currently online.
Example data
Gateway status object
{
"nodeId": "ACDBDA5906EE",
"timestamp": 1689864643,
"version": "3.5.1",
"online": true
}

The used topic structure is divided into data and command t

The gateway sends its status messages and the status messages of the connected devices via the data topics.

The topic stored in the configuration under “EnOcean Topic Prefix” serves as the basis.

This path is extended by the EURID of the device and the device message is published there.

Example topic:

enocean/513659d

The topic stored in the configuration under “Gateway Topic Prefix” serves as the basis.

This path is extended by the hardware ID of the device and the status message is published there.

Example topic:

gateway/ACDBDA4512E0

A simple way of controlling the gateway is implemented via the command Topics.

The topic stored in the configuration under “EnOcean Topic Prefix” serves as the basis and enables actuators to be switch

This path is extended by the EURID of the device and the channel ID. As payload the new value is expected as string.

Example topic:

enocean/513659d/Switch

Example payload:

ON

OFF

The topic stored in the configuration under “Gateway Topic Prefix” serves as the basis.

This path is extended by the hardware ID of the device and the command to be executed. A JSON object with the corresponding parameters is expected as payload.

Available commands:

Command Payload Description
pairing on or offTime specification in seconds:on=90 Switch the mode for automatic pairing of new devices on or off.

Optionally, a time can be specified in seconds after which the mode is automatically switched off again.
delete One devices EURID An attempt is made to delete the device.

Example topic:

gateway/ACDBDA4512E0/pairing

gateway/ACDBDA4512E0/delete

Example payload:

on=90

off

513659d