DAHUA IPC HTTP API V1.00x PDF
DAHUA IPC HTTP API V1.00x PDF
HTTP API
1
1. Preface
This document details the API of Dahua IPC.Programmers can access and configure Dahua IPC follows the API.
2. Catalog
1. Preface..............................................................................................................................................................................................................2
2. Catalog..............................................................................................................................................................................................................2
3. HTTP API Transaction........................................................................................................................................................................................5
3.1Transaction ...................................................................................................................................................................................................5
3.2Authentication ..............................................................................................................................................................................................6
4. Camera .............................................................................................................................................................................................................7
4.1Stream ..........................................................................................................................................................................................................7
4.1.1 GetStream .........................................................................................................................................................................................7
4.1.2 GetMaxExtraStreamCounts...............................................................................................................................................................7
4.2VideoColor ....................................................................................................................................................................................................7
4.2.1 GetVideoColorConfig ........................................................................................................................................................................7
4.2.2 SetVideoColorConfig .........................................................................................................................................................................8
4.3VideoInOptions .............................................................................................................................................................................................8
4.3.1 GetVideoInputCaps ...........................................................................................................................................................................8
4.3.2 GetVideoInOptionsConfig ...............................................................................................................................................................10
4.3.3 SetVideoInOptionsConfig ................................................................................................................................................................12
4.4VideoEncode ...............................................................................................................................................................................................14
4.4.1 GetVideoConfigCaps .......................................................................................................................................................................14
4.4.2 Resolution .......................................................................................................................................................................................15
4.4.3 GetVideoEncodeConfig ...................................................................................................................................................................16
4.4.4 SetVideoEncodeConfig ....................................................................................................................................................................17
4.5AudioEncode ...............................................................................................................................................................................................18
4.5.1 GetAudioConfigCaps .......................................................................................................................................................................18
4.5.2 GetAudioEncodeConfig ...................................................................................................................................................................18
4.5.3 SetAudioEncodeConfig....................................................................................................................................................................19
4.6 SnapEncode ...............................................................................................................................................................................................20
4.6.1 GetSnapConfigCaps .........................................................................................................................................................................20
4.6.2 GetSnapEncodeConfig ....................................................................................................................................................................21
4.6.3 SetSnapEncodeConfig .....................................................................................................................................................................21
4.7ChannelTitle ................................................................................................................................................................................................22
4.7.1 GetChannelTitleConfig ....................................................................................................................................................................22
4.7.2 SetChannelTitleConfig .....................................................................................................................................................................22
4.8VideoStandard ............................................................................................................................................................................................23
4.8.1 GetVideoStandardConfig ................................................................................................................................................................23
4.8.2 SetVideoStandardConfig .................................................................................................................................................................23
4.9VideoWidget ...............................................................................................................................................................................................23
2
4.9.1 GetVideoWidgetConfig ...................................................................................................................................................................23
4.9.2 SetVideoWidgetConfig ....................................................................................................................................................................24
5. NetWork .........................................................................................................................................................................................................25
5.1NetInterfaces ..............................................................................................................................................................................................25
5.1.1 GetInterfaces ..................................................................................................................................................................................25
5.2BasicConfig .................................................................................................................................................................................................26
5.2.1 GetBasicConfig ................................................................................................................................................................................26
5.2.2 SetBasicConfig.................................................................................................................................................................................26
5.3PPPoE ..........................................................................................................................................................................................................27
5.3.1 GetPPPoEConfig ..............................................................................................................................................................................27
5.3.2 SetPPPoEConfig ...............................................................................................................................................................................27
5.4DDNS ...........................................................................................................................................................................................................28
5.4.1 GetDDNSConfig ...............................................................................................................................................................................28
5.4.2 SetDDNSConfig................................................................................................................................................................................28
5.5Email ...........................................................................................................................................................................................................29
5.5.1 GetEmailConfig ...............................................................................................................................................................................29
5.5.2 SetEmailConfig ................................................................................................................................................................................29
5.6Wlan ...........................................................................................................................................................................................................30
5.6.1 GetWlanConfig ................................................................................................................................................................................30
5.6.2 SetWlanConfig ................................................................................................................................................................................30
5.7UPnP ...........................................................................................................................................................................................................31
5.7.1 GetUPnPConfig ...............................................................................................................................................................................31
5.7.2 SetUPnPConfig ................................................................................................................................................................................32
5.7.3 GetUPnPStatus ................................................................................................................................................................................32
5.8NTP .............................................................................................................................................................................................................32
5.8.1 GetNTPConfig..................................................................................................................................................................................32
5.8.2 SetNTPConfig ..................................................................................................................................................................................33
5.9AlarmServer ................................................................................................................................................................................................34
5.9.1 GetAlarmServerConfig ....................................................................................................................................................................34
5.9.2 SetAlarmServerConfig .....................................................................................................................................................................34
6. Events .............................................................................................................................................................................................................34
6.1EventHandler ..............................................................................................................................................................................................34
6.1.1 GetEventHandler .............................................................................................................................................................................35
6.1.2 SetEventHandler .............................................................................................................................................................................36
6.2Alarm ..........................................................................................................................................................................................................37
6.2.1 GetAlarmConfig ..............................................................................................................................................................................37
6.2.2 SetAlarmConfig ...............................................................................................................................................................................38
6.2.3 GetAlarmOutConfig ........................................................................................................................................................................38
6.2.4 SetAlarmOutConfig .........................................................................................................................................................................38
6.2.5 GetInSlots........................................................................................................................................................................................39
6.2.6 GetOutSlots .....................................................................................................................................................................................39
6.2.7 GetInState .......................................................................................................................................................................................39
6.2.8 GetOutState ....................................................................................................................................................................................39
6.3MotionDetect .............................................................................................................................................................................................40
6.3.1 GetMotionDetectConfig ..................................................................................................................................................................40
3
6.3.2 SetMotionDetectConfig ..................................................................................................................................................................40
6.4BlindDetect .................................................................................................................................................................................................41
6.4.1 GetBlindDetectConfig .....................................................................................................................................................................41
6.4.2 SetBlindDetectConfig ......................................................................................................................................................................41
6.5LossDetect ..................................................................................................................................................................................................41
6.5.1 GetLossDetectConfig .......................................................................................................................................................................41
6.5.2 SetLossDetectConfig .......................................................................................................................................................................42
6.6 GetEventIndexes ........................................................................................................................................................................................ 42
7. PTZ ..................................................................................................................................................................................................................42
7.1PTZConfig ....................................................................................................................................................................................................42
7.1.1 GetPTZConfig ..................................................................................................................................................................................42
7.1.2 SetPTZConfig ...................................................................................................................................................................................43
7.2PTZControl ..................................................................................................................................................................................................44
7.2.1 GetProtocolList ...............................................................................................................................................................................44
7.2.2 GetCurrentProtocolCaps .................................................................................................................................................................44
7.2.3 PTZ control commands ...................................................................................................................................................................45
8. Record&Snap ..................................................................................................................................................................................................48
8.1Record .........................................................................................................................................................................................................48
8.1.1 GetRecordConfig .............................................................................................................................................................................48
8.1.2 SetRecordConfig..............................................................................................................................................................................48
8.1.3 GetRecordModeConfig ...................................................................................................................................................................49
8.1.4 SetRecordModeConfig ....................................................................................................................................................................49
8.2Snap ............................................................................................................................................................................................................49
8.2.1 GetSnapConfig ................................................................................................................................................................................49
8.2.2 SetSnapConfig .................................................................................................................................................................................50
9. System ............................................................................................................................................................................................................50
9.1General .......................................................................................................................................................................................................50
9.1.1 GetGeneralConfig............................................................................................................................................................................50
9.1.2 SetGeneralConfig ............................................................................................................................................................................50
9.2SystemTime ................................................................................................................................................................................................51
9.2.1 GetCurrentTime ..............................................................................................................................................................................51
9.2.2 SetCurrentTime ...............................................................................................................................................................................51
9.3Locales ........................................................................................................................................................................................................51
9.3.1 GetLocalesConfig ............................................................................................................................................................................51
9.3.2 SetLocalesConfig .............................................................................................................................................................................52
9.4Language .....................................................................................................................................................................................................53
9.4.1 GetLanguageCaps ...........................................................................................................................................................................53
9.4.2 GetLanguageConfig .........................................................................................................................................................................53
9.4.3 SetLanguageConfig..........................................................................................................................................................................53
9.5AccessFilter .................................................................................................................................................................................................54
9.5.1 GetAccessFilterConfig .....................................................................................................................................................................54
9.5.2 SetAccessFilterConfig ......................................................................................................................................................................54
9.6AutoMaintain ..............................................................................................................................................................................................54
9.6.1 GetAutoMaintainConfig ..................................................................................................................................................................54
9.6.2 SetAutoMaintainConfig ...................................................................................................................................................................55
4
9.7UserManager ..............................................................................................................................................................................................55
9.7.1 Group ..............................................................................................................................................................................................55
9.7.2 GetGroupInfo ..................................................................................................................................................................................56
9.7.3 GetGroupInfoAll ..............................................................................................................................................................................56
9.7.4 AddUser ..........................................................................................................................................................................................56
9.7.5 DeleteUser ......................................................................................................................................................................................57
9.7.6 ModifyUser .....................................................................................................................................................................................57
9.7.7 ModifyPassword .............................................................................................................................................................................57
9.7.8 GetUserInfo .....................................................................................................................................................................................57
9.7.9 GetUserInfoAll.................................................................................................................................................................................58
9.8System Operation ....................................................................................................................................................................................... 58
9.8.1 Reboot ............................................................................................................................................................................................58
9.8.2 Shutdown ........................................................................................................................................................................................58
9.8.3 GetDeviceType ................................................................................................................................................................................58
9.8.4 GetHardwareVersion .......................................................................................................................................................................58
9.8.5 GetSerialNo .....................................................................................................................................................................................59
9.8.6 GetMachineName ...........................................................................................................................................................................59
9.8.7 GetSystemInfo .................................................................................................................................................................................59
9.9 Log .............................................................................................................................................................................................................59
9.9.1 StartFind..........................................................................................................................................................................................59
9.9.2 DoFind .............................................................................................................................................................................................59
9.9.3 StopFind ..........................................................................................................................................................................................60
9.9.4 Clear ................................................................................................................................................................................................ 60
3.1Transaction
The HTTP API Transaction starts from a request from a client Application, usually a web browser. The request is processed by the web
server on the IP Camera, then send the response back to the client application. The HTTP APP is taken in GET form. If the request is successful,
the IP Camera will return a HTTP header contains 200 OK. The HTTP Body will contain actual data or error message if an error occurs.
For describe convenience, we use some short words to instead the long expressions. The follows are several regulations:
1. The italics and bold will be replaced by the value behind the symbol “=”.
2. The URL must follow the standard way of writing a URL.(RFC_3986:Uniform Resource Identifiers (URI) Generic Syntax);that is ,spaces
and other reserved characters (“;”, “/”, “?”, “:”, “@”, “=”, “+”, “,” and “$”) within a <paramName> or a <paramValue> must be replaced
with %<ASCII hex>.For example ,the blank must be instead with %20.
3. To describe the range of the configuration, we use some symbols such as “[]”, “{}” and so on. For example :”[0-100]” denotes a
integer not less than 0 and not larger than 100. “{0,1,2,3}” denotes the valid value of a integer among 0,1,2 and 3.
4. In the request and response, we use “[]” to denote an array. The index is usually a integer and start form 0.
5. The parameter value has several types: string, integer, bool and float.Integer is 32 bits.The range of bool is “true” and “false”.
The below is an example of a transaction:
Request GET http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=VideoColor
5
Description Get VideoColor configuration.
Response HTTP/1.0 200 OK
Content-Type:text/plain
head.Brightness=50
head.Contrast=50
head.Hue=50
head.Saturation=50
head.TimeSection=1 00:00:00-24:00:00
Comment In above table, head= table.VideoColor[ChannelNo][ColorConfigNo]
ChannelNo = video channel index,
colorConfigNo = color config index.
0 = Color Config 1
1 = Color Config 2
…
We can also request the single config.
For example:
Request :
GET http://10.7.2.4/cgi-bin/configManager.cgi?action=getConfig&name=table.VideoColor[0][0].Brightness
Response:
HTTP/1.0 200 OK
Content-Type:text/plain
table.VideoColor[0][0].Brightness=50
3.2Authentication
The IP Camera supplies two authentication ways: basic authentication and digest authentication. Client can login through:
http://<ip>/cgi-bin/global.login?userName=admin. The IP camera returns 401. Then the client inputs a username and password to authorize.
For example:
1. When basic authentication, the IP camera response:
401 Unauthorized
WWW-Authenticate: Basic realm=”XXXXXX”
Then the client encode the username and password with base64, send the following request:
Authorization: Basic VXZVXZ.
2. When digest authentication, the IP camera response:
WWW-Authenticate: Digest realm="DH_00408CA5EA04", nonce="000562fdY631973ef04f77a3ede7c1832ff48720ef95ad",
stale=FALSE, qop="auth";
The client calculates the digest using username, password, nonce, realm and URI with MD5, then send the following request:
Authorization: Digest username="admin", realm="DH_00408CA5EA04", nc=00000001,cnonce="0a4f113b",qop="auth"
nonce="000562fdY631973ef04f77a3ede7c1832ff48720ef95ad",uri="cgi-bin/global.login?userName=admin",
response="65002de02df697e946b750590b44f8bf"
6
4. Camera
Camera API allows application to configure and view camera settings.
4.1Stream
4.1.1 GetStream
4.1.2 GetMaxExtraStreamCounts
4.2VideoColor
4.2.1 GetVideoColorConfig
7
head.TimeSection=1 00:00:00-24:00:00
Comment In above table, head= table.VideoColor[ChannelNo][ColorConfigNo]
ChannelNo = video channel index,
colorConfigNo = color config index.
0 = Color Config 1
1 = Color Config 2
…
4.2.2 SetVideoColorConfig
Example:
0 01:00:00-02:00:00, means this config is not effective.
1 01:00:00-02:00:00, means this config is effective between 01:00:00 and 02:00:00
4.3VideoInOptions
4.3.1 GetVideoInputCaps
9
ExternalSyncInput bool true: support HD signal external synchronization.
FlashAdjust bool true: support flash adjust
Flip bool true: support picture flip.
Gain bool true: support gain control.
GainAuto bool true: support auto gain.
HorizontalBinning integer Horizontal/Vertical pixel binning mask,
VerticalBinning integer 1 – support 2 pixel binning,
2 – support 3 pixel binning
4 - support 4 pixel binning
…
2^n – support n+2 pixel binning
InfraRed bool true: support Infra compensation
Iris bool true: support Iris adjust
IrisAuto bool true: support auto Iris adjust
LadenBitrate integer Unit is Kbps.
Maximum value of video stream bitrate, 16bpp, not in binning mode.
LimitedAutoExposure bool true: support auto exposure with time limit.
MaxHeight integer Maximum video height
MaxWidth integer Maximum video width
Mirror bool true: support picture mirror.
NightOptions bool true: support night options.
ReferenceLevel bool true: support reference level.
Rotate90 bool true: support clockwise/anticlockwise 90°rotate
SetColor bool true: support color set.
SignalFormats string It’s a string contains supported video input signal formats for this channel. Signal formats
are separated by comma.
Range is {Inside, BT656, 720p,1080p, 1080i, 1080sF, 1_3M}
4.3.2 GetVideoInOptionsConfig
10
URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=VideoInOptions
Description Video in options contain Backlight, ExposureSpeed, DayNightColor. NightOptions,and so on
Response head.Backlight=0
head.DayNightColor=false
head.ExposureSpeed=0
head.ExposureValue1=0.100000
head.ExposureValue2=80.000000
head.ExternalSync=0
head.ExternalSyncPhase=0
head.FlashControl.Mode=0
head.FlashControl.Pole=0
head.FlashControl.Value=0
head.FlashControl.PreValue=0
head.Flip=false
head.Gain=50
head.GainAuto=true
head.IrisAuto=false
head.Mirror=false
head.NightOptions.BrightnessThreshold=50
head.NightOptions.ExposureSpeed=0
head.NightOptions.ExposureValue1=0.100000
head.NightOptions.ExposureValue2=80
head.NightOptions.Gain=50
head.NightOptions.GainAuto=true
head.NightOptions.GainBlue=50
head.NightOptions.GainGreen=50
head.NightOptions.GainRed=50
head.NightOptions.IrisAuto=false
head.NightOptions.SunriseHour=0
head.NightOptions.SunriseMinute=0
head.NightOptions.SunriseSecond=0
head.NightOptions.SunsetHour=0
head.NightOptions.SunsetMinute=0
head.NightOptions.SunsetSecond=0
head.NightOptions.SwitchMode=0
head.NightOptions.WhiteBalance=Disable
head.ReferenceLevel=50
head.ReferenceLevelEnable=false
head.Rotate90=0
head.SignalFormat=BT656
head.WhiteBalance=Disable
Comment In above table, head = table.VideoInOptions[ChannelNo]
ChannelNo = video channel index.
11
4.3.3 SetVideoInOptionsConfig
12
1:high level
2: rising-edge
3:falling-edge
head.FlashControl.Value integer Range is [0-15]
Flashlight time-unit:
0 - 0us,
1 - 64us,
2 - 128us,
3 – 192us
...
15 - 960us
head.FlashControl.PreValue integer Range is [0-100]
It’s threshold of brightness value, if brightness is less than this value, flash light
begin to work.
head.Flip bool true: enable video flip function
false: disable video flip function
head.Gain integer Range is [0-100]
If GainAuto is true, it’s upper limit of auto gain, else it’s the fixed gain adjust
value.
head.GainBlue integer Range is [0-100]
Gain for blue value, Value is effective when WhiteBalance is “Custom.”
head.GainRed integer Range is [0-100]
Gain for red value, Value is effective when WhiteBalance is “Custom.”
head.GainGreen integer Range is [0-100]
Gain for green value, Value is effective when WhiteBalance is “Custom.”
head.GainAuto bool true: GainAuto
false: No GainAuto
head.IrisAuto bool true: IrisAuto
false: No IrisAuto
head.Mirror bool true: enable video mirror function
false: disable video mirror function
head.WhiteBalance String Range is {Disable, Auto, Custom, Sunny, Cloudy, Home, Office, Night}
White balance Mode
head.ReferenceLevel integer Range is [0-100]
The expected average brightness level of video frames.
head.Rotate90 integer Range is {0,1,2}
Video rotation:
0: No rotate
1: clockwise rotate 90°
2: anticlockwise rotate 90°
head.SignalFormat String Range is {Inside, BT656, 720p, 1080p, 1080i, 1080sF}
Input Signal Mode
head.NightOptions.BrightnessThreshold integer NightOptions contain a set of parameters used when brightness is not enough.
Range is [0-100]
13
when brightness is less than the BrightnessThreshold, parameters change to
Nightoptions.
head.NightOptions.IrisAuto bool true: IrisAuto
false: No IrisAuto
head.NightOptions.SunriseHour integer Range is [00-23]
Sunrise hour.
head.NightOptions.SunriseMinute integer Range is [00-59]
Sunrise minute
head.NightOptions.SunriseSecond integer Range is [00-59]
Sunrise second
head.NightOptions.SunsetHour integer Sunset time. Its range is same with sunrise time, and it should be after sunrise
head.NightOptions.SunsetMinute integer time.
head.NightOptions.SunsetSecond integer NightOptions are used if time is after sunset time and before sunrise time.
head.NightOptions.SwitchMode integer Range is {0,1,2}
0: NoSwitch;
1: Switch depends on brightness;
2: Switch depends on time, switch to NightOptions when time is after sunset
time and before sunrise.
head.NightOptions.ExposureSpeed integer Range is same as relevant items of normal options in this table.
head.NightOptions.ExposureValue1 float Example:
head.NightOptions.ExposureValue2 float Value range of head.NightOptions.ExposureSpeed is the same with
head.NightOptions.Gain integer head. ExposureSpeed
head.NightOptions.GainAuto bool
head.NightOptions.GainBlue integer
head.NightOptions.GainGreen integer
head.NightOptions.GainRed integer
head.NightOptions.WhiteBalance String
head.NightOptions. ReferenceLevel integer
head.NightOptions. ExternalSyncPhase integer
4.4VideoEncode
4.4.1 GetVideoConfigCaps
14
headExtra.Video.ResolutionTypes=D1,CIF
headSnap.Video.CompressionTypes=H.264,MJPG
headSnap.Video.ResolutionTypes=2048 x 1536,1080,SXGA, 1280 x 960,720,D1,CIF
Comment In above table:
Channel: video channel index
RecordType:
0 = regular record
1 = motion detection record
2 = alarm record
ExtraStream:
0 = extra stream 1
1 = extra stream 2
2 = extra stream 3
SnapType:
0 = regular snapshot
1 = motion detection snapshot
2 = alarm snapshot
4.4.2 Resolution
15
"QVGA" 320 x 240
"SVCD" 480 x 480
"QQVGA" 160 x 128
"SVGA" 800 x 592
"XVGA" 1024 x 768
"WXGA" 1280 x 800
"SXGA" 1280 x 1024
"WSXGA" 1600 x 1024
"UXGA" 1600 x 1200
"WUXGA" 1920 x 1200
"ND1" 240 x 192
"720" 1280 x 720
"1080" 1920 x 1080
"1280x960" 1280 x 960 (1.3 Mega Pixels)
"1872x1408" 1872 x 1408 (2.5 Mega Pixels)
"3744x1408" 3744 x 1408 (5 Mega Pixels)
"2048x1536" 2048 x 1536 (3 Mega Pixels)
"2432x2048" 2432 x 2048 (5 Mega Pixels)
"1216x1024" 1216 x 1024 (1.2 Mega Pixels)
"1408x1024" 1408 x 1024 (1.5 Mega Pixels)
"3296x2472" 3296 x 2472 (8 Mega Pixels)
"2560x1920" 2560 x 1920 (5 Mega Pixels)
"960H", 960 x 576 960 x 480
"DV720P" 960 x 720
4.4.3 GetVideoEncodeConfig
4.4.4 SetVideoEncodeConfig
17
VBR: variable bitrate
head.Video.Compression String Range is {MPEG4,MPEG2, MPEG1,MJPG,H.263,H.264}
Depends on capacity in 4.4.1 GetVideoConfigCaps
head.Video.FPS float Range is [0.2-30].
Frames per second.
< 1.0: several seconds/frame, FPS=0.3333: 3 seconds per frame.
>1.0: several frames/second. FPS=3: 3 frames per second.
head.Video.GOP integer Range is [1-100].
Group of picture, it’s the interval of I Frame,
Example: GOP=50, means there is one I frame every 49 P or B frames
head.Video.Height integer Video height
head.Video.Width integer Video Width
head.Video.Profile String Range is { Baseline, Main , Extended , High }
Only when video compression is H.264, it’s effective.
head.Video.Quality integer Range is [1-6].
Image Quality, available when Video.BitRateControl=VBR
1: worst quality
6: best quality
head.VideoEnable bool True: enable video
4.5AudioEncode
4.5.1 GetAudioConfigCaps
4.5.2 GetAudioEncodeConfig
4.5.3 SetAudioEncodeConfig
19
ParamName ParamValue type Description
head.Audio.Bitrate integer Unit is kbps
Range depends on capacity in 4.5.1 GetAudioConfigCaps
head.Audio.Compression string Range depends on capacity in 4.5.1 GetAudioConfigCaps
4.6 SnapEncode
4.6.1 GetSnapConfigCaps
Response caps[Channel].SnapFormat[SnapType].Video.CompressionTypes=H.264,MJPG
caps[Channel].SnapFormat[SnapType].Video.ResolutionTypes=3M,1080,SXGA,1_3M,720,D1,CIF
20
4.6.2 GetSnapEncodeConfig
4.6.3 SetSnapEncodeConfig
21
Depends on capacity in 4.3.1 GetVideoInputCaps
head.Video.FPS float Range is [0.2-30].
Frames per second.
< 1.0: several seconds/frame, FPS=0.3333: 3 seconds per frame.
>1.0: several frames/second. FPS=3: 3 frames per second.
head.Video.GOP integer Range is [1-100].
Group of picture, it’s the interval of I Frame,
Example: GOP=50, means there is one I frame every 49 P or B frames
head.Video.Height integer Video height
head.Video.Width integer Video Width
head.Video.Quality integer Range is [1-6].
Image Quality, available when Video.BitRateControl=VBR
1: worst quality
6: best quality
head.VideoEnable bool True: enable video
4.7ChannelTitle
4.7.1 GetChannelTitleConfig
4.7.2 SetChannelTitleConfig
22
4.8VideoStandard
4.8.1 GetVideoStandardConfig
4.8.2 SetVideoStandardConfig
4.9VideoWidget
4.9.1 GetVideoWidgetConfig
23
…
Comment Channel: video channel index
CoReg: Cover Region
Covers is an array which sustains multi- Cover regions
0 = region 1
1 = region 2
2 = region 3
3 = region 4
head=table.VideoWidget[Channel].ChannelTitle (or)
table.VideoWidget[Channel].Covers[CoReg] (or)
table.VideoWidget[Channel].TimeTitle
4.9.2 SetVideoWidgetConfig
VideoWidgetConfig contains cover region settings, channel title settings and time title settings.
The italics below will be replaced by the above abbreviations.
Response OK or ERROR
24
headCover.Rect[0] integer Range is [0-8191].
headCover.Rect[1] Rect[0]:top left corner x coordinate (left)
headCover.Rect[2] Rect[1]:top left corner y coordinate (top)
headCover.Rect[3] Rect[2]:bottom right x coordinate (right)
Rect[3]:bottom right y coordinate (bottom)
headChannelTitle.BackColor[0] integer Range is the same with headCover
headChannelTitle.BackColor[1]
headChannelTitle.BackColor[2]
headChannelTitle.BackColor[3]
headChannelTitle.EncodeBlend bool
headChannelTitle.FrontColor[0] integer
headChannelTitle.FrontColor[1]
headChannelTitle.FrontColor[2]
headChannelTitle.FrontColor[3]
headChannelTitle.Rect[0] integer Only use the value of (left,top),the value of (right,bottom) is the same
headChannelTitle.Rect[1] as (left,top)
headChannelTitle.Rect[2] Rect[0], Rect[1] are used, and Rect[2] must be same with Rect[0],
headChannelTitle.Rect[3] Rect[3] must be same with Rect[1].
headTimeTitle.BackColor[0] integer Range is the same with headChannelTitle
headTimeTitle.BackColor[1] These are configs about time title.
headTimeTitle.BackColor[2]
headTimeTitle.BackColor[3]
headTimeTitle.EncodeBlend bool
headTimeTitle.FrontColor[0] integer
headTimeTitle.FrontColor[1]
headTimeTitle.FrontColor[2]
headTimeTitle.FrontColor[3]
headTimeTitle.Rect[0] integer
headTimeTitle.Rect[1]
headTimeTitle.Rect[2]
headTimeTitle.Rect[3]
headTimeTitle.ShowWeek bool True: Display week within the time title.
5. NetWork
5.1NetInterfaces
5.1.1 GetInterfaces
5.2BasicConfig
5.2.1 GetBasicConfig
5.2.2 SetBasicConfig
26
ParamName ParamValue type Description
NetWork.DefaultInterface string Set default network interface when multiple interfaces exist.
Range of interfaces is depends on 5.1.1 GetInterfaces
NetWork.Domain string Domain name.
NetWork.Hostname string Hostname and Domain compose a network address.
Network.interface.DefaultGateway string IP address
Network.interface.DhcpEnable bool Enable/Disable DHCP.
Network.interface.DnsServers[0] string IP address of first DNS server.
Network.interface.DnsServers[1] string IP address of second DNS server.
Network.interface.IPAddress string Interface IP address.
Network.interface.MTU integer Interface MTU.
Network.interface.PhysicalAddress string MAC address of interface.
HEX string in the form of:
xx:xx:xx:xx:xx:xx.
Range of x is [0-9,a-f,A-F]
Example:
00:10:5c:f2:1c:b4
00:10:5C:F2:1C:B5
Network.interface.SubnetMask string Network mask string:
In the form of x.x.x.x, range of x is [0-255]
Example:
255.255.255.0
5.3PPPoE
5.3.1 GetPPPoEConfig
5.3.2 SetPPPoEConfig
27
ParamName ParamValue type Description
PPPoE.Enable bool Enable/Disable PPPoE.
PPPoE.UserName string PPPoE user name.
PPPoE.Password string PPPoE user password.
5.4DDNS
5.4.1 GetDDNSConfig
5.4.2 SetDDNSConfig
28
DDNS[index].UserName string DDNS user name
5.5Email
5.5.1 GetEmailConfig
5.5.2 SetEmailConfig
5.6Wlan
5.6.1 GetWlanConfig
5.6.2 SetWlanConfig
30
ParamName ParamValue type Description
WLan.interface.Enable bool True: Enable WLan on this interface.
WLan.interface.Encryption string Range is {Off, On, WEP64Bits, WEP128Bits,
WPA-PSK-TKIP, WPA-PSK-CCMP}
Encryption mode.
WLan.interface.KeyFlag bool true: key is configured.
WLan.interface.KeyID integer Range is [0-3]
Indicates which key is used.
0 : WLan.interface.Keys[0] is used.
WLan.interface.KeyType string Range is {Hex, ASCII]
WLan.interface.Keys[0] string For ASCII key type: 64bits encryption key length is 5,
WLan.interface.Keys[1] string 128bits encryption key length is 13, consists of [0-9,
WLan.interface.Keys[2] string a-z, A-Z]
WLan.interface.Keys[3] string
For HEX key type: 64bits encryption key length is 10,
128bits encryption key length is 26, consists of [0-9,
a-z, A-Z]
WLan.interface.LinkMode string Range is {Auto, Ad-hoc, Infrastructure}.
Auto – select suitable mode automatically.
Ad-hoc – Device with wireless network adapter can
connect to each other without Access Point.
Infrastructure – Integrate wire and wireless LAN
together to share network resource, access point is
need in this mode.
WLan.interface.SSID string
5.7UPnP
5.7.1 GetUPnPConfig
31
5.7.2 SetUPnPConfig
5.7.3 GetUPnPStatus
5.8NTP
5.8.1 GetNTPConfig
32
5.8.2 SetNTPConfig
33
31: "GMT-11:00"
32: "GMT-12:00"
NTP.UpdatePeriod integer Range is [0-65535], unit is minutes
5.9AlarmServer
5.9.1 GetAlarmServerConfig
5.9.2 SetAlarmServerConfig
6. Events
6.1EventHandler
34
When alarm or event happen, actions defined in alarm EventHandler and event EventHandler are executed.
6.1.1 GetEventHandler
Example URL:
http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=Alarm[0].EventHandler
can get EventHandler settings of alarm channel 0.
Response handlerName.EventHandler.AlarmOut=1
handlerName.EventHandler.AlarmOutChannels[0]=1
handlerName.EventHandler.AlarmOutChannels[1]=1
…
handlerName.EventHandler.AlarmOutEnable=false
handlerName.EventHandler.AlarmOutLatch=10
handlerName.EventHandler.BeepEnable=true
handlerName.EventHandler.Dejitter=0
handlerName.EventHandler.Delay=30
handlerName.EventHandler.LogEnable=true
handlerName.EventHandler.MailEnable=true
handlerName.EventHandler.PtzLink[0][0]=None
handlerName.EventHandler.PtzLink[0][1]=0
handlerName.EventHandler.PtzLink[1][0]=None
handlerName.EventHandler.PtzLink[1][1]=0
…
handlerName.EventHandler.PtzLinkEnable=false
handlerName.EventHandler.Record=1
handlerName.EventHandler.RecordChannels[0]=1
handlerName.EventHandler.RecordChannels[1]=1
…
handlerName.EventHandler.RecordEnable=true
handlerName.EventHandler.RecordLatch=10
handlerName.EventHandler.Snapshot=1
handlerName.EventHandler.SnapshotChannels[0]=1
handlerName.EventHandler.SnapshotChannels[1]=1
…
handlerName.EventHandler.SnapshotEnable=false
handlerName.EventHandler.SnapshotPeriod=3
handlerName.EventHandler.SnapshotTimes=0
35
handlerName.EventHandler.TimeSection[0][0]=1 01:00:00-24:00:00
handlerName.EventHandler.TimeSection[0][1]=1 01:00:00-24:00:00
…
…
handlerName.EventHandler.TimeSection[6][5]=1 01:00:00-24:00:00
handlerName.EventHandler.TipEnable=true
6.1.2 SetEventHandler
36
handlerName.EventHandler.RecordLatch integer Range is [10-300].
Unit is seconds, indicates the time to record after input alarm is cleared..
handlerName.EventHandler.SnapshotChannels[ch] integer Range is {0, 1}
0 – do not snapshot on video channel ch
1 – snapshot on video channel ch
handlerName.EventHandler.SnapshotEnable bool Enable/Disable snapshot function.
handlerName.EventHandler.SnapshotPeriod integer Range is [0-255].
Frames between snapshot.
0 means continuously snapshot for every frame.
handlerName.EventHandler.SnapshotTimes integer Range is [0-65535]
Snapshot times before stop, 0 means don’t stop snapshot.
handlerName.EventHandler.TimeSection[wd][ts] String It’s table contains effective time period for eventHanlder everyday.
wd (week day) range is [0-6] (Sunday-Staurday)
ts (time section) range is [0-23], it’s index of timesection table.
Example:
TimeSection[1][0]=1 12:00:00-18:00:00
Means EventHandler is effective between 12:00:00 and 18:00:00 at
Monday.
handlerName.EventHandler.TipEnable bool Enable/Disable local message box tip.
6.2Alarm
6.2.1 GetAlarmConfig
37
6.2.2 SetAlarmConfig
6.2.3 GetAlarmOutConfig
6.2.4 SetAlarmOutConfig
38
6.2.5 GetInSlots
6.2.6 GetOutSlots
6.2.7 GetInState
6.2.8 GetOutState
39
6.3MotionDetect
6.3.1 GetMotionDetectConfig
6.3.2 SetMotionDetectConfig
40
Example:
MotionDetect[0].Region[0] = 4194303 (0x3FFFFF):: motion in channel 0 line 0’s
22 blocks is monitored.
MotionDetect[0].Region[1] =0: motion in line 1’s 22 blocks is not monitored.
MotionDetect[0].Region[17] = 3: in the last line of channel 0, motion in the left
two blocks is monitored.
6.4BlindDetect
6.4.1 GetBlindDetectConfig
6.4.2 SetBlindDetectConfig
6.5LossDetect
6.5.1 GetLossDetectConfig
41
head=table.BlindDetect[Channel]
Response head.Enable=false
head.EventHandler= (output of EventHandler is described in 6.1.1 GetEventHandler)
6.5.2 SetLossDetectConfig
6.6 GetEventIndexes
(This response means event happened on channel 0, channel 2, and channel 3.)
7. PTZ
7.1PTZConfig
7.1.1 GetPTZConfig
42
table.Ptz[port].Attribute[1]=8
table.Ptz[port].Attribute[2]=Even
table.Ptz[port].Attribute[3]=1
table.Ptz[port].Homing[0]=0
table.Ptz[port].Homing[1]=30
table.Ptz[port].NumberInMatrixs=0
table.Ptz[port].ProtocolName=NONE
7.1.2 SetPTZConfig
43
7.2PTZControl
7.2.1 GetProtocolList
7.2.2 GetCurrentProtocolCaps
46
Reset Restore default configuration. 0 0 0
SetPresetName Preset point number Preset point title. 0
(1 byte)
AlarmPtz Alarm linked PTZ. External alarm input Link type: Argument of link type:
channel. 1: go to preset point Link type = 1,
2: auto scan this is preset point
3: tour number
Link type = 2,
this is auto scan path
Link type = 3,
this is tour path
LightController Control the light on/off. Address of light Light number switch
controller
PositionABS Go to ABS position Horizontal angle: Vertical angle :0°-90° Zoom in mutiple
0°-360°
PositionReset Use current direction as reference. 0 0 0
UpTele up + TELE Speed [1-8] 0 0
DownTele down + TELE Speed [1-8] 0 0
LeftTele left + TELE Speed [1-8] 0 0
RightTele right + TELE Speed [1-8] 0 0
LeftUpTele leftup + TELE Speed [1-8] 0 0
LeftDownTele leftdown + TELE Speed [1-8] 0 0
RigjtUpTele rightup + TELE Speed [1-8] 0 0
RightDownTele rightdown + TELE Speed [1-8] 0 0
UpWide up + WIDE Speed [1-8] 0 0
DownWide down + WIDE Speed [1-8] 0 0
LeftWide left + WIDE Speed [1-8] 0 0
RightWide right + WIDE Speed [1-8] 0 0
LeftUpWide leftup + WIDE Speed [1-8] 0 0
LeftDownWide leftdown + WIDE Speed [1-8] 0 0
RightUpWide rightup + WIDE Speed [1-8] 0 0
RightDownWide rightdown + WIDE Speed [1-8] 0 0
47
8. Record&Snap
8.1Record
8.1.1 GetRecordConfig
8.1.2 SetRecordConfig
48
Set record time to every Sunday all day. Record type is motion detection and alarm.
URL should be:
http://<ip>/cgi-bin/configManager.cgi?action=setConfig&name=Record[0].TimeSection[0][0]&table=6 00:00:00-24:00:00
In this example, “6 00:00:00-24:00:00” means motion detection and alarm record all day (6 = 4 & 2, alarm is 4, motion detection is 2.).
8.1.3 GetRecordModeConfig
8.1.4 SetRecordModeConfig
8.2Snap
8.2.1 GetSnapConfig
49
8.2.2 SetSnapConfig
9. System
9.1General
9.1.1 GetGeneralConfig
9.1.2 SetGeneralConfig
50
ParamName ParamValue type Description
General.MachineName string Device name or serial number.
9.2SystemTime
9.2.1 GetCurrentTime
9.2.2 SetCurrentTime
9.3Locales
9.3.1 GetLocalesConfig
51
table.Locales.TimeFormat=yyyy-MM-dd HH:mm:ss
9.3.2 SetLocalesConfig
52
h = 1 for 1:00, hh = 01 for 1:00, time range is 1-12
Example:
yyyy-MM-dd HH:mm:ss or
MM-dd-yyyy HH:mm:ss or
dd-M-yy hh:mm:ss
9.4Language
9.4.1 GetLanguageCaps
9.4.2 GetLanguageConfig
9.4.3 SetLanguageConfig
53
9.5AccessFilter
9.5.1 GetAccessFilterConfig
9.5.2 SetAccessFilterConfig
9.6AutoMaintain
9.6.1 GetAutoMaintainConfig
54
table.AutoMaintain.AutoRebootHour=0
table.AutoMaintain.AutoRebootMinute=0
table.AutoMaintain.AutoShutDay=1
table.AutoMaintain.AutoShutHour=2
table.AutoMaintain.AutoShutMinute=0
9.6.2 SetAutoMaintainConfig
9.7UserManager
9.7.1 Group
There are two user groups: “admin” and “user”. The “admin” group has all the authorities of operating the IP Camera. The “user” group
only has monitor and replay authorities.
55
9.7.2 GetGroupInfo
9.7.3 GetGroupInfoAll
9.7.4 AddUser
56
9.7.5 DeleteUser
9.7.6 ModifyUser
9.7.7 ModifyPassword
9.7.8 GetUserInfo
57
9.7.9 GetUserInfoAll
9.8System Operation
9.8.1 Reboot
9.8.2 Shutdown
9.8.3 GetDeviceType
9.8.4 GetHardwareVersion
58
Response version=1.00
9.8.5 GetSerialNo
9.8.6 GetMachineName
9.8.7 GetSystemInfo
9.9 Log
9.9.1 StartFind
Example:
Find log between 2011-1-1 12:00:00 and 2011-1-10 12:00:00, URL is:
http://<ip>/cgi-bin/log.cgi?action=startFind&condition.StartTime=2011-1-1 12:00:00
&condition.EndTime=2011-1-10 12:00:00
Response token=1
9.9.2 DoFind
9.9.3 StopFind
9.9.4 Clear
60