In the IoT Platform console, you can add multiple properties, events, and services by importing a Thing Specification Language (TSL) model. To import a TSL model, you can upload a TSL JSON file or copy a TSL model of another product to the current product.
Usage notes
- The previously defined features of the product is overwritten after you import a new TSL model. Proceed with caution.
- If the gateway connection protocol of a gateway sub-device product is set to Modbus, OPC UA, ZigBee, or BLE, you cannot import a TSL model for the product.
- If a product has been published, you cannot add or edit TSL features of the product. To add or edit TSL features, you must unpublish the product.
- If you import the TSL model of another product, the values of the Category parameter that are specified for two products must be the same.
Procedure
Result
After you edit a TSL model, you must publish the TSL model to apply the update. On the Define Feature tab of the Product Details page, you can perform the following operations:
- Click TSL Model to view the TSL model in the JSON format.
Related operations
Operation | Description |
---|---|
UpdateThingModel | Modifies a specified feature or extended information of the TSL model for a product. |
QueryThingModel | Queries the details of a TSL model for a product. |
CopyThingModel | Copies the TSL model of a product to a destination product. |
PublishThingModel | Publishes the TSL model of a product. |
ImportThingModelTsl | Imports a TSL model for a product. Extended information cannot be imported. |
QueryThingModelPublished | Queries the details of a published TSL model for a product. |