Step 3 - TPX Connection Definitions

In this step, you will:

Create a definition of a connection to an MQTT Server.

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

1

Click on the ADD CONNECTION under the Connections category onin the left menu.

2

Select TPX to use the TPX engine.

3

Select MQTT as the connection type, as shown in the figure.

4

Please enter a name for the connection. In this activity you can use test mosquitto

5

For Host Name, Please enter test.mosquitto.org:1884

6

For Protocol: please select TCP, instead of SSL which is default value.

7

For MQTT Username, enter rw

8

For MQTT Password, enter readwrite

9

When click to “Create” button, you will notice that new connection added to connection list.

*TCP connection should not he used in production usage since it is not secure.

Following the creation of the connection, you must enable the Field As topic option in the ADVANCED SETTINGS section.

Notice that the value specified in the Published topic Pattern field will be used in the Scada system configuration. This field defines the name of the topic for which values will be published on the MQTT Server. So,

mqtt/things/{DevEUI}/uplink will be replaced with mqtt/things/7C5A65587192983F/uplink

at runtime, if DevEUI of your device is 7C5A65587192983F

10

Please enter a name for the connection. In this activity you can use test mosquitto

11

Slide the Field As topic option to the ON.

12

Click to PROCEED UPDATE

Now, you can verify if the new TPX definition is accurate and TPC can access the MQTT Server properly.

11

Select the new connection  from the connections list to access the details of the new connection named mosquitto.org.

12

If all definitions are correct, you will see “OPENED” icon at the right top of the screen. It means that the TPX connector successfully connected to the target system, which is the test MQTT broker at mosquitto.org

13

Since no device uses the mosquitto.org connection, active device count, uplink and downlink counts are 0.