Step 1 - Create the MQTT Backend Connection on TPX

ThingPark X -in short TPX- is the module of the ThingPark platform in charge of dataflow processing. TPX can perform decoding of binary uplink payload to JSON, encoding of REST commands to binary commands, normalization and transformation of data, and it also manages the connections with other services (such as MQTT servers) and platforms (e.g. Microsoft Azure IoT Hub). In this step we will use the mosquitto.org MQTT broker, so we will simply create a new MQTT connection instance.

In the Hello LoRaWAN® and Thingpark cookbook, an HTTP connection was used to send collected data to a webhook for monitoring. In this activity, we are going to create instead a connection to the “mosquitto.org” MQTT Broker as shown in the figure. The type of connection will be set to “MQTT”.

Setting up the dataflow

1

To create a new backend connection, select CREATE in the CONNECTIONS menu.
2

We will use the TPX dataflow engine, so select the TPX option.
3

Select connection type "MQTT" as shown in the figure.
4

Enter a name for the connection. In this activity you can use for example "mosquitto.org."
5

For Host Name and port, enter "test.mosquitto.org:1884". And enter rw as MQTT Username and readwrite as MQTT Password
6

For Protocol: please select TCP.*
7

After clicking 'CREATE' , the new MQTT connection instance appears in the connections list.

*TCP connection should not he used in production usage since it is not secure, use TLS instead.

If the configuration is correct , you will see OPENED icon at the right top of the screen: the TPX engine successfully connected to the target MQTT broker at mosquitto.org. If it shows “FAILED” instead, then check your configuration and the status of the MQTT broker.

You need to check if the configuration of the new TPX MQTT connection is correct and whether TPX could connect to the target MQTT Server

1

Since no device uses that new connection yet, active device count, uplink and downlink counts are all 0.
2

Select the new connection instance (mosquitto.org) from the connections list in order to access details of the new connection.