Skip to main content

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

  1. In the left menu, click Drivers.

    -> You are redirected to ThingPark X IoT Flow interface.

  2. Click ADD DRIVER.

  3. In Information, fill the administrative data of your driver.

    note

    The 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

  4. In Code, add the javascript code associated with the following functions:

    1. decodeUplink.
    2. encodeDownlink.
    3. decodeDownlink.
  5. In Examples, add decoding/encoding samples if available.

  6. Click Create.

    -> Your custom driver has been successfully created. The driver information window opens.

tip

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.

  1. In the driver information window, click ..., then Edit.

  2. Modify the JS code to add a feature or fix a bug.

  3. Select the purpose of your modification by following this illustration:

    Purpose of the modificationOlder versionNew version
    Fix a bug1.0.01.0.1
    Add a feature without breaking changes1.0.01.1.0
    Add a feature with breaking changes1.0.02.0.0
  4. Click Update, then Confirm.

Deleting a custom driver

  1. From either the driver list or the driver details page, click ..., then Remove.

  2. Click Delete.

    -> A deletion note appears. Your custom driver has been successfully deleted.