Appearance
GET 获取单个设备
GET /clip/v2/resource/device/device_uuid
说明
- 此接口的应答中,
data为对象- 对象的字段信息与 获取设备列表 中的一致
- 当UUID不存在时, 会返回 404 Not Found
返回示例
json
{
"code": 0,
"msg": "success",
"data": {
"obj": {
"id": "27968061-68C1-4538-83AF-88E390FD8933",
"type": "device",
"name": "Bar Lamp",
"join_status": 1,
"online": 1,
"has_new": 0,
"product": {
"cat1_id": 2,
"cat1_name": "Light",
"cat2_id": 205,
"cat2_name": "RGB CW Light",
"cat3_id": 20504,
"cat3_name": "Bar Lamp",
"manufacturer": "Bweetech",
"model": "915005988001",
"hardware_version": "6",
"software_version": "",
"zigbee_version": "4.8.8_46"
},
"services": [
{
"rid": "8C3C3D02-A008-44F2-9C6A-146705167EB3",
"rtype": "light"
}
]
}
}
}json
{
"code": -1,
"msg": "not found"
}返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
返回数据结构
状态码 200
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| » code | integer | true | none | none | |
| » msg | string | true | none | none | |
| » data | object | true | none | none | |
| »» obj | object | true | none | none | |
| »»» id | string | true | none | 设备UUID | none |
| »»» type | string | true | none | 类型 | 此处必然为 device |
| »»» name | string | true | none | 名称 | none |
| »»» join_status | integer | true | none | 入网状态 | 一般, 需要过滤 join_status=1 的设备, 若=0, 代表不是用户想加的设备 |
| »»» online | integer | true | none | 在线状态 | 1在线, 0离线 |
| »»» has_new | integer | true | none | 是否有新版本 | 1有更新, 0无 |
| »»» product | object | true | none | 产品信息 | none |
| »»»» cat1_id | integer | true | none | 1类id | 1网关, 2灯具, 3同步器 |
| »»»» cat1_name | string | true | none | 1类名称 | none |
| »»»» cat2_id | integer | true | none | 2类id | 分类信息, 如 203为CW灯, 205为RGBCW灯 |
| »»»» cat2_name | string | true | none | 2类名称 | none |
| »»»» cat3_id | integer | true | none | 3类id | 精确到产品, 如 20504 为 Bar灯 |
| »»»» cat3_name | string | true | none | 3类名称 | none |
| »»»» manufacturer | string | true | none | 厂商信息 | zigbee basic cluster 中的 manufacturer |
| »»»» model | string | true | none | 型号 | zigbee basic cluster 中的 model |
| »»»» hardware_version | string | true | none | 硬件版本号 | none |
| »»»» software_version | string | true | none | 软件版本号 | none |
| »»»» zigbee_version | string | true | none | Zigbee版本号 | none |
| »»» services | [ResInfo] | true | none | none | |
| »»»» rid | string | true | none | 资源UUID | none |
| »»»» rtype | string | true | none | 资源类型 | none |