更新时间:2023-06-15 05:05:54
本文介绍查询设备标准指令集的 API。
查询设备标准指令集后,只返回自动化和一键执行支持的标准指令集。
GET: /v2.0/iot-03/automations/devices/{device_id}/specifications
| 参数名 | 类型 | 参数位置 | 是否必填 | 说明 |
|---|---|---|---|---|
| device_id | String | uri | true | 设备 ID |
| 参数名 | 类型 | 说明 |
|---|---|---|
| result | LinkageDevicePropertiesRes | 返回结果 |
result 说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| device_id | String | 设备 ID |
| functions | List |
执行动作的标准指令 |
| status | List |
触发动作的标准状态 |
functions 说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| code | String | 标准下发指令 Code |
| name | String | Code名称 |
| type | String | 下发数据类型,目前支持以下三种类型:
|
| values | JSONObject | Code 对应的取值范围 |
status 说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| code | String | 标准下发指令 Code |
| name | String | Code名称 |
| type | String | 下发数据类型,目前支持以下三种类型:
|
| values | JSONObject | Code 对应的取值范围 |
GET: /v2.0/iot-03/automations/devices/vdevo162755161767***/specifications
{
"result": {
"device_id": "vdevo16275516176****",
"functions": [
{
"code": "switch_1",
"values": {
},
"type": "Boolean",
"name": "开关1"
},
{
"code": "countdown_1",
"values": {
"max": 86400,
"scale": 0,
"unit": "s",
"min": 0,
"step": 1
},
"type": "Integer",
"name": "开关1倒计时"
},
{
"code": "relay_status",
"values": {
"range": [
"power_off",
"power_on",
"last"
]
},
"type": "Enum",
"name": "设备重启状态设置"
},
{
"code": "light_mode",
"values": {
"range": [
"relay",
"pos",
"none"
]
},
"type": "Enum",
"name": "指示灯模式"
},
{
"code": "child_lock",
"values": {
},
"type": "Boolean",
"name": "童锁"
}
],
"status": [
{
"code": "switch_1",
"values": {
},
"type": "Boolean",
"name": "开关1"
},
{
"code": "countdown_1",
"values": {
"max": 86400,
"scale": 0,
"unit": "s",
"min": 0,
"step": 1
},
"type": "Integer",
"name": "开关1倒计时"
},
{
"code": "relay_status",
"values": {
"range": [
"power_off",
"power_on",
"last"
]
},
"type": "Enum",
"name": "设备重启状态设置"
},
{
"code": "light_mode",
"values": {
"range": [
"relay",
"pos",
"none"
]
},
"type": "Enum",
"name": "指示灯模式"
},
{
"code": "child_lock",
"values": {
},
"type": "Boolean",
"name": "童锁"
}
]
},
"t": 1635390721468,
"success": true
}
参考 错误码。
该内容对您有帮助吗?
是意见反馈该内容对您有帮助吗?
是意见反馈