This topic describes how to create a temperature sensor product and devices. It also includes definitions for TSL models, and describes how to create data forwarding rules in the IoT Platform console.
- Log on to the IoT Platform console.
- In the left-side navigation pane, choose Create Product to create a product. For more information, see Create a product.
. On the page that appears, click
- On the Product Details page of the product, click the Define Feature tab. In the Self-Defined Feature section, click Add Feature to define the temperature property for the product.
- In the left-side navigation pane, click Devices. On the page that appears, click Batch Add to add multiple devices.
In this example, add 5,000 devices. You can add a maximum of 1,000 devices at a time. Therefore, you must add devices a minimum of five times. For more information, see Create multiple devices at a time.
- In the left-side navigation pane, click Rules. On the page that appears, create a data forwarding rule to allow forwarding of the
temperature data reported by the temperature sensor to Function Compute.
For more information, see Create and configure a rule.
- Click Create Rule to create a rule that processes JSON-formatted data.
- Click View to go to the details page of the rule and write a SQL statement for data processing.
The SQL statement in this example can be used to filter data from the reported property data. It will return the value of the deviceName field and Temperature field when the temperature is higher than 25°C. These two fields are forwarded to Function Compute.
- Add a data forwarding operation and set the data forwarding destination to Function
- After the rule configuration is complete, return to the Rules page and click Start to start implementing the rule.