laitimes

Scripting management of ThingsKit IoT platform product rule engine operation

author:Yunteng Five Continents
Scripting management of ThingsKit IoT platform product rule engine operation

For devices that use transparent transmission format or custom data format, you need to write data parsing scripts in the cloud to convert the binary data or custom JSON data reported by the device into JSON data format supported by IoT Platform. Converts the JSON data delivered by the platform to a format supported by the device.

TCP conversion script

Added conversion scripts

Click Add Conversion Script to add an upstream data parsing script and an authentication script.

Scripting management of ThingsKit IoT platform product rule engine operation
TCP conversion script parameters Parameter description
name
  • Define the conversion script name
  • Required
  • Support input length limit: 36 characters
  • Supported input formats: Chinese and English, characters, numbers
Script type
  • Upstream data parsing script and authentication script type
  • Required
Screenplay content
  • The data of the TCP device is parsed and displayed to the TSL data of the platform device
  • Not required
remark
  • Convert script remarks information
  • Required

prompt

This feature is only available for TCP transport protocol. The upstream data parsing script refers to the parsing of the device TSM, and the authentication script is the parsing of the device credentials.

edit

Select the conversion script to modify the content.

Scripting management of ThingsKit IoT platform product rule engine operation

prompt

TCP conversion scripts cannot be edited until they are disabled.

Test

When TCP script test is added, you can select different script types to test, or click the Test button to test after the new test.

Scripting management of ThingsKit IoT platform product rule engine operation

enable

After adding script management, click the Enable button for the script conversion to take effect.

Scripting management of ThingsKit IoT platform product rule engine operation

prompt

When status is enabled, it cannot be edited and deleted.

Search

Query specific data based on script management name, status, and creation time.

Scripting management of ThingsKit IoT platform product rule engine operation

Delete

Single item or batch deletion script management.

Scripting management of ThingsKit IoT platform product rule engine operation

Rule chain conversion script

Added conversion scripts

Click Add Conversion Script, fill in the relevant information, and confirm.

Scripting management of ThingsKit IoT platform product rule engine operation
The rulechain script manages parameters Parameter description
name
  • Defines the rule chain transformation script name
  • Required
  • Support input length limit: 32 characters
  • Supported input formats: Chinese and English, characters, numbers
illustrate
  • Explain the script content
  • Not required
Transfer function functionality
  • The received data format is parsed into the data format desired by the platform through the conversion function
  • Not required

edit

Select the rule chain script to edit it.

Scripting management of ThingsKit IoT platform product rule engine operation

Test the conversion script

Test the transfer function functionality when adding or editing.

Scripting management of ThingsKit IoT platform product rule engine operation

enable

Enable rule chain conversion scripts.

Scripting management of ThingsKit IoT platform product rule engine operation

Search

Search for data based on name, status, and creation time.

Scripting management of ThingsKit IoT platform product rule engine operation

Delete

Delete conversion scripts individually or in bulk.

Scripting management of ThingsKit IoT platform product rule engine operation

Read on