获取设备列表

更新时间:2023-06-15 06:09:57

本文介绍获取设备列表的 API。

接口描述

获取设备信息列表。

接口地址

GET: /v1.0/illumination/devices

请求参数

参数名类型参数位置是否必填说明
projectIdStringurifalse项目 ID。
roomIdStringuritrue房间 ID。
roomTypeIntegeruritrue房间类型。
pageIntegerurifalse当前页码。
pageSizeIntegerurifalse每页记录数量。
deviceStatusList《String》uritrue设备状态。

返回参数

参数名类型说明
totalint返回的总条数。
listDeviceBasicVO[]设备信息列表。

请求示例

GET: /v1.0/illumination/devices
{
  "pageSize": "10",
  "page": "1",
  "projectId": "1323671234234",
  "roomId": "152372223482",
}

返回示例

{
    "tid": "f2919c24fbac11ed876d16e5066b4061",
    "result": {
        "list": [
            {
                "switchInfo": [
                ],
                "masterGroupJoinStatus": 2,
                "deviceStatuses": [
                    "normal"
                ],
                "industryPurpose": {
                },
                "installTime": 1681962468804,
                "switchStatus": false,
                "ownerId": "59457509",
                "deviceId": "6c4794741ec4f88c993***",
                "deviceName": "网关测试",
                "uuid": "a651b293c892b***",
                "roomId": "1559640253681***",
                "deviceStatus": "normal",
                "capability": "zigbee/wifi",
                "pointId": "",
                "devicePurpose": {
                },
                "deviceMac": "",
                "currentBrightness": 0,
                "model": "",
                "id": 2114488,
                "deviceType": "gateway",
                "deviceTypeValue": 1,
                "productId": "wpr7snzwzxbsy***",
                "deviceSaasId": "sa43837415438329***",
                "categoryCode": "wf_zig_wg2",
                "roomName": "测试",
                "topCategory": "wgzk",
                "online": true,
                "devicePower": 0,
                "category": "wg2",
                "projectId": "1541976932755718***",
                "properties": [
                    {
                        "dpName": "报警静音",
                        "dpId": 4,
                        "mode": "rw",
                        "dpValueStd": "false",
                        "propertyDetail": {
                            "type": "bool"
                        },
                        "dpCode": "switch_alarm_sound",
                        "property": {
                            "range": [
                            ]
                        }
                    }
                ]
            }
        ],
        "total": 1
    },
    "t": 1685095574507,
    "success": true
}

错误码

参考 错误码