Skip to main content

MQTT

Add an MQTT Integration

To add an integration, go to Integrations on the left-hand menu. Select the integration to add - in this case, the MQTT integration.

The next step is to paste your MQTT broker endpoint, and optional topic prefix.

Connecting Integrations to Devices

Devices or groups of devices (via labels) can be directly connected to integrations on the Flows Worskpace. Labels are identifiers used to group devices for easy management. To connect one or more devices to one or more integrations, simply connect the Device and Integration nodes on the Flows Workspace.

info

Quick video tutorial connecting devices to an integration here.

Node elements (devices, labels, integrations) need to be created before they're available on the Flows Workspace. More information about Flows here.

MQTT Topic composition:

Subscribe to: {optional_prefix}/helium/{Device ID}/rx

Example with prefix: mqtt/helium/3c822699-37fd-4df6-a84d-93037a450843/rx Example without prefix: helium/3c822699-37fd-4df6-a84d-93037a450843/rx

Publish to: {optional_prefix}/helium/{Device ID}/tx

Example with prefix: mqtt/helium/3c822699-37fd-4df6-a84d-93037a450843/tx Example without prefix: helium/3c822699-37fd-4df6-a84d-93037a450843/tx

MQTT Messages

The MQTT for downlink and uplink follow the JSON schema documented here.

Send and Receive Device Data

The following examples are done with the MQTT CLI utility.

Example MQTT

Subscribe to Uplink Packets:

mqtt sub -V 3 -t helium/3c822699-37fd-4df6-a84d-93037a450843/rx -h {mqtt_broker_host} -p {mqtt_broker_host_port} -u "user" -pw "password"

Publish Downlink Packet:

mqtt pub -V 3 -t helium/3c822699-37fd-4df6-a84d-93037a450843/tx -h {mqtt_broker_host} -p {mqtt_broker_host_port} -u "user" -pw "password" -m "{\"payload_raw\":\"encoded_string\"}"