MQTT

MQTT

MQTT stands for MQ Telemetry Transport; it's an extremely simple and lightweight publish-subscribe messaging protocol. It was designed for constrained devices and low-bandwidth, high-latency or unreliable networks.


TagoIO has its own MQTT broker, which is responsible for pushing data to clients whenever new information is published on the specific topics to which they are subscribed. Our MQTT broker doesn't contain all the implementations that a standard MQTT would have because its main goal is to facilitate the ingestion of data from sensors into our data buckets.

TagoIO's MQTT broker does not support the native Retain feature found in standard MQTT protocol implementations; however, we offer a workaround to achieve similar functionality. Read more here: MQTT Retain on TagoIO Broker.

For instance, consider a system where a sensor sends temperature data to a topic each time it receives an update. In this scenario, devices that need to be notified when this data is available would subscribe to that topic. Once the temperature sensor has an update, it publishes the data to the topic, and the broker then takes on the responsibility of pushing this data to all the devices subscribed to that topic. 

It's possible to combine MQTT with TagoIO’s amazing capabilities to also create dashboardsanalyticsnotifications, and reports

Security

Encryption across the network can be handled with SSL independently of the MQTT protocol itself. Additional security can also be added through application-encrypted data that is sent and received. 

At TagoIO, you can send your data as encrypted directly to your Analysis, decrypt it there, and then insert the data into your Bucket. You can use this procedure to increase your security if your data is sensitive, or if you simply want to add an extra layer of security.

Connection

To connect to our broker, please use the information provided below. Note that there is a limit on the number of connections, publications, and subscriptions you can make, enforced based on your account plan. For more information, read about Rate Limits (Hard Limits).
Host: mqtt.tago.io
TCP/IP port: 1883
TCP/IP port over SSL: 8883
username: Token
password: Your Device-Token
If the Device-token is removed from the device, or if it's deleted, it'll be disconnected from the MQTT broker.

Data flow at TagoIO

When you first send data through the MQTT to your device, you'll be able to visualize the connection and message through the Live Inspector on your device.


Those messages mean the connection is working, but nothing is being stored in your bucket yet. From this point, you'll need to create an Action with trigger MQTT and type Insert to Device Bucket.


Now you should see the data being stored in the Live Inspector.

In this case, the variable is "payload" and it has a value of "22". If you don't send the data using the TagoIO data format, you'll need to normalize your data and change it to the correct format. 
To do that, check out our documentation on how to use a Payload Parser.

More Resources

Here's a list of some additional documentation on MQTT resources:

    • Related Articles

    • MQTT with Sensor Tag

      This is an example using the SensorTag Bluetooth module from Texas Instruments to send data to TagoIO. There is no code modification needed in the SensorTag side, and as it uses the MQTT protocol, only a configuration setup is needed. For the ...
    • MQTT - Publishing and Subscribing

      You can publish to your MQTT topics by coding a script that will run from an Analysis. When the analysis runs, your script can publish a topic that can be received by any device that has subscribed to that specific topic. There are different ways to ...
    • Trigger by MQTT Topic

      The trigger type, Trigger by Variable, allows you to execute your Action when data is sent to an MQTT topic. TagoIO has its own MQTT broker that is responsible for pushing data to clients in case something new is published in the specific topics they ...
    • MQTT Retain on TagoIO Broker

      TagoIO's MQTT broker, while not designed to support the native retain feature found in standard MQTT protocol implementations, we offer a workaround to achieve similar functionality. This approach involves utilizing Analysis and Actions features to ...
    • MQTT - Process data, Publish it and Subscribe to a topic

      In this tutorial, you will learn how to process data, publish to a topic, and subscribe to it. We will be using the MQTTX client throughout this tutorial. Connecting to TagoIO MQTT Broker To publish a topic via TagoIO's MQTT, you must first add a ...