IoT Platform allows you to define features for products. You can use a TSL model to describe product features, including properties, services, and events. The TSL model makes it easy to manage products and data transmission. After you create a product, you can define a TSL model to describe product features. Devices under this product automatically inherit its features.
- In the product list, select the product and click View.
- On the Product Details page, click Define Feature.
- In the Self-Defined Feature section, click Add Self-defined Feature.
- As shown below, add a property to define a switch.
- As shown below, add a property to define a counter.
- As shown below, add a service to support numerical calculations.
Value A is defined as follows:
- Value B is defined as follows:
The output parameter indicates the calculation result.
- As shown below, add an event to define a hardware error.
The output parameter indicates the error code.
- Click View TSL and choose Full TSL to view the TSL definitions in JSON format.
- Release the TSL model.
- On the Edit Draft page, click Release Online. The Release model online? dialog box appears.
- Optional. Click +Add post notes, and enter a version number and note.
Parameter Description Version Number The version number of the TSL model. You can manage the TSL model based on the version number.
The version number must be 1 to 16 characters in length, and can contain letters, digits, and periods (.).
Note The description of the TSL model. The description must be 1 to 100 characters in length, and can contain letters, digits, and special characters.
- If an online version is available, you must check the differences between the current
version and the online version.Click View differences. In the View Differences dialog box, you can view the differences. If the current version is configured as normal, click Confirm. In the Release model online? dialog box, the checkbox is automatically selected.
- Click OK to release the TSL model.Note
- A TSL model is applied to the product only after it is released.
- IoT Platform can save the latest 10 versions of a TSL model. Earlier versions are overwritten.