IoT Export
Connection Template

Simple EnOcean MQTT Client

18min

Introduction

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.

Configuration

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



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.

Data model

Base data of messages

All messages are transferred as JSON objects.

Basic information for message assignment is available in all objects.

Base fields

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.

Sensors / Actuators

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.

FSB 14
FSR 14


Gateway status

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.

Gateway status object


MQTT topics

The used topic structure is divided into data and command t

Data topics

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

Sensors / Actuators

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

Gateway

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

Command topics

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

Actuators

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

Gateway

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 off

Time 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