Step 11 - Connection Definitions of SCADA for TPC

In this step, you will:

Modify the connection specifications to receive MQTT data for usage as device data.

Previously, you had created a connection definition to fetch the data from the MQTT Server. Now it is time to define more information on MQTT data, such as the MQTT topic name to subscribe to and the data structure of the message. You are going to use the temperature and humidity readings of the sensor, and you need to subscribe to relevant MQTT topics to receive them.”

In the TPX connection definitions, the default Publish topic Pattern is given as mqtt/things/{DevEUI}/uplink. You should replace {DevEUI} with the DevEUI of your device.

Furthermore, since you have toggled the Field as topic option to ON in the ADVANCED SETTINGS (it’s OFF by default), you’ll need to append data/ to continue constructing the topic name.

Lastly, to fully construct the topic name, include the data element names defined in TPX: airTemp and airHum. This is because you’re subscribing to the topics for temperature and humidity readings.

Therefore, your topic field entries should look like this:

mqtt/things/7C5A65587192983F/uplink/data/airTemp

mqtt/things/7C5A65587192983F/uplink/data/airHum

Please notice that this example assumes your DevEUI is 7C5A65587192983F.

1

Click Line Options to open Line Options panel to edit the definitions of MQTT messages.

2

Click Device Polling to edit device data definitions for the device that you previously created.

3

Click Properties to open the MQTT topic/data definitions panel.

4

Click to + sign in order to add subscription or publish (command) definitions.

5

Select Add Subscription to subscribe to a topic at MQTT Server in order to receive the data published by TPC.

In this panel, you are going to specify the MQTT topic name in the topic field to retrieve the data and assign them a Tag code. You can think of the Tag code as a variable name that you will use when needed, such as in reports.

6

Give an arbitrary name for the subscription definition. You can write Temperature as an example since it will hold the temperature value.

7

Give an arbitrary name for the Tag Code* definition. You can write 101 as an example.

8

Enter the topic name for which TPX published the temperature data of the sensor as described above.

9

Click Save to save your definitions.

10-11-12-13-14-15

Repeat the same steps for humidity to define Display name, Tag code and topic to subscribe to.

*a tag is a symbolic name that represents a data point. In this case, either temperature or humidity data from the LoRaWAN® sensor.

If you wish to revisit the connection definition that you just made, you can follow the steps shown below.  Just follow the steps 16 – 21

16

Select your device definition. LoRaWAN®_Sensor in this case.

17

Give an arbitrary name for the Tag Code* definition. You can write 101 as an example.

18

Select Properties to access Subscription setting such as topic names.

19

Click + to view subscription settings.

20

Select Temperature to view subscription settings in order to get Temperature value from the MQTT Broker* hosted in mosquitto.org .

21

Now, you can review the details of the Temperature subscription.

*MQTT Broker definitions were defined in the Connection section of the Administration application.

Now you need to upload the changes into the Rapid Scada engine. You are going to use the Upload Configuration option for this purpose.

22

Click to the Upload icon to access to Upload Configuration dialog.

23

Click on Upload to start the upload process.

24

Verify that all the tasks have been completed successfully, and then click Close to return to the main page of the administration application.

25

Click Close to return to the main screen of the Administration application.