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