detection.arming.applyMode(模式设置)
detection.arming.applyMode:模式设置
detection.arming.applyMode · 设备级 · 权限 Config
功能详情
按模式批量设置子设备布撤防状态。公开 JSON 使用 configParams、subSn(camelCase)。调一次执行一次。
请求地址
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.applyMode |
inputData | Object | 是 | 见下表 |
| 参数名 | 说明 | 类型 | 必填 | 取值 |
|---|---|---|---|---|
mode | 模式 | enum | 是 | 0 在家;1 离家;2 撤防 |
configParams | 子设备布撤防列表 | array | 是 | 最多 100 条 |
configParams[].subSn | 子设备序列号 | text | 是 | |
configParams[].status | 状态 | int | 是 | 0 撤防;1 布防 |
样例输入
{
"id": "d5c287b4-5b2f-4f03-baf5-8032c5c354af",
"system": {
"ver": "1.0",
"appId": "lcdxxxxxxxxx",
"sign": "xjhCQBoJ9hRDsCjyDcHjtDNzRZ3ZJezcawsfWeiaoxU=",
"time": 1706511734,
"nonce": "f5a1ae2d-c09c-4d39-a744-83a5c2c653c2"
},
"params": {
"token": "<yourAccessToken>",
"deviceId": "TESTGW000012345",
"serviceId": "detection.arming.applyMode",
"inputData": {
"mode": "1",
"configParams": [
{ "subSn": "SUB0001", "status": 1 }
]
}
}
}
返回 data 字段说明
出参在 result.data.outputData(若设备无出参则为空对象)。
错误码
网关
DV20xx
