Range

Function

This API is used to get Thermal > Measurement Rule parameter scale

Request Message

Parameter Description

Table 1

ParameterRangeTypedescription
channel"CH1"…"CHx",
"IP_CH1"…"IP_CHx",
"WIFI_CH1"…"WIFI_CHx"
Channels supported by the device.
string arrayIPC can only be used "CH1".
page_type“ChannelConfig”
“AlarmConfig”
stringData used to distinguish between the channel configuration page and the alarm configuration page
DeleteIdint arrayid to be deleted (Currently supported id numbers 1 to 8)

Sample:

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

}

Response Message

Parameter Description

Table 2

ParameterRangeTypedescription
channel_infoJson ObjectChannel information see Table 3
page_type"ChannelConfig", "AlarmConfig"stringThe data used to distinguish between the channel configuration page and the alarm configuration page is only needed when setting.
channel_maxintTotal number of channels on the device

Table 3

ParameterRangeTypedescription
CH1Json ObjectJSON see Table 4
...Json Object
IP_CH1Json Object
...Json Object
WIFI_CH1Json Object
...Json Object

Table 4

ParameterRangeTypedescription
status"Offline"
"Online"
stringChannel online status, only for digital channels.
Note: This field does not exist when the channel is online
id_infoJson ArrayJson see Table 5
id_maxintMaximum id number

Table 5

ParameterRangeTypedescription
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 performance of the device
arrayAlarm output channel
alarm_rulesJson ObjectSee Alarm rule Json information Table 6
alarm_tempdoubleAlarm threshold
(range varies with temperature units and gain options)
(high gain :
{C:-40~200 F: -40~392 K:233.15~473.15}
Low gain:
{ C:-40~600 F: -40~1112 K:233.15~873.15})
duration_time0~100intfiltration time
tolerance_temp0~ 5doubleTolerance temperature difference
latch_time"5s","10s","20s","30s"stringAlarm output time Ipc value 5 10 20 30
record_enableboolSupports channel video switch
post_recording"OFF","5s","10s","20s","30s"stringVideo delay time Ipc value 0 5 10 20 30
send_emailtrue, falseboolSend Email switch
ftp_picture_uploadtrue, falseboolFTP upload switch of channel capture
ftp_video_uploadtrue, falseboolChannel video FTP upload switch
picture_to_cloudtrue, falseboolPicture upload switch
video_to_cloudtrue, falseboolVideo cloud upload switch
light_linkagetrue, falseboolLinkage switch of the white light. When motion is triggered, the linkage triggers the white light
enforcerlight_linkagetrue, falseboolRed and blue light alarm switch
siren_linkagetrue, falseboolsiren alarm switch
http_listeningtrue, falseboolPush switch
id_switchtrue, falseboolswitch
rule_name0~127stringRule Name
rule_infoJSON objectJson see Table 7
emissivity0.01~ 1doubleemissivity
target_distance0~200doubleobject distance
reflective_temptrue, falsedoubleReflective Temperature values (range varies with temperature units and gain options)
(high gain :
{C:-40~200 F: -40~392 K:233.15~473.15}
Low gain:
{ C:-40~600 F: -40~1112 K:233.15~873.15})
Idtrue, falseintid of the current rule
record_channel“CH1”…”CH1x”
“IP_CH1”…” IP_CH1x”
“WIFI_CH1”…”
WIFI_CH1x”
arrayVideo alarm output channel
ftp_picture_upload_channel“CH1”…”CH1x”
“IP_CH1”…” IP_CH1x”
“WIFI_CH1”…”
WIFI_CH1x”
arrayCapture image FTP upload alarm output channel
ftp_video_upload_channel“CH1”…”CH1x”
“IP_CH1”…” IP_CH1x”
“WIFI_CH1”…”
WIFI_CH1x”
arrayVideo FTP upload alarm output channel
picture_cloud_channel“CH1”…”CH1x”
“IP_CH1”…” IP_CH1x”
“WIFI_CH1”…”
WIFI_CH1x”
arrayImage upload alarm output channel
video_cloud_channel“CH1”…”CH1x”
“IP_CH1”…” IP_CH1x”
“WIFI_CH1”…”
WIFI_CH1x”
arrayVideo cloud upload alarm output channel
scheduleJSON arraySchedule see Table 8

Table 6

ParameterRangeTypedescription
Point"Above Average Temp"
"Below Average Temp"
stringSelect the alarm temperature type of a temperature measurement rule whose rule type is Point
Line"Above Max Temp"
"Below Max Temp"
"Above Min Temp"
"Below Min Temp"
"Above Average Temp"
"Below Average Temp"
"Above Temp Diff"
"Below Temp Diff"
stringSelect the alarm temperature type of the temperature detection rule whose rule type is Line
Rect[1,100]stringSelect the alarm temperature type of the temperature measurement rule whose rule type is Rect

Table 7

ParameterRangeTypedescription
rule_type"Point"
"Line"
"Rect"
"Area"
stringRule type
rule_pointJson ObjectPoint Json information see Table 9
rule_lineJson ObjectSee Line Json information Table 10
rule_rectJson ObjectFor rectangular Json information see Table 11
rule_areaJson ObjectOctagon Json information see Table 12(Do not display if not implemented)

Table 8

ParameterRangeTypedescription
schedule_type“Record”stringtime schedule:Record,AlarmOut,SendEmail
weekJSON arrayweek json see Table 13

Table 9

ParameterRangeTypedescription
x-1-704intx coordinates
y-1-576inty coordinates

Table 10

ParameterRangeTypedescription
x10-704intx1 coordinates
y10-576inty1 coordinates
x20-704intx2 coordinates
y20-576inty2 coordinates

Table 11

ParameterRangeTypedescription
left0-704intx coordinates
top0-576inty coordinates
width0-704intwidth
height0-576intheight

Table 12

ParameterRangeTypedescription
x10-704intx1 coordinates
y10-576inty1 coordinates
x20-704intx2 coordinates
y20-576inty2 coordinates
x30-704intx3 coordinates
y30-576inty3 coordinates
x40-704intx4 coordinates
y40-576inty4 coordinates
x50-704intx5 coordinates
y50-576inty5 coordinates
x60-704intx6 coordinates
y60-576inty6 coordinates
x70-704intx7 coordinates
y70-576inty7 coordinates
x80-704intx8 coordinates
y80-576inty8 coordinates

Table 13

ParameterRangeTypedescription
daySun,Mon,Tue,Wed
Thu,Fri,Sat
stringMark the day of the week
time0: disables the time range
1: enables the time range
arrayEach array bit identifies half an hour

Sample:

HTTP/1.1 200 OK
Content-Type: application/json
{
    "result": "success",
    "data": {
        "channel_max": 1,
        "channel_info": {
            "type": "object",
            "items": {"CH2": {
                "type": "object",
                "items": {
                    "status": {
                        "description": "Only offline channel has this variable.",
                        "type": "string",
                        "mode": "r",
                        "items": [
                            "Offline",
                            "Online"
                        ]
                    },
                    "id_info": {
                        "type": "array",
                        "min_size": 0,
                        "max_size": 20,
                        "items": [{
                            "id_switch": {
                                "type": "bool",
                                "mode": "r"
                            },
                            "Id": {
                                "type": "int32",
                                "mode": "r",
                                "min": 0,
                                "max": 20,
                                "default_value": 0
                            },
                            "rule_name": {
                                "type": "string",
                                "mode": "r",
                                "min_len": 0,
                                "max_len": 127,
                                "default_value": "1"
                            },
                            "emissivity": {
                                "type": "double",
                                "mode": "r",
                                "min": 0.01,
                                "max": 1,
                                "default_value": 0.96
                            },
                            "target_distance": {
                                "type": "double",
                                "mode": "r",
                                "min": 0,
                                "max": 200,
                                "default_value": 1
                            },
                            "reflective_temp": {
                                "type": "double",
                                "mode": "r",
                                "min": -40,
                                "max": 200,
                                "default_value": 25
                            },
                            "alarm_temp": {
                                "type": "object",
                                "items": {
                                    "Above Max Temp": {
                                        "type": "double",
                                        "mode": "r",
                                        "min": -20,
                                        "max": 150,
                                        "default_value": 1.0496921113399777e+192
                                    },
                                    "Below Max Temp": {
                                        "type": "double",
                                        "mode": "r",
                                        "min": -20,
                                        "max": 150,
                                        "default_value": 1.0496921113399777e+192
                                    },
                                    "Above Min Temp": {
                                        "type": "double",
                                        "mode": "r",
                                        "min": -20,
                                        "max": 150,
                                        "default_value": 1.0496921113399777e+192
                                    },
                                    "Below Min Temp": {
                                        "type": "double",
                                        "mode": "r",
                                        "min": -20,
                                        "max": 150,
                                        "default_value": 1.0496921113399777e+192
                                    },
                                    "Above Average Temp": {
                                        "type": "double",
                                        "mode": "r",
                                        "min": -20,
                                        "max": 150,
                                        "default_value": 1.0496921113399777e+192
                                    },
                                    "Below Average Temp": {
                                        "type": "double",
                                        "mode": "r",
                                        "min": -20,
                                        "max": 150,
                                        "default_value": 1.0496921113399777e+192
                                    },
                                    "Above Temp Diff": {
                                        "type": "double",
                                        "mode": "r",
                                        "min": 1,
                                        "max": 170,
                                        "default_value": 1.0496921113399777e+192
                                    },
                                    "Below Temp Diff": {
                                        "type": "double",
                                        "mode": "r",
                                        "min": 1,
                                        "max": 170,
                                        "default_value": 1.0496921113399777e+192
                                    }
                                }
                            },
                            "alarm_rules": {
                                "type": "object",
                                "items": {
                                    "Point": {
                                        "type": "string",
                                        "items": [
                                            "Above Average Temp",
                                            "Below Average Temp"
                                        ]
                                    },
                                    "Line": {
                                        "type": "string",
                                        "items": [
                                            "Above Max Temp",
                                            "Below Max Temp",
                                            "Above Min Temp",
                                            "Below Min Temp",
                                            "Above Average Temp",
                                            "Below Average Temp",
                                            "Above Temp Diff",
                                            "Below Temp Diff"
                                        ]
                                    },
                                    "Rect": {
                                        "type": "string",
                                        "items": [
                                            "Above Max Temp",
                                            "Below Max Temp",
                                            "Above Min Temp",
                                            "Below Min Temp",
                                            "Above Average Temp",
                                            "Below Average Temp",
                                            "Above Temp Diff",
                                            "Below Temp Diff"
                                        ]
                                    }
                                }
                            },
                            "duration_time": {
                                "type": "int32",
                                "mode": "r",
                                "min": 0,
                                "max": 200,
                                "default_value": 3
                            },
                            "tolerance_temp": {
                                "type": "double",
                                "mode": "r",
                                "min": 0,
                                "max": 5,
                                "default_value": 3
                            },
                            "rule_info": {
                                "type": "object",
                                "items": {
                                    "rule_type": {
                                        "type": "string",
                                        "mode": "r",
                                        "items": [
                                            "Point",
                                            "Line",
                                            "Rect"
                                        ],
                                        "default_value": "Point"
                                    },
                                    "rule_point": {
                                        "type": "object",
                                        "items": {
                                            "x": {
                                                "type": "int32",
                                                "mode": "r",
                                                "min": -1,
                                                "max": 704,
                                                "default_value": -1
                                            },
                                            "y": {
                                                "type": "int32",
                                                "mode": "r",
                                                "min": -1,
                                                "max": 576,
                                                "default_value": -1
                                            }
                                        }
                                    },
                                    "rule_line": {
                                        "type": "object",
                                        "items": {
                                            "x1": {
                                                "type": "int32",
                                                "mode": "r",
                                                "min": 0,
                                                "max": 704,
                                                "default_value": 0
                                            },
                                            "y1": {
                                                "type": "int32",
                                                "mode": "r",
                                                "min": 0,
                                                "max": 576,
                                                "default_value": 0
                                            },
                                            "x2": {
                                                "type": "int32",
                                                "mode": "r",
                                                "min": 0,
                                                "max": 704,
                                                "default_value": 0
                                            },
                                            "y2": {
                                                "type": "int32",
                                                "mode": "r",
                                                "min": 0,
                                                "max": 576,
                                                "default_value": 0
                                            }
                                        }
                                    },
                                    "rule_rect": {
                                        "type": "object",
                                        "items": {
                                            "left": {
                                                "type": "int32",
                                                "mode": "r",
                                                "min": 0,
                                                "max": 704,
                                                "default_value": 0
                                            },
                                            "top": {
                                                "type": "int32",
                                                "mode": "r",
                                                "min": 0,
                                                "max": 576,
                                                "default_value": 0
                                            },
                                            "width": {
                                                "type": "int32",
                                                "mode": "r",
                                                "min": 0,
                                                "max": 704,
                                                "default_value": 0
                                            },
                                            "height": {
                                                "type": "int32",
                                                "mode": "r",
                                                "min": 0,
                                                "max": 576,
                                                "default_value": 0
                                            }
                                        }
                                    }
                                }
                            }
                        }]
                    }
                }
            }}
        }
    }
}

Error Code

See Response message body and general error_code for more information.