Skip to main content

MQTT

Publish telemetry from any endpoint to any standard MQTT broker — self-hosted or cloud. MQTT publishing is available in the Community Edition with no licence required.


How It Works

Agent endpoints (Modbus, OPC-UA, BACnet, …)


Subscription (agent)
│ routes endpoint data to destination

MQTT Destination (agent)
│ TCP / TLS
│ username + password auth

MQTT Broker (any standard broker)


Your cloud app / time-series DB / dashboard

The agent maintains a persistent MQTT connection to the broker and publishes batched telemetry as each subscription fires. If the connection drops, outgoing messages buffer to SQLite and flush automatically on reconnect.


Setting Up an MQTT Destination

  1. In the agent admin UI, go to DestinationsNew Destination.
  2. Select type MQTT.
  3. Fill in the connection fields:

New Destination drawer showing MQTT connection configuration fields

FieldDescription
HostBroker hostname or IP address (e.g. broker.hivemq.com, 192.168.1.100)
PortTCP port — 1883 for plain MQTT, 8883 for MQTT over TLS
UsernameBroker username (leave blank if the broker allows anonymous connections)
PasswordBroker password
Client IDMQTT client identifier — leave blank to auto-generate a unique ID
Topic prefixPrepended to every published topic, e.g. edge/site-a → topics publish as edge/site-a/temperature
  1. Click Save, then enable the destination toggle.

Subscribing Endpoint Data

  1. Go to SubscriptionsNew Subscription.
  2. Select the MQTT destination.
  3. Choose the endpoints and data points to route.
  4. Set the payload format:
FormatBest for
TagsGeneric MQTT consumers — flat JSON with field names and Unix-ms timestamp
ECPTime-series databases — typed values, omits null/BAD quality readings
CustomIotistica consumers — full envelope with quality codes and deduplication ID
  1. Click Save and enable the subscription.

Cloud Provider Examples

HiveMQ Cloud

HiveMQ Cloud offers a free serverless MQTT broker with TLS and username/password auth.

  1. Sign up at hivemq.com and create a free cluster.
  2. In the HiveMQ console, go to Access ManagementCredentials and create a username and password.
  3. Note your cluster URL — e.g. abc123.s1.eu.hivemq.cloud.
  4. In the agent, add an MQTT destination:
FieldValue
Host<your-cluster>.s1.eu.hivemq.cloud
Port8883
UsernameHiveMQ credential username
PasswordHiveMQ credential password
Topic prefixe.g. iotistica/<site-name>

EMQX Cloud

EMQX Cloud is a fully managed MQTT service with a free trial tier.

  1. Create a deployment in the EMQX Cloud console.
  2. Under Authentication, add a username and password.
  3. Copy the Connection Address and port (1883 for standard, 8883 for TLS).
  4. In the agent:
FieldValue
HostYour EMQX deployment address
Port8883 (recommended)
UsernameEMQX auth username
PasswordEMQX auth password
Topic prefixe.g. plant/line-1

Mosquitto (Self-Hosted)

Eclipse Mosquitto is the most widely deployed open-source MQTT broker and the same broker bundled with the Iotistica agent.

  1. Install Mosquitto on any Linux host:
    sudo apt install mosquitto mosquitto-clients
  2. Configure a password file:
    sudo mosquitto_passwd -c /etc/mosquitto/passwd myuser
  3. Edit /etc/mosquitto/mosquitto.conf:
    listener 1883
    allow_anonymous false
    password_file /etc/mosquitto/passwd
  4. In the agent:
FieldValue
HostIP address of your Mosquitto host
Port1883 (or 8883 with TLS configured)
UsernameThe username from the password file
PasswordThe password you set

AWS IoT Core (MQTT)

AWS IoT Core supports standard MQTT with username/password via custom authorizers, or with X.509 certificates. For certificate-based auth with automatic credential rotation, use the dedicated AWS IoT Core integration (Agent Pro).

For simple username/password via a custom authorizer:

FieldValue
Host<account-prefix>.iot.<region>.amazonaws.com
Port443 or 8883
UsernameAuthorizer token (format per your authorizer config)
PasswordToken signature

The Things Network (TTN)

The Things Network exposes received LoRaWAN device data over MQTT.

FieldValue
Host<region>.cloud.thethings.network
Port8883
Username<application-id>@<tenant-id>
PasswordAPI key from the TTN console (Applications → API Keys)
Topic prefixLeave blank — subscribe to TTN topics directly via an Endpoint

Adafruit IO

Adafruit IO is a simple cloud dashboard with built-in MQTT support.

FieldValue
Hostio.adafruit.com
Port1883 or 8883
UsernameYour Adafruit IO username
PasswordYour Adafruit IO key (from Account → Keys)
Topic prefix<username>/feeds

Payload Example

Using the Tags format, a single subscription publish looks like:

{
"ts": 1718000000000,
"tags": [
{ "name": "temperature", "value": 23.4, "quality": "GOOD" },
{ "name": "pressure", "value": 1.01, "quality": "GOOD" }
]
}

Published to: <topic-prefix>/<endpoint-name>


Troubleshooting

SymptomLikely cause
Destination shows connection errorWrong host or port, or broker not reachable from the agent network
Connection refusedBroker not running, or firewall blocking the port
Authentication failedWrong username or password
Messages not appearingCheck the subscription is enabled; use mosquitto_sub or MQTT Explorer to verify the topic
TLS handshake errorBroker requires TLS on port 8883 — verify the broker's certificate is trusted