detection.arming.queryMode(模式查询)
detection.arming.queryMode:模式查询
detection.arming.queryMode · 设备级 · 权限 Config
功能详情
按模式查询子设备布撤防状态。出参 configParams 含 subSn、status(int 0/1)。
请求地址
POST https://openapi-[DataCenter].easy4ip.com/openapi/v2/device.service.invoke
最小权限
管理员操作自己绑定的设备不需要权限。操作被分享设备需要基础配置权限。子用户绑定不需要。子账号需要 Config。设备级不要传 channelId。
传入参数说明
| 参数名 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
token | String | 是 | 管理员、子用户或子账号 accessToken |
deviceId | String | 是 | 设备序列号 |
productId | String | 否 | 可省略。传了且与该设备实际型号不一致 → DV2009 |
serviceId | String | 是 | detection.arming.queryMode |
inputData | Object | 是 | 见下表 |
| 参数名 | 说明 | 类型 | 必填 | 取值 |
|---|---|---|---|---|
mode | 查询的模式 | enum | 是 | 0 在家;1 离家;2 撤防 |
样例输入
{
"id": "d5c287b4-5b2f-4f03-baf5-8032c5c354af",
"system": {
"ver": "1.0",
"appId": "lcdxxxxxxxxx",
"sign": "<computed>",
"time": 1706511734,
"nonce": "f5a1ae2d-c09c-4d39-a744-83a5c2c653c2"
},
"params": {
"token": "<yourAccessToken>",
"deviceId": "TESTGW000012345",
"serviceId": "detection.arming.queryMode",
"inputData": { "mode": "1" }
}
}
出参在 result.data.outputData(含 configParams 等),见上表。
返回 data 字段说明
| 参数名 | 说明 | 类型 | 必填 | 取值 |
|---|---|---|---|---|
configParams | 子设备配置列表 | array | 否 | |
configParams[].subSn | 子设备号 | text | 是 | |
configParams[].status | 状态 | int | 是 | 0 撤防;1 布防 |
错误码
网关
DV20xx
