Range

Function

This API is used to get the parameter range of AI > Setup > WanderDetection.

Request Message

Parameter Description

Table 1
ParameterRangeTypeDescription
channel“CH1” ”CH1x”“IP_CH1” ” IP_CH1x”“WIFI_CH1”…” WIFI_CH1x”
The number of channels depends on the functionality of the device.
string arrayEach array bit represents a channel with a string. DVR/NVR requirements; IPC only uses CH1
page_type“ChannelConfig”,“AlarmConfig” “AllConfig”stringData used to distinguish between channel configuration page and alarm configuration page
“AllConfig”Used in nvr to obtain and set ipc parameters, with more light than ChannelConfig_ Linkage field

Sample:

POST /API/AI/Setup/WanderDetection/Range HTTP/1.1
{
    "version": "1.0",
    "data": {"page_type": "ChannelConfig"}
}

Response Message

Parameter Description

Table 2
ParameterRangeTypeDescripton
channel_infoJson ObjectChannel information refer to Table x
Table x
ParameterRangeTypeDescription
CH1Json ObjectJson see Table 3 for more information
...Json Object
IP_CH1Json Object
...Json Object
WIFI_CH1Json Object
...Json Object
Table 3
ParameterRangeTypeDescription
switchtrue falseboolswitch,false: close true: open
sensitivity1-100intTest sensitivity
snap_mode"RealTimeMode"
"OptimalMode"
"IntervalMode"
stringScreenshot mode,
intervalMode JSON show as follow Table Table 4
min_pixel64-1080intMinimum pixel value
max_pixel320-1080intMaximum pixel value
detection_mode"StaticMode"
"MotionMode"
stringDetection mode
time_threshold0-900inttime threshold
rule_infoJSON objectSingle-channel information JSON is as follows Table 5
latch_time"5","10","20","30"stringAlarm output time
post_recording"0","5","10","20","30"stringRecording delay time
alarm_out“Local->1” ”Local->x”“IP_CH1->1” “IP_CH1->2” ”IP_CHx->1” ”IP_CHx->2”
The number of channels depends on the functionality of the device.
arrayAlarm channel
Each array bit is represented by a string representing the alarm output channel.
Camera: Local ->1: On, null: Off
io_outputboolInterlinked switch for IO output.
send_emailtrue falseboolSend email switch
record_enabletrue falseboolRecord channel switch
record_channel“CH1” ”CH1x”“IP_CH1” ” IP_CH1x”“WIFI_CH1”arrayAlarm output channel
Channel alarm linkage switch
ftp_picture_upload_channel“CH1”…”CH1x”
“IP_CH1”…” IP_CH1x”
“WIFI_CH1”…”
WIFI_CH1x”
arrayCapture image FTP upload alarm output channel
ftp_picture_uploadtrue falseboolChannel image FTP upload switch
ftp_video_uploadtrue falseboolChannel video FTP upload switch
picture_to_cloudtrue falseboolImage upload switch (dedicated to NVR)
video_to_cloudtrue falseboolVideo cloud upload switch (dedicated to NVR/DVR)
ftp_video_upload_channel“CH1”…”CH1x”
“IP_CH1”…” IP_CH1x”
“WIFI_CH1”…”
WIFI_CH1x”
arrayVideo FTP upload alarm output channel
sirenboolalarm linkage switch.
deterrenceboolAlarm light linkage switch.
mutual_exclusion"PID"
"LCD"
"SOD"
"PD"
"FD"
"CC"
"SMD"
"HEATMAP"
"CD"
"QD"
"LPD"
"OD"
"INTRUSION"
"REGIONENTRANCE"
"REGIONEXITING"
json arrayThe collection of mutex functions that have been enabled at present. Note: If there is a mutex function that is already enabled, it will be brought when Get. If it is not enabled or there is no mutual exclusion, it is not necessary to pass this field
Table 4
ParameterRangeTypeDescription
snap_num"1" "2" "3" "Unliimited"stringNumber of screenshots
snap_frequencyintScreenshot interval, Unit:s/pic
Table 5
ParameterRangeTypeDescription
rule_number1ObjectRule number 1, the information JSON is displayed as follows Table 6
rule_number2ObjectRule number 2, the information JSON is displayed as follows Table 6
rule_number3ObjectRule number 3, the information JSON is displayed as follows Table 6
rule_number4ObjectRule number 4, the information JSON is displayed as follows Table 6
Table 6
ParameterRangeTypeDescription
detection_range"FullScreen"
"UserDefined"
stringExamination range
rule_switchtrue, falsebool/* One byte per channel represents up to 4 rules, 0- off, 1- Use */ (IPC Smart Generation only)
rule_rectObjectoctagon,Information JSON show as followTable 7
point_num[min:max]arrayThe number of points drawn in the area, minimum 3 points (min), maximum 8 points (max)
Table 7
ParameterRangeTypeDescription
x10-704shortx1 coordinate point
y10-576shorty1 coordinate point
x20-704shortx2 coordinate point
y20-576shorty2 coordinate point
x30-704shortx3 coordinate point
y30-576shorty3 coordinate point
x40-704shortx4 coordinate point
y40-576shorty4 coordinate point
x50-704shortx5 coordinate point
y50-576shorty5 coordinate point
x60-704shortx6 coordinate point
y60-576shorty6 coordinate point
x70-704shortx7 coordinate point
y70-576shorty7 coordinate point
x80-704shortx8 coordinate point
y80-576shorty8 coordinate point

Sample:

HTTP/1.1 200 OK
Content-Type: application/json
{
  "result": "success",
  "data": {
    "channel_info": {
      "type": "object",
      "items": {
        "CH1": {
          "type": "object",
          "items": {
            "switch": {
              "type": "bool"
            },
            "sensitivity": {
              "type": "int32",
              "min": 1,
              "max": 100
            },
            "snap_mode": {
              "type": "string",
              "items": [
                "Default",
                "RealTimeMode",
                "IntervalMode"
              ]
            },
            "snap_num": {
              "type": "string",
              "items": [
                "1",
                "2",
                "3",
                "Unlimited"
              ]
            },
            "snap_frequency": {
              "type": "int32",
              "mode": "r",
              "min": 1,
              "max": 255,
              "default_value": 2
            },
            "max_pixel": {
              "type": "int32",
              "mode": "r",
              "min": 320,
              "max": 1080,
              "default_value": 320
            },
            "min_pixel": {
              "type": "int32",
              "mode": "r",
              "min": 64,
              "max": 1080,
              "default_value": 64
            },
            "detection_mode": {
              "type": "string",
              "items": [
                "HybridMode",
                "MotionMode"
              ]
            },
            "rule_info": {
              "type": "object",
              "items": {
                "rule_number1": {
                  "type": "object",
                  "items": {
                    "detection_range": {
                      "type": "string",
                      "items": [
                        "FullScreen",
                        "UserDefined"
                      ]
                    },
                    "rule_switch": {
                      "type": "bool"
                    },
                    "point_num": {
                      "type": "array",
                      "size": 2,
                      "items": []
                    },
                    "rule_rect": {
                      "type": "object",
                      "items": {
                        "x1": {
                          "type": "int32",
                          "min": 0,
                          "max": 704
                        },
                        "x2": {
                          "type": "int32",
                          "min": 0,
                          "max": 704
                        },
                        "x3": {
                          "type": "int32",
                          "min": 0,
                          "max": 704
                        },
                        "x4": {
                          "type": "int32",
                          "min": 0,
                          "max": 704
                        },
                        "x5": {
                          "type": "int32",
                          "min": 0,
                          "max": 704
                        },
                        "x6": {
                          "type": "int32",
                          "min": 0,
                          "max": 704
                        },
                        "x7": {
                          "type": "int32",
                          "min": 0,
                          "max": 704
                        },
                        "x8": {
                          "type": "int32",
                          "min": 0,
                          "max": 704
                        },
                        "y1": {
                          "type": "int32",
                          "min": 0,
                          "max": 576
                        },
                        "y2": {
                          "type": "int32",
                          "min": 0,
                          "max": 576
                        },
                        "y3": {
                          "type": "int32",
                          "min": 0,
                          "max": 576
                        },
                        "y4": {
                          "type": "int32",
                          "min": 0,
                          "max": 576
                        },
                        "y5": {
                          "type": "int32",
                          "min": 0,
                          "max": 576
                        },
                        "y6": {
                          "type": "int32",
                          "min": 0,
                          "max": 576
                        },
                        "y7": {
                          "type": "int32",
                          "min": 0,
                          "max": 576
                        },
                        "y8": {
                          "type": "int32",
                          "min": 0,
                          "max": 576
                        }
                      }
                    }
                  }
                },
                "rule_number2": {
                  "type": "object",
                  "items": {
                    "detection_range": {
                      "type": "string",
                      "items": [
                        "FullScreen",
                        "UserDefined"
                      ]
                    },
                    "rule_switch": {
                      "type": "bool"
                    },
                    "point_num": {
                      "type": "array",
                      "size": 2,
                      "items": []
                    },
                    "rule_rect": {
                      "type": "object",
                      "items": {
                        "x1": {
                          "type": "int32",
                          "min": 0,
                          "max": 704
                        },
                        "x2": {
                          "type": "int32",
                          "min": 0,
                          "max": 704
                        },
                        "x3": {
                          "type": "int32",
                          "min": 0,
                          "max": 704
                        },
                        "x4": {
                          "type": "int32",
                          "min": 0,
                          "max": 704
                        },
                        "x5": {
                          "type": "int32",
                          "min": 0,
                          "max": 704
                        },
                        "x6": {
                          "type": "int32",
                          "min": 0,
                          "max": 704
                        },
                        "x7": {
                          "type": "int32",
                          "min": 0,
                          "max": 704
                        },
                        "x8": {
                          "type": "int32",
                          "min": 0,
                          "max": 704
                        },
                        "y1": {
                          "type": "int32",
                          "min": 0,
                          "max": 576
                        },
                        "y2": {
                          "type": "int32",
                          "min": 0,
                          "max": 576
                        },
                        "y3": {
                          "type": "int32",
                          "min": 0,
                          "max": 576
                        },
                        "y4": {
                          "type": "int32",
                          "min": 0,
                          "max": 576
                        },
                        "y5": {
                          "type": "int32",
                          "min": 0,
                          "max": 576
                        },
                        "y6": {
                          "type": "int32",
                          "min": 0,
                          "max": 576
                        },
                        "y7": {
                          "type": "int32",
                          "min": 0,
                          "max": 576
                        },
                        "y8": {
                          "type": "int32",
                          "min": 0,
                          "max": 576
                        }
                      }
                    }
                  }
                },
                "rule_number3": {
                  "type": "object",
                  "items": {
                    "detection_range": {
                      "type": "string",
                      "items": [
                        "FullScreen",
                        "UserDefined"
                      ]
                    },
                    "rule_switch": {
                      "type": "bool"
                    },
                    "point_num": {
                      "type": "array",
                      "size": 2,
                      "items": []
                    },
                    "rule_rect": {
                      "type": "object",
                      "items": {
                        "x1": {
                          "type": "int32",
                          "min": 0,
                          "max": 704
                        },
                        "x2": {
                          "type": "int32",
                          "min": 0,
                          "max": 704
                        },
                        "x3": {
                          "type": "int32",
                          "min": 0,
                          "max": 704
                        },
                        "x4": {
                          "type": "int32",
                          "min": 0,
                          "max": 704
                        },
                        "x5": {
                          "type": "int32",
                          "min": 0,
                          "max": 704
                        },
                        "x6": {
                          "type": "int32",
                          "min": 0,
                          "max": 704
                        },
                        "x7": {
                          "type": "int32",
                          "min": 0,
                          "max": 704
                        },
                        "x8": {
                          "type": "int32",
                          "min": 0,
                          "max": 704
                        },
                        "y1": {
                          "type": "int32",
                          "min": 0,
                          "max": 576
                        },
                        "y2": {
                          "type": "int32",
                          "min": 0,
                          "max": 576
                        },
                        "y3": {
                          "type": "int32",
                          "min": 0,
                          "max": 576
                        },
                        "y4": {
                          "type": "int32",
                          "min": 0,
                          "max": 576
                        },
                        "y5": {
                          "type": "int32",
                          "min": 0,
                          "max": 576
                        },
                        "y6": {
                          "type": "int32",
                          "min": 0,
                          "max": 576
                        },
                        "y7": {
                          "type": "int32",
                          "min": 0,
                          "max": 576
                        },
                        "y8": {
                          "type": "int32",
                          "min": 0,
                          "max": 576
                        }
                      }
                    }
                  }
                },
                "rule_number4": {
                  "type": "object",
                  "items": {
                    "detection_range": {
                      "type": "string",
                      "items": [
                        "FullScreen",
                        "UserDefined"
                      ]
                    },
                    "rule_switch": {
                      "type": "bool"
                    },
                    "point_num": {
                      "type": "array",
                      "size": 2,
                      "items": []
                    },
                    "rule_rect": {
                      "type": "object",
                      "items": {
                        "x1": {
                          "type": "int32",
                          "min": 0,
                          "max": 704
                        },
                        "x2": {
                          "type": "int32",
                          "min": 0,
                          "max": 704
                        },
                        "x3": {
                          "type": "int32",
                          "min": 0,
                          "max": 704
                        },
                        "x4": {
                          "type": "int32",
                          "min": 0,
                          "max": 704
                        },
                        "x5": {
                          "type": "int32",
                          "min": 0,
                          "max": 704
                        },
                        "x6": {
                          "type": "int32",
                          "min": 0,
                          "max": 704
                        },
                        "x7": {
                          "type": "int32",
                          "min": 0,
                          "max": 704
                        },
                        "x8": {
                          "type": "int32",
                          "min": 0,
                          "max": 704
                        },
                        "y1": {
                          "type": "int32",
                          "min": 0,
                          "max": 576
                        },
                        "y2": {
                          "type": "int32",
                          "min": 0,
                          "max": 576
                        },
                        "y3": {
                          "type": "int32",
                          "min": 0,
                          "max": 576
                        },
                        "y4": {
                          "type": "int32",
                          "min": 0,
                          "max": 576
                        },
                        "y5": {
                          "type": "int32",
                          "min": 0,
                          "max": 576
                        },
                        "y6": {
                          "type": "int32",
                          "min": 0,
                          "max": 576
                        },
                        "y7": {
                          "type": "int32",
                          "min": 0,
                          "max": 576
                        },
                        "y8": {
                          "type": "int32",
                          "min": 0,
                          "max": 576
                        }
                      }
                    }
                  }
                }
              }
            },
            "time_threshold": {
              "type": "int32",
              "min": 0,
              "max": 900
            },
            "draw_add_btn": {
              "type": "object",
              "items": {
                "visible": {
                  "type": "bool"
                }
              }
            },
            "btn_get_default_data": true
          }
        }
      }
    }
  }
}

Error Code

See Response Messages Body and Common error_code for more information.