IoT Platform allows you to define a Thing Specification Language (TSL) model for a product. You can abstract product features into a data model that consists of properties, services, and events. This facilitates cloud management and data interaction. After the product is created, you can define the TSL model. Devices under the product automatically inherit the TSL model.
- In the left-side navigation pane, choose View in the Actions column.. In the product list, find the product and click
- On the Product Details page, click the Define Feature tab, and then click Edit Draft.
- In the Default Module section of the Define Feature page, click Add Self-defined Feature to configure the TSL feature and then click OK.
Configure the Main Light Switch and Current properties, as shown in the following figures.
- Main Light Switch property
- Current property
- Optional. Click TSL Model. On the Full TSL tab, you can view the JSON file of the complete TSL model.
- 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 can contain letters, digits, and special characters. It must be 1 to 100 characters in length.
- 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. After you confirm your settings, click Confirm. In the Release model online? dialog box, the checkbox is automatically selected.
- Click OK to release the TSL model.
- 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.