Product node
A Product Node represents a Product in the current service's project. You can use this node to send commands to a device to set properties or call services, query the snapshot or historical values of device properties, and retrieve other device information, such as basic information, thing model details, and event data.
Products you import or create on the Product page of the current project automatically appear under the Device tab of Function Nodes.
Click Associate IoT Platform Product to import an existing Product, or click New Product to create a new Product.If you have not added any Products to the current project, no Product Nodes appear on the Device tab.
Node configuration
| Parameter | Description |
| Node name | Set the node name. The name can contain Chinese characters, English letters, digits, and underscores (_), and must not exceed 30 characters. |
| Select device to control | Select the control target. You can select one of the following:
|
| Select operation type | Select the operation to perform. The options are:
|
| Command data | This field is displayed when you set Select operation type to Device action execution. Send a command to the device to set a specific property or call a specific service. Note The selected property must be read/write. The data format for setting properties is as follows:
|
| Select properties to query | This field is displayed when you set Select operation type to Query device properties. You can select all properties or a specific property. |
| Query dimension | This field is displayed when you set Select operation type to Query device properties.
|
| Query type | This field is displayed when you set Select operation type to Query other device information. From the drop-down list, select the type of information to query and provide the required parameters. For details on the parameters required for each type, see the API documentation in the Thing Management service. You can set parameters as variables. IoT Studio provides the following built-in global variables:
Example:
To access a nested value within a parameter, use the following format: Use Use |
The following is an example of configuring a device action execution.
In the Command data section, select property. For each property (such asRoomHumidity, RoomTemperature, power_LED, and DiskUsage), select Fixed value and set the target value according to its data type (for example, boolean or number).
The following is an example of querying device properties.
When Select operation type is set to Query device properties, you must configure parameters such asProductKey, DeviceName, and the identifiers of the properties to query. The system returns the latest value of the specified device properties.
The following is an example of querying other device information.
When Select operation type is set to Query other device information, select a specific query type, such as Get thing's service call records, from the Query type drop-down list. Then, in the JSON editor below, configure the request parameters, including fields such asserviceIdentifier, start, end, pageSize, and ordered.
Output data
The data returned after a command executes is the node's output.
After a successful debugging session, you can view the output data structure in the node's logs.
The node's output data includes fields such as a return code (code), a device data source (dataSource), and a device ID. For example:
{
"code": 200,
"data": {
"dataSource": {
"deviceName": "yInf...",
"status": "Online"
},
"id": "194572"
}
}