cloemqttbrokerbanner.png

How to retrieve your IoT data with a MQTT client ?

In most cases, an IoT Telco operator allows you access the data from your sensors by pushing this data to your application over HTTP. We have seen in previous articles that Proximus CloudEngine makes it possible to benefit from other integration capabilities, ranging from Microsoft Azure and SAP IoT Cloud down to various protocols such as sFTP and mail. To the already existing CloudEngine’s ability to use its own MQTT client to connect to your MQTT broker, we add now the ability for your MQTT client to connect to the CloudEngine’s broker.

Using the CloudEngine’s MQTT Broker simple and straightforward.

Step 1 – Define your client’s credentials

The first step is to create the credentials for your MQTT client. In the CloudEngine’s microsite, click on Settings then select “MQTT” in the Inbound Endpoint type list. Add a new configuration item and give it a name and password. Be careful and take a note of that password as it won’t be displayed once the item uis saved.

CloudEngine MQTT settings

Step 2 – Integrate our MQTT Broker module in your script

The second step is to integrate the MQTT Broker outbound module in your CloudEngine visual flow or script. In the creator of the MQTT Broker object, you include the reference to the credentials that we just created in the step above (“mqttbrotest” in the example below) and the MQTT topic to which the data will be published (“lorasensors/pxsmythings” in the example below). Topics can have several levels if needed, such as “mytopic/level2/level3″. You must also specify the MQTT QoS (0 for best effort delivery, 1 for at least one or 2 for exactly once).

CLOE script including the MQTT Broker module

Step 3 – Connect your MQTT client to our broker

The final step is obviously to connect your MQTT client to our broker and start receiving your messages. The URL of our broker is simply “mqtt.enco.io”, using a secured connection on port 888, or unsecured on port 1883. Credentials for your client have been defined as first step and the topic to which it should register must include the username, so in our example lorasensors/pxsmythings becomes mqttbrotest/lorasensors/pxsmythings.

Enjoy more secure & reliable data transfer 

Now it’s your turn to leverage our new MQTT Broker and leverage the reliability, security and flexibility of the MQTT protocol !

EnCo TeamHow to retrieve your IoT data with a MQTT client ?
Share this post

Related Posts