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.

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 dashboards, analytics, notifications, 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

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.
The maximum number of simultaneous MQTT connections corresponds to the maximum number of devices allowed on your account, which varies depending on the plan you choose. For detailed information, check out our Pricing Table.
TagoIO MQTT Broker supports v3.1, v3.1.1 and v5.0 protocols.

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 ...
    • 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 - 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 ...
    • 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 ...
    • Raspberry Pi

      Visit this tutorial from our Community to learn how to communicate a Raspberry PI board with TagoIO using our SDK or the MQTT protocol.  More tutorials like this are available in our Forum inside our Community.