In the Things Creator, it is possible to define your own device type including decoder scripts. This guide describes how this is done.
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.
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.
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.
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.
Navigate to Decoder Management: Click on the menu item "All Decoders". View the overview of all available decoders.
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.
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.
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.
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.
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.
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.