In the Things Creator, it is possible to define your own device type including decoder scripts. This guide describes how this is done.
Guide: Adding a New Device Type and Creating a New Decoder
Step 1: Adding a New Device Type
Open the Things Creator Application: Log in to the KPN Things application with your credentials and using the top-level menu, navigate to Things Creator. If you don't see this menu option, you're not authorized to access the Things Creator. Access is provided via the roles in KPN Grip. In order to gain access, send a request to the administrator of your Grip tenant.
Device Type Overview
Within the Things Creator application navigate to Device-Type Management: Click on the new main menu item "All Device Types". View the overview of all available device types.
Create New Device Type
Click on the "Add new Device Type" button. Fill in the required information for the new device type, such as name, description, and any specific properties. Click "Add Device Type" to add the new device type.
Edit or Delete Device Type
If needed, you can edit or delete your own device types through the device type overview. Select the device type from the list and in the device type detail page, click Edit or Delete.
After creating your own device-type, this device-type can be selected in the Things Manager when adding new devices to your project.
Step 2: Creating a New Decoder
Decoder Overview
Navigate to Decoder Management: Click on the menu item "All Decoders". View the overview of all available decoders.
Create New Decoder
Click on the "Add new Decoder" button. Select the device type for which you want to create the decoder. Note that you can only add a decoder for one of your own device types. Be sure to create your own device type first. Fill in the required information for the new decoder, such as name and description. Click "Add Decoder" to add the new decoder.
You can add as many decoders as you like for your device-type.
Edit or Delete Decoder
If needed, you can edit or delete your decoder through the decoder overview. Select the decoder from the list and in the decoder detail page, click Edit or Delete.
Create and Test Decoder Script
After creating a decoder, the decoder script must be created. In the decoder detail page, click the "Create" button in the Script section. Write and test the script using the designated editors. Click "Save" to save the script.
The decoder scripts can be tested using the provided sample payloads, or you can create your own test payload. The Click "Run script with test payload" to test your decoder script. The output and log can be used to validate your script.
Edit or Delete Decoder Script
If needed, you can edit or delete your own decoder scripts through the decoder detail page. Click "Edit" to edit the script and in the edit script dialogue: Click "Delete" to the delete the script. Click "Save" to store any changes to your script.
Step 3: Activating the Decoder in Flow
You have successfully created your own device type and one or more devices of this type have been added to your project. Then the decoder of your choice must be activated in your flow. This is done in the Things Manager application.
Activate Decoder
Select the flow in which you want to activate the decoder and click "Data Processing". In the Data Processing overview, select the device type for wich the decoder shall be activated and toggle the decoder of your choice. Alternatively, you can click the "Add new Decoder" to create a new decoder in the Things Creator application.
Last updated
Was this helpful?