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.

Procedure

  1. In the product list, select the product and click View.
  2. On the Product Details page, click Define Feature.
  3. In the Self-Defined Feature section, click Add Feature.
  4. As shown below, add a property to define a switch. Click OK.


  5. As shown below, add a property to define a counter. Click OK.


  6. As shown below, add a service to support numerical calculations. Click OK.


    • Value A is defined as follows:

    • Value B is defined as follows:

    • The output parameter indicates the calculation result.

  7. As shown below, add an event to define a hardware error. Click OK.


    • The output parameter indicates the error code.

  8. Click View TSL and choose Full TSL to view the TSL definitions in JSON format.


What to do next

Establish a connection between a device and IoT Platform