跳到主要内容
版本:2.0.0@Current

查询您账户权限下的设备状态

设备状态枚举

返回值解释
NORMAL正常并网 、离网发电
OFFLINE离线;持续 5 分钟没有收到设备数据包
STANDBY待机、升级中
FAULT存在故障

查询单台设备的状态

✨ 案例

Request

curl '{{EU}}/wrapper/device/getDeviceStatus?deviceSn=A212300164230043' \
-H 'token: xxx'

Response ①

{
"errorCode": 0,
"info": null,
"body": "OFFLINE",
"successful": true
}

Response ②

{
"errorCode": 1,
"info": {
"code": "You do not have permission for this device.",
"description": "You do not have permission for this device."
},
"body": null,
"successful": false
}

查询多台设备的状态

单词查询最多查询 50 台设备

✨ 案例

Request

curl -X POST '{{EU}}/wrapper/device/batchGetDeviceStatuses' \
-H 'token: XXX' \
-H 'Content-Type: application/json' \
-d '{"deviceSns": ["A002300132602057", "A212300152332046", "A11240010034102B", "B112300106530072"]}'

Response ①

{
"errorCode": 0,
"info": null,
"body": {
"A11240010034102B": "NORMAL",
"A002300132602057": "OFFLINE",
"A212300152332046": "OFFLINE"
},
"successful": true
}

Response ②

{
"errorCode": 1,
"info": {
"code": "Batch size should not over 50",
"description": "Batch size should not over 50"
},
"body": null,
"successful": false
}