Step 2 - Update the Sensor Definitions on TPE

The TPX engine of ThingPark Community already has a comprehensive library of CoDecs, and they regularly get updated by the development team as well as the community. You can also write your own custom CoDec, or contribute it on the GIT repository. These CoDecs are very handy to process the collected sensor data with no coding effort. In this cookbook, we are using the Tinovi LoRaWAN® IO Module, which already has a CoDeC available in the TPX CoDec library.

Previously, in the Hello LoRaWAN® and Thingpark cookbook, the device had been created on ThingPark Community with generic parameters (“Generic”  as Manufacturer and “LoRaWAN® 1.0.2 revC – Class A” as Model), because we didn’t need any device specific parsing.

Now let’s change it to the correct Manufacturer (Tinovi) and Model (LoRaWAN® Soil Moisture…) in the Devices console as shown in the figure. This information allows the TPX dataflow to automatically select the appropriate CoDec.

1

Click to 'pen' Icon to edit the Manufacturer and Model of the sensor.
2

Select “Tinovi” as Manufacturer and “LoRaWAN® Soil Moisture, Temperature…” as Model. Click on SAVE in the pop-up.
3

Notice that the picture of the device has been updated automatically.
4

Now Manufacturer and Model fields are updated.
5

Finally, if you check LAST 10 PACKETS section you will see that data is being received from the device.
6

As you can notice, data is no longer in binary form but JSON formatted: it has been automatically decoded by TPX, which will help to process the data. Otherwise, you would need to write your own data parser to extract actionable data from the binary payloads received from the device.
7

Click to ADD CONNECTION icon to associate the new connection to this device. This instructs the platform to route uplink frames to this TPX connection. Multiple devices can be associated to the same TPX connection.
8

Select mosquitto.org as connector name from the list.
9

Now, you will see that morquitto.org has been added to CONNECTIONS. In this case, received data will be sent to both myWebHookForTest and mosquitto.org connections simultaneously.