Set IoT Device Properties via Product ID - Imou Open Platform
setIotDeviceProperties: Set the property value of the product based on productId
Function details
Set the property value of the product based on productId
Request address
https://openapi-[DataCenter].easy4ip.com/openapi/setIotDeviceProperties
Incoming parameter description
| Parameter name | Parameter type | Required or not | Default value | Legal value | Parameter description |
|---|---|---|---|---|---|
| token | String | yes | Administrator or sub-account accessToken | ||
| productId | String | yes | Refers to the productId returned by the listDeviceDetailsByIds and listDeviceDetailsByPage interfaces. If the productId field returned by the list has a value, it indicates that the device is an IoT device and supports calling IoT things data model Interface | unique id of product | |
| deviceId | String | yes | Device serial number | ||
| properties | [Object] | yes | View the properties supported by the device through getProductModel | The ref value and the value to be set for the property in the things data model. The format is {"ref1": "Set Value 1", "ref2": "Set Value 2"} |
Sample input
{
"system":{
"ver":"1.0",
"appId":"lcdxxxxxxxxx",
"sign":"58386675a58cf164d64c1944fd33a516",
"time":1603366491,
"nonce":"7aed0429-1a92-4a51-b8b0-cfebb60dcc85"
},
"id":"a25f887f-33f0-44ef-9ed3-f60f83193482",
"params":{
"token":"At_00000xxxxxxxxxxxxxxxxxx",
"productId": "W8ql32289",
"deviceId": "TESTQWERXXXX",
"properties": {
"3302":2,
"3301":1
}
}
}
Return data field description
No data returned
Sample output
{
"result": {
"msg": "Operation is successful.",
"code": "0"
},
"id": "a25f887f-33f0-44ef-9ed3-f60f83193482"
}
