设置IoT物模型中指定的Property属性值
# setIotDeviceProperties:设置IoT物模型中指定的Property属性值
# 功能详情
基于产品物模型,设置指定的Property属性值
# 请求地址
https://openapi.lechange.cn/openapi/setIotDeviceProperties
# 传入参数说明
参数名 | 参数类型 | 是否必填 | 默认值 | 合法值 | 参数说明 |
---|---|---|---|---|---|
token | String | 是 | 管理员或者子账户accessToken | ||
productId | String | 是 | 产品id即为listDeviceDetailsByIds、listDeviceDetailsByPage查询设备列表接口中的返回值productId,若列表返回的productId字段有值,即代表该设备为IoT设备,支持调用IoT物模型相关协议 | 设备产品id | |
deviceId | String | 是 | 设备序列号 | ||
properties | [Object] | 是 | 通过获取产品物模型获取设备支持的Property属性 | 物模型中的Property属性的ref值和要设置的value值。格式为{"ref1":"设置值1", "ref2":"设置值2"} |
# 样例输入
{
"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
}
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 返回参数说明
无data数据返回
# 样例输出
{
"result": {
"msg": "操作成功。",
"code": "0"
},
"id": "a25f887f-33f0-44ef-9ed3-f60f83193482"
}
1
2
3
4
5
6
7
2
3
4
5
6
7