Connect to the Evolo MQTT broker

With the Evolo MQTT broker, you can read and write data via MQTT to your gateways in Evolo.

Written By Evolo Support

Last updated 17 days ago

Before You Begin

To get started, you'll need the following:

  • The gateway has been created.

  • You have created an MQTT key under User → Integrations.

1. Enable MQTT on the gateway

  1. Go to Configuration → Gateways.

  2. Open the gateway you want to expose.

  3. Check the Enable MQTT box.

    Enable MQTT
  4. Click Save.

Evolo The gateway will now mirror all data points to our MQTT broker on the Internet.

2. Create an MQTT client in Integrations

  1. Go to User → Integrations.

  2. Select the MQTT tab.

  3. Click Create New MQTT Client.

  4. Fill in:

    • Name and description

    • Permissions: Read MQTT and/or Write MQTT

    • Build: Select which build the key should apply to

  5. Click Create.

  6. Copy these values:

    • Token
      This is displayed only once.

    • Client ID
      : This is the UUID displayed in the table.

3. Connect in MQTT Explorer

Use these values in MQTT Explorer:

Host
mqtt.evolo.no

Port
8883

Username
Your email address at Evolo

Password
: Your MQTT token

Client ID
: client:<uuid>

Example:

UUID
123e4567-e89b-12d3-a456-426614174000

Client ID in MQTT Explorer
client:123e4567-e89b-12d3-a456-426614174000

4. Subscribe to topics

Once the connection is established, you can subscribe to topics.

Examples:

evolo/<gateway_key>/#
evolo/<gateway_key>/tags/#
evolo/<gateway_key>/status/#

Replace <gateway_key> with the key for the gateway you want to read from.

Example for reading a value from a data point:

evolo/<gateway_key>/tags/<tag_id>/value

5. Write to a data point

To write a value to a data point, publish a message to the write topic for that data point.

Topic format:

evolo/<gateway_key>/tags/<tag_id>/write

The payload must be valid JSON, and the value must be either a number or a boolean.

Example: Write a numeric value

Topic: evolo/<gateway_key>/tags/123/write Payload: 42

Example: Write a boolean value

Topic: evolo/<gateway_key>/tags/456/write Payload: true

The gateway picks up the message and attempts to write the value to the selected data point.

  • The MQTT client must have "Write MQTT" access.

  • The data point must be writable and accessible to the gateway.

  • <tag_id> is the ID of the data point.

  • The payload should not be wrapped in an object. Send the value itself directly, for example, 42, 21.5, true, or false.

Other notes

Grant only the access that the integration actually needs. You do not need both Read MQTT and Write MQTT if the client is only going to subscribe or only going to publish.

It’s often a good idea to create one MQTT key per integration or client. This makes it easier to manage access and revoke keys as needed.