Forwarding data to an MQTT broker

✓ EnergyID for Business

With MQTT data forwarding, you can automatically forward data from EnergieID to an external MQTT broker. This allows you to use that data within your own environment, for example in internal applications, automations, or other integrations.

First, take a look at the short introduction on mqtt.org.

Building a technical integration? Are you looking for the exact payload structure and API definitions? Check out MQTT export data model and payload format right away.

Activating MQTT data forwarding

  • In your Workspace, go to Configuration.
  • Open the MQTT data forwarding feature.
  • Add at least one broker and fill in the settings.
  • Click Save.

Only Workspace administrators can save this configuration.

Configuring an MQTT broker

You can add one or more brokers. Each broker has its own connection details, data selection, and topic structure.

Connection details

Enter the details of your MQTT broker:

  • Broker URL: the endpoint of your broker, for example mqtt://broker.example.com:1883 or mqtts://broker.example.com:8883.
  • Username: the username EnergieID uses to log in to the broker.
  • Password: the password for this username.
    • For an existing broker, you may leave this field empty to keep the saved password.
    • For a new broker, this field is required.

Choose which data to forward

You can choose per broker which data EnergieID publishes.

Processed meter values

Enable this option to forward processed meter values for the records in your Workspace.

The data is published as soon as it is processed in EnergieID. For example, when an integration retrieves and processes data during a nightly sync, it is automatically forwarded afterward. Integrations that continuously provide data are typically processed and published almost immediately.

Real-time device data

Enable this option to forward real-time device data.

This option only applies to integrations that supply real-time device data to EnergieID themselves.

Note: You must enable at least one of the two options. If both options are disabled, you cannot save the configuration.

Set up the MQTT topic structure

You determine per data type to which MQTT topic EnergieID publishes the messages.

MQTT topic path for meter values

Default:

energyid/workspace/{{workspaceId}}/record/{{recordNumber}}/meter/{{meterId}}
MQTT topic path for device data

Default:

energyid/workspace/{{workspaceId}}/record/{{recordNumber}}/device/{{twinId}}

The placeholders are automatically replaced when EnergieID publishes a message. All available placeholders can be found in the example templates. You are not required to use placeholders.

Confirm GDPR compliance and privacy

For each MQTT broker, you must confirm that a valid legal basis exists for sharing the data with the MQTT subscriber(s).

Without this confirmation, you cannot save the broker configuration.

In practice, this means at minimum that your processing complies with the GDPR (Regulation (EU) 2016/679), including:

  • a valid legal basis for processing (GDPR, Article 6),
  • a data processing agreement when the broker operator acts as a processor (GDPR, Article 28),
  • transparency to data subjects regarding transfer to third parties (GDPR, Articles 13 and 14).

Depending on your setup, additional rules may apply (e.g., sector-specific obligations or national implementation rules within the EU/EEA).

What happens when publishing to a broker fails?

Validation upon saving

In case of an incomplete configuration, you will receive a validation message, for example when:

  • no broker has been added;
  • a required field is missing;
  • no data has been selected for forwarding;
  • the confirmation regarding GDPR compliance and privacy is missing.

Data forwarding error

When data cannot be published to an MQTT broker, a Delivery error notification appears next to that broker.

Click on the notification for more information. You will see, among other things:

  • the timestamp of the most recent error;
  • the technical error message of the connection or publication.

Workspace administrators also receive a message in the message center upon the first error for a broker.

Changes to MQTT settings can take up to 15 minutes to become active because broker settings are cached. If publishing fails during that period, EnergieID refreshes the cached broker configuration and automatically retries.

Note: when you re-save the MQTT settings, the last known error message is cleared. Therefore, check the error details before re-saving the configuration.

Full data formats

This page describes the settings and error messages. The exact structure of the MQTT messages for meter values and device data, including example messages and field descriptions, can be found on a separate technical page:

Data model and payload format for MQTT data forwarding

Frequently Asked Questions

Can I configure multiple MQTT brokers?

Yes. You can add multiple brokers. Each broker has its own connection details, selected data, and topic structure.

Do I need to re-enter my password when modifying a broker?

No. For an existing broker, you can leave the password field empty to keep the current password.

Why am I not receiving any messages?

Check:

  • whether the broker is configured correctly;
  • whether at least one data type is selected;
  • whether the broker URL and access credentials are correct;
  • whether the MQTT user has sufficient permissions;
  • whether a Delivery error is displayed for the broker.