开始使用
  • English
  • 简体中文
前往官网
开始使用
  • English
  • 简体中文
前往官网
  • 开始使用
  • 核心概念
  • 开发指南
  • 设备能力与事件参考
    • 按设备类型浏览
    • 设备能力
      • 通用方法
      • 侦测与告警
        • 布撤防
          • detection.arming.enabled(获取布撤防开关属性)
          • detection.arming.enabled(设置布撤防开关属性)
          • detection.arming.debounceDuration(获取报警去抖时长属性)
          • detection.arming.debounceDuration(设置报警去抖时长属性)
          • detection.arming.triggerInterval(获取事件触发间隔属性)
          • detection.arming.triggerInterval(设置事件触发间隔属性)
          • detection.arming.interval(获取报警间隔属性)
          • detection.arming.interval(设置报警间隔属性)
          • detection.arming.roles(获取本机联动能力属性)
          • detection.arming.linkedDevice(获取关联设备报警属性)
          • detection.arming.linkedDevice(设置关联设备报警属性)
          • detection.arming.changed(布撤防模式变化)
          • detection.arming.mode(获取布撤防模式属性)
          • detection.arming.mode(设置布撤防模式属性)
          • detection.arming.leaveDelay(获取离家延时属性)
          • detection.arming.leaveDelay(设置离家延时属性)
          • detection.arming.applyMode(模式设置)
          • detection.arming.queryMode(模式查询)
        • 关注区域
        • 客流
        • 哭声
        • 离岗
        • 人脸识别
        • 跌倒
        • 手势呼叫
        • 区域入侵
        • 徘徊
        • 未成年检测
        • 人车混合
        • 动检
        • 视频遮挡
        • 车辆违停
        • 人形
        • 宠物
        • PIR
        • 车牌识别
        • 车辆守卫
        • 警笛
        • 语音呼救
        • 异常音
        • 越线
        • 无人出现
        • 车辆
        • 门磁
        • 防拆
        • 门控配件
        • 环境传感
        • 目标检测框
      • 图像
      • 云台
      • 灯光
      • 录像
      • 音频
      • 媒体
      • 网络
      • 电源
      • 隐私
      • 呼叫
      • 存储
      • 系统
      • 算法
      • 设备维护
      • 控制
    • 事件总览
    • 权限码
    • 错误码
    • 告警与能力消息
    • 常见问题
    • 历史能力与推送类型
  • API 参考
  • SDK 与工具
  • 方案
  • 平台与支持
本页目录
功能详情
请求地址
最小权限
传入参数说明
样例输入
返回 data 字段说明
错误码

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。超时不代表未执行。

传入参数说明

参数名参数类型是否必填参数说明
tokenString是管理员、子用户或子账号 accessToken
deviceIdString是设备序列号
productIdString否可省略。传了且与该设备实际型号不一致 → DV2009
serviceIdString是detection.arming.applyMode
inputDataObject是见下表
参数名说明类型必填取值
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

布撤防

detection.arming.leaveDelay(设置离家延时属性)
detection.arming.queryMode(模式查询)