设置移动侦测参数

接口调用说明

请求地址 : /v1/api/device/alarm/set_mdetect_params
请求方式 : POST

请求头

参数名 参数值 是否必须
Content-Type application/json
X-Token 实际accessToken

请求报文体

data内容如下:

名称 类型 是否必须 备注
deviceSn String 设备序列号
channelId Int 通道号 >=0
enable boolean true : 开启 false :关闭
sensitivity int 灵敏度,范围0~255
alarmSoundEnable boolean 报警声音开关
region Object[] 布防矩阵,矩阵个数不能大于 maxRegions (详情见下表)
time Object 布防时间设置 (详情见下表)

region内容如下:

名称 类型 是否必须 备注
x int 左上角坐标 x, x+width 不应该大于 maxWidth
y int 左上角左边 y,y+height 不应该大于 maxHeight
width int
height int

time内容如下:

名称 类型 是否必须 备注
allTime boolean 全时段布防
timePeriods object [] 布防时段,时间段个数不能大于 maxTimePeriods

timePeriods内容如下:

名称 类型 是否必须 备注
startTime string 开始时间 HHmmss
endTime string 结束时间 HHmmss
week int -1:每天 1:星期一 2:星期二 3:星期三 4:星期四 5:星期五 6:星期六 7: 星期日
//示例数据
{
    "deviceSn": "**********",
    "channelId": 0,
    "enable": true,
    "sensitivity": 20,
    "alarmSoundEnable": true,
    "region": [{
        "x": 150,
        "y": 100,
        "width": 800,
        "height": 800
    }, {
        "x": 110,
        "y": 100,
        "width": 800,
        "height": 800
    }],
    "time": {
        "allTime": true,
        "timePeriods": [{
            "startTime": "080808",
            "endTime": "212223",
            "week": 7
        }]
    }
}

响应报文

名称 类型 是否必须 备注
code int 状态码
msg String 状态码解释信息
data Object 返回内容
//示例数据
{
    "code": 1000,
    "msg": "OK",
    "data": {}
}

错误码

状态码 状态描述
1000 成功
1001 参数错误
1002 请求异常
1006 AccessToken异常或过期
2002 设备不在线
2008 设备不存在
2009 视频通道号不合法
6000 布防时段超过限制
6001 有人形检测的能力,不能操作移动检测

results matching ""

    No results matching ""