开发者平台

TP-LINK官网首页
开发者平台 / 视频管理系统(VMS)/API功能接口定义/设备消息透传

4.14.1 移动侦测参数配置

4.14.1.1 获取动态检测配置

              {
                "method":"get",
                "motion_detection":
                {
                  "name":"motion_det"   //"chn2_motion_det"  (对应多sensor请求,,第一个镜头不需要带chnx前缀)
                }
                
              }
                
              //响应
              { 
                "motion_detection": 
                { 
                  "motion_det":  //"chn2_motion_det"  (对应多sensor请求,,第一个镜头不需要带chnx前缀)
                  { 
                    "enabled": "off", 
                    "sensitivity": "medium", 
                    "digital_sensitivity": "50",
                    "people_enabled": "on",
                    "vehicle_enabled": "on"
                    "non_vehicle_enabled": "on"
                  },
                  "error_code": 0 
                } 
              }                             
      

响应参数说明:

参数 类型 说明
enabled 字符串 选择禁用/启用动态检测功能。
取值范围:
on:启用
off:禁用
sensitivity 字符串 设置动态检测的灵敏度,灵敏度越高越容易产生动态检测。
取值范围:
high:高
medium:中
low:低
digital_sensitivity 字符串 灵敏度。
取值范围:1-100
people_enabled 字符串 人形识别开关,可选,视频检测功能支持人形增强功能时支持该字段, 取值范围: {“on”, “off”}
vehicle_enabled 字符串 车辆识别开关,可选,视频检测功能支持车辆增强功能时支持该字段,取值范围: {“on”, “off”}
non_vehicle_enabled 字符串 非机动车识别开关,可选,视频检测功能支持非机动车增强功能时支持该字段,取值范围: {“on”, “off”}

4.14.1.2 保存动态检测配置

              {
                "method":"set",
                "motion_detection":
                {
                  "motion_det":  //chn2_motion_det(对应多sensor机型的请求,第一个镜头不需要带chnx前缀)
                  { 
                    "enabled": "off", 
                    "sensitivity": "medium", 
                    "digital_sensitivity": "50",
                    "people_enabled": "off",
                    "vehicle_enabled": "off",
                    "non_vehicle_enabled ": "on"
                  }
                }
              }
                
              //响应
              { 
                "error_code": 0 
              }                                              
      

请求参数说明:

参数 类型 说明
enabled 字符串 选择禁用/启用动态检测功能。
取值范围:
on:启用
off:禁用
sensitivity 字符串 设置动态检测的灵敏度,灵敏度越高越容易产生动态检测。
取值范围:
high:高
medium:中
low:低
digital_sensitivity 字符串 灵敏度。
取值范围:1-100
people_enabled 字符串 人形识别开关,可选,视频检测功能支持人形增强功能时支持该字段, 取值范围: {“on”, “off”}
vehicle_enabled 字符串 车辆识别开关,可选,视频检测功能支持车辆增强功能时支持该字段,取值范围: {“on”, “off”}
non_vehicle_enabled 字符串 非机动车识别开关,可选,视频检测功能支持非机动车增强功能时支持该字段,取值范围: {“on”, “off”}

4.14.1.3 设置视频检测区域

该接口的作用会先清空原来的检测区域,再添加新的检测区域。

              {
                "motion_detection":
                {
                  "add_md_regions":
                  {
                    "region_info": // "chn2_region_info"(对应多sensor请求,第一个镜头不需要带chnx前缀)
                    [
                      {
                        "x_coor": "125", 
                        "width": "9749", 
                        "y_coor": "200", 
                        "height": "9599"
                      },
                      {
                        "x_coor": "121", 
                        "width": "9741", 
                        "y_coor": "201", 
                        "height": "9591"
                      }
                    ]
                  }
                },
                "method":"do"
              }
                
                
              //响应
              {
                "error_code": 0 
              }                                                              
      

请求参数说明:

参数 类型 说明
x_coor 数值 矩形区域左上角顶点的x坐标
y_coor 数值 矩形区域左上角顶点的y坐标
width 数值 矩形区域的宽度
height 数值 矩形区域的高度

4.14.1.4 获取动态检测配置(NVR通道使用)

              {
                "method":"get",
                "motion_detection":
                  {
                    "name":"chn1_motion_det"   
                  }
                
              }
                
              //响应
              { 
                "motion_detection": 
                { 
                  "chn1_motion_det": 
                  { 
                    "enabled": "off", 
                    "sensitivity": "medium", 
                    "digital_sensitivity": "50",
                    "people_enabled": "off",
                    "vehicle_enabled": "off",
                  },
                "error_code": 0 
                }    
              }                                                                           
      

请求参数说明:

参数 类型 说明
chn1_motion_det 字符串 指定通道号的动态检测配置信息
格式为 “chn” + 通道ID+ “_motion_det”
例如本例中的通道1的动态检测配置信息为 chn1_motion_det。

响应参数说明:

参数 类型 说明
enabled 字符串 选择禁用/启用动态检测功能。
取值范围:
on:启用
off:禁用
sensitivity 字符串 设置动态检测的灵敏度,灵敏度越高越容易产生动态检测。
取值范围:
high:高
medium:中
low:低
digital_sensitivity 字符串 灵敏度。
取值范围:1-100
people_enabled 字符串 人形识别开关,可选,视频检测功能支持人形增强功能时支持该字段, 取值范围: {“on”, “off”}
vehicle_enabled 字符串 车辆识别开关,可选,视频检测功能支持车辆增强功能时支持该字段,取值范围: {“on”, “off”}

4.14.1.5 获取动态检测异常通知配置(NVR通道使用)

              {
                  "method":"get",
                  "motion_detection":
                  {
                    "name":"chn1_motion_notif_list"
                  }
              }
                
              //响应
              { 
                "motion_detection": 
                {
                  "chn1_motion_notif_list":
                  {
                    "client_enabled": "off", 
                    "app_enabled": "off", 
                    “screenwarn_enabled”: “on”,
                    “buzzer enabled”: “off”,
                    “record_union”: [1, 2, 3, 4],
                    “union_enabled”: “off”,
                    “screenshot_enabled”: “on”,
                    “light_alarm_enabled”: “off”,
                    “sound_alarm_enabled”: “off”
                  }
                }, 
                "error_code": 0
              }                                                                                                
            

请求参数说明:

参数 类型 说明
chn1_motion_notif_list 字符串 指定通道号的动态检测异常通知配置信息
格式为 “chn” + 通道ID + “_ motion_notif_list”
例如本例中的通道1的动态检测异常通知配置信息为 chn1_motion_notif_list。

响应参数说明:

参数 类型 说明
client_enabled 字符串 禁用/启用发生异常通知PC
取值范围:
on:启用
off:禁用
app_enabled 字符串 禁用/启用发生异常通知App
取值范围:
on:启用
off:禁用
screenwarn_enabled 字符串 禁用/启用屏幕提示
on:启用
off:禁用
buzzer_enabled 字符串 禁用/启用蜂鸣器
on:启用
off:禁用
screenshot_enabled 字符串 禁用/启用屏幕截图
on:启用
off:禁用
union_enabled 字符串 禁用/启用录像联动
on:启用
off:禁用
record_union 字符串 内容为加入录像联动的通道数组,元素为通道号,整数类型
light_alarm_enabled 字符串 白光报警开关,取值范围: {“on”, “off”}
sound_alarm_enabled 字符串 声音报警开关,取值范围: {“on”, “off”}

4.14.1.6 保存动态检测配置(NVR通道使用)

              {
                "method":"set",
                "motion_detection":
                {
                  "chn1_motion_det": 
                  { 
                    "enabled": "off", 
                    "sensitivity": "medium", 
                    "digital_sensitivity": "50",
                    "people_enabled": "off",
                    "vehicle_enabled": "off",
                  }
                }
              }
                
              //响应
              { 
                "error_code": 0 
              }                                                                                                                
            

4.14.1.7 设置动态检测区域(NVR通道使用)

              {
                "motion_detection":
                {
                  "chn_add_md_regions":
                  {
                    "region_info":
                    [
                      {
                        "x_coor": "125", 
                        "width": "9749", 
                        "y_coor": "200", 
                        "height": "9599",
                        "channel": "1"
                      },
                      {
                        "x_coor": "121", 
                        "width": "9741", 
                        "y_coor": "201", 
                        "height": "9591",
                        "channel": "1"
                      }
                    ]
                  }
                },
                "method":"do"
              }
                
                
              //响应
              {
                "error_code": 0 
              }                                                                                                                 
            

请求参数说明:

参数 类型 说明
x_coor 字符串 矩形区域左上角顶点的x坐标
y_coor 字符串 矩形区域左上角顶点的y坐标
width 字符串 矩形区域的宽度
height 字符串 矩形区域的高度
channel 字符串 设置检测区域的通道ID
添加指定通道的多个矩形区域信息。传入配置有改变的通道的配置信息时,会先清空原来的检测区域,再添加新的检测区域。

清空一个通道的所有区域信息只需要传一个{"channel":id, "x_coor": "null", "y_coor": "null", "width": "null", "height": "null"}

清空通道1234的区域信息。

{

    "method": "do",

    "cover":

    {

        "chn_add_md_regions ":

        {

            "region_info": 

            [ 

                {"channel":1, "x_coor": "null", "y_coor": "null", "width": "null", "height": "null"},

                {"channel":2, "x_coor": "null", "y_coor": "null", "width": "null", "height": "null"},

                {"channel":3, "x_coor": "null", "y_coor": "null", "width": "null", "height": "null"},

                {"channel":4, "x_coor": "null", "y_coor": "null", "width": "null", "height": "null"}

            ] 

        } 

    }

请求参数说明:

参数 类型 说明
enabled 字符串 选择禁用/启用动态检测功能。
取值范围:
on:启用
off:禁用
sensitivity 字符串 设置动态检测的灵敏度,灵敏度越高越容易产生动态检测。
取值范围:
high:高
medium:中
low:低
digital_sensitivity 字符串 设置动态检测的灵敏度,灵敏度越高越容易产生动态检测。
取值范围:1-100
people_enabled 字符串 人形识别开关, 取值范围: {“on”, “off”}
vehicle_enabled 字符串 车辆识别开关,取值范围: {“on”, “off”}

4.14.1.8 保存动态检测异常通知配置(NVR通道使用)

              {
                "method":"do",
                "motion_detection":
                {
                  "chn_set_md_notif":
                {
                  "notif_info":
                  [
                    {
                      "channel ": 1,
                      "client_enabled": "off",
                      "app_enabled": "off",
                      "screenwarn_enabled": "on",
                      "buzzer_enabled": "off",
                      "union_enabled": "off",
                      "record_union": [],
                      "light_alarm_enabled": "off",
                      "sound_alarm_enabled": "off"
                    }
                  ]
                }
                }
              }
                
                //响应
                {
                  "error_code": 0
                }  
                                                                                                                              
            

请求参数说明:

参数 类型 说明
channel 整型 通道号
client_enabled 字符串 禁用/启用发生异常通知PC
取值范围:
on:启用
off:禁用
app_enabled 字符串 禁用/启用发生异常通知App
取值范围:
on:启用
off:禁用
screenwarn_enabled 字符串 禁用/启用屏幕提示
on:启用
off:禁用
buzzer_enabled 字符串 禁用/启用屏幕截图
on:启用
off:禁用
union_enabled 字符串 禁用/启用录像联动
on:启用
off:禁用
record_union 字符串 内容为加入录像联动的通道数组,元素为通道号,整数类型
light_alarm_enabled 字符串 白光报警开关,取值范围: {“on”, “off”}
sound_alarm_enabled 字符串 声音报警开关,取值范围: {“on”, “off”}