Using custom payload drivers
A custom driver is an editable driver that decodes uplink payloads created by the user in the ThingPark X IoT Flow interface. It may optionally encode downlink payloads too.
The custom driver is opposed to the built-in system drivers which are directly imported from ThingPark's driver catalog.
For more information about built-in drivers, see TPX documentation.
Creating a custom driver
-
In the left menu, click Drivers.
-> You are redirected to ThingPark X IoT Flow interface.
-
Click ADD DRIVER.
-
In Information, fill the administrative data of your driver.
noteThe Protocol Identifier is a block of information composed of Protocol Manufacturer, Protocol Name and Protocol Version.
Example:abeeway:asset-tracker:2
This protocol identifier is used to later associate your devices with this custom driver. To learn more, see Viewing and edit the driver settings
-
In Code, add the javascript code associated with the following functions:
- decodeUplink.
- encodeDownlink.
- decodeDownlink.
-
In Examples, add decoding/encoding samples if available.
-
Click Create.
-> Your custom driver has been successfully created. The driver information window opens.
To view the list of custom drivers already available in your subscription: In Drivers, click Custom.
To duplicate a driver, click ... either from the driver list or from the driver details page, then Duplicate.
Updating a custom driver
You can update the version of your custom driver.
-
In the driver information window, click ..., then Edit.
-
Modify the JS code to add a feature or fix a bug.
-
Select the purpose of your modification by following this illustration:
Purpose of the modification Older version New version Fix a bug 1.0.0 1.0.1 Add a feature without breaking changes 1.0.0 1.1.0 Add a feature with breaking changes 1.0.0 2.0.0 -
Click Update, then Confirm.
Deleting a custom driver
-
From either the driver list or the driver details page, click ..., then Remove.
-
Click Delete.
-> A deletion note appears. Your custom driver has been successfully deleted.