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 way, IoT Platform can manage the devices of products and exchange data with the devices in an efficient manner. After a product is created, you can define a TSL model for the product. The devices of the product automatically inherit the features from the TSL model.
Prerequisites
A product is created. For more information, see Create a product and add a device.Background information
This article describes how to define the Current and Main Light Switch TSL properties for the product to which a street lamp belongs. After you define the TSL model, you can add street lamps to the product. The street lamps automatically inherit the defined TSL model. For more information about TSL models, see What is a TSL model?.Procedure
- Log on to the IoT Platform console.
- On the Overview page, click the Public Instance card. Important If IoT Platform is activated in the China (Shanghai) or Japan (Tokyo) region, perform this step. If IoT Platform is activated in other regions, skip this step.
- 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. Important A TSL model takes effect only after the model is published