[go: up one dir, main page]

0% found this document useful (0 votes)
748 views159 pages

Dahua HTTP Api All Cgis

The Dahua Common HTTP API Version 2.0 document provides detailed information on the API for Dahua video products, allowing programmers to access and configure these devices. It includes a comprehensive catalog of functionalities, including media streaming, video attributes, network settings, alarms, PTZ control, recording, and system configurations. The document also outlines modifications made from previous versions and specifies compatibility with various firmware versions.

Uploaded by

j.bartkowiak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
748 views159 pages

Dahua HTTP Api All Cgis

The Dahua Common HTTP API Version 2.0 document provides detailed information on the API for Dahua video products, allowing programmers to access and configure these devices. It includes a comprehensive catalog of functionalities, including media streaming, video attributes, network settings, alarms, PTZ control, recording, and system configurations. The document also outlines modifications made from previous versions and specifies compatibility with various firmware versions.

Uploaded by

j.bartkowiak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 159

DAHUA COMMON HTTP API

Version 2.0

1
Document History
No Release Notes Date Version Author
draft 2015-8-24 2.0 Wenqiang Zhang
Combine the file DAHUA_HTTP_API_FOR_DVR.doc with the file
DAHUA_HTTP_API_FOR_IPC.doc, and make follow modifications:
th
1) The single CGI in the 18 chapter storageDevice is a repeat of
chapter 10.2.1. Delete the 18th chapter.
th
2) Both of the CGIs in the 19 chapter NetApp is a repeat of
1 th
chapter 5.1.1 and chapter 5.7.3. Delete the 19 chapter.
3) Modify the response of the CGI
“/cgi-bin/magicBox.cgi?action=getSoftwareVersion”. The
response must contain “version” and “build”. For example:
version=2.212.0000.0.R,build:2013-11-14

2
Preface
This document details the API of Dahua video products. Programmers can access and configure Dahua video products follow the APIs. This
document with version 1.10 is available with firmware version 2.608, 2.610 and above. This document with version 1.20, 1.21, 1.22, 1.23, 1.24
is available with firmware 2.616 and above.

Catalog
Document History ...................................................................................................................................................................................................... 2
Preface ....................................................................................................................................................................................................................... 3
Catalog ....................................................................................................................................................................................................................... 3
1 HTTP API Transaction ...................................................................................................................................................................................... 12
1.1 Transaction ................................................................................................................................................................................... 12
1.2 Format.......................................................................................................................................................................................... 13
1.3 Authentication ............................................................................................................................................................................. 13
1.4 Response ...................................................................................................................................................................................... 14
2 MediaStream ..................................................................................................................................................................................................14
2.1 Video............................................................................................................................................................................................ 14
2.1.1 GetMaxExtraStreamCounts ................................................................................................................................................ 14
2.1.2 GetRtspStream .................................................................................................................................................................... 15
2.1.3 RtspPlayback ....................................................................................................................................................................... 15
2.1.4 RtspPlayBack By Filename .................................................................................................................................................. 15
2.1.5 GetMjpgStream ..................................................................................................................................................................15
2.1.6 Download File ..................................................................................................................................................................... 16
2.1.7 Download File By Filename ................................................................................................................................................ 17
2.1.8 GetStream ........................................................................................................................................................................... 17
2.1.9 Playback .............................................................................................................................................................................. 17
2.2 Audio ............................................................................................................................................................................................ 18
2.2.1 Audio MIME type ................................................................................................................................................................ 19
2.2.2 Get Audio Input Channel .................................................................................................................................................... 19
2.2.3 Get Audio Output Channel ................................................................................................................................................. 19
2.2.4 Post Audio Stream .............................................................................................................................................................. 19
2.2.5 Get Audio Stream ............................................................................................................................................................... 20
2.3 Snapshot ...................................................................................................................................................................................... 21
2.3.1 GetSnapConfig .................................................................................................................................................................... 21
2.3.2 SetSnapConfig ..................................................................................................................................................................... 22
2.3.3 Manual Snapshot ................................................................................................................................................................ 22
2.3.4 Event Snapshot ...................................................................................................................................................................23
3 VideoAttributes .............................................................................................................................................................................................. 24
3.1 VideoColor ................................................................................................................................................................................... 24
3.1.1 GetVideoColorConfig .......................................................................................................................................................... 24
3.1.2 SetVideoColorConfig........................................................................................................................................................... 24
3.2 VideoEncode ................................................................................................................................................................................ 25
3.2.1 GetVideoConfigCaps ........................................................................................................................................................... 25
3.2.2 Resolution(翻译成英文) ..................................................................................................................................................... 26

3
3.2.3 GetVideoEncodeConfig ....................................................................................................................................................... 28
3.2.4 SetVideoEncodeConfig ....................................................................................................................................................... 28
3.2.5 GetCaps............................................................................................................................................................................... 30
3.3 AudioEncode ................................................................................................................................................................................ 30
3.3.1 GetAudioConfigCaps ........................................................................................................................................................... 30
3.3.2 GetAudioEncodeConfig ....................................................................................................................................................... 31
3.3.3 SetAudioEncodeConfig ....................................................................................................................................................... 32
3.4 SnapEncode ................................................................................................................................................................................. 33
3.4.1 GetSnapConfigCaps ............................................................................................................................................................ 33
3.4.2 GetSnapEncodeConfig ........................................................................................................................................................ 33
3.4.3 SetSnapEncodeConfig ......................................................................................................................................................... 34
3.5 ChannelTitle ................................................................................................................................................................................. 35
3.5.1 GetChannelTitleConfig........................................................................................................................................................ 35
3.5.2 SetChannelTitleConfig ........................................................................................................................................................ 35
3.6 ChannelNumber ........................................................................................................................................................................... 36
3.6.1 Get Video Input Channels ................................................................................................................................................... 36
3.7 VideoStandard ............................................................................................................................................................................. 36
3.7.1 GetVideoStandardConfig .................................................................................................................................................... 36
3.7.2 SetVideoStandardConfig ..................................................................................................................................................... 36
3.8 VideoWidget ................................................................................................................................................................................ 36
3.8.1 GetVideoWidgetConfig ....................................................................................................................................................... 36
3.8.2 SetVideoWidgetConfig ....................................................................................................................................................... 37
3.9 VideoInOptions ............................................................................................................................................................................ 39
3.9.1 GetVideoInputCaps ............................................................................................................................................................ 39
3.9.2 GetVideoInOptionsConfig ................................................................................................................................................... 42
3.9.3 SetVideoInOptionsConfig ................................................................................................................................................... 44
3.10 VideoInWhiteBalance ..................................................................................................................................................................49
3.10.1 SetVideoInWhiteBalance .................................................................................................................................................... 49
3.10.2 SetVideoInWhiteBalance .................................................................................................................................................... 49
3.11 VideoInFocus ............................................................................................................................................................................... 50
3.11.1 GetVideoInFocus ................................................................................................................................................................ 50
3.11.2 SetVideoInFocus .................................................................................................................................................................50
3.12 VideoInZoom ............................................................................................................................................................................... 51
3.12.1 GetVideoInZoom ................................................................................................................................................................ 51
3.12.2 SetVideoInZoom .................................................................................................................................................................51
3.13 VideoInSharpness ........................................................................................................................................................................ 52
3.13.1 GetVideoInSharpness ......................................................................................................................................................... 52
3.13.2 SetVideoInSharpness .......................................................................................................................................................... 52
3.14 VideoInRotate .............................................................................................................................................................................. 53
3.14.1 GetVideoInRotate ............................................................................................................................................................... 53
3.14.2 SetVideoInRotate ................................................................................................................................................................ 53
3.15 VideoInMode ............................................................................................................................................................................... 54
3.15.1 GetVideoInMode ................................................................................................................................................................ 54
3.15.2 SetVideoInMode .................................................................................................................................................................55
4 Flashlight ........................................................................................................................................................................................................ 56

4
4.1 FlashlightConfig ............................................................................................................................................................................ 56
4.1.1 GetFlashlightConfig ............................................................................................................................................................. 56
4.1.2 SetFlashlightConfig ............................................................................................................................................................. 56
5 Network .......................................................................................................................................................................................................... 57
5.1 Net Interfaces............................................................................................................................................................................... 57
5.1.1 GetInterfaces ...................................................................................................................................................................... 57
5.2 BasicNetworkConfig ..................................................................................................................................................................... 57
5.2.1 GetBasicNetworkConfig ...................................................................................................................................................... 57
5.2.2 SetBasicNetworkConfig....................................................................................................................................................... 58
5.3 PPPoE ........................................................................................................................................................................................... 59
5.3.1 GetPPPoEConfig ..................................................................................................................................................................59
5.3.2 SetPPPoEConfig...................................................................................................................................................................59
5.4 DDNS ............................................................................................................................................................................................ 59
5.4.1 GetDDNSConfig ...................................................................................................................................................................59
5.4.2 SetDDNSConfig ...................................................................................................................................................................60
5.5 Email ............................................................................................................................................................................................ 61
5.5.1 GetEmailConfig ...................................................................................................................................................................61
5.5.2 SetEmailConfig .................................................................................................................................................................... 61
5.6 Wlan ............................................................................................................................................................................................. 62
5.6.1 GetWlanConfig.................................................................................................................................................................... 62
5.6.2 SetWlanConfig .................................................................................................................................................................... 62
5.6.3 ScanWlanDevices ................................................................................................................................................................ 63
5.7 UPnP ............................................................................................................................................................................................ 64
5.7.1 GetUPnPConfig ...................................................................................................................................................................64
5.7.2 SetUPnPConfig .................................................................................................................................................................... 64
5.7.3 GetUPnPStatus.................................................................................................................................................................... 65
5.8 NTP............................................................................................................................................................................................... 65
5.8.1 GetNTPConfig ..................................................................................................................................................................... 65
5.8.2 SetNTPConfig ...................................................................................................................................................................... 66
5.9 RTSP ............................................................................................................................................................................................. 67
5.9.1 GetRTSPConfig .................................................................................................................................................................... 67
5.9.2 SetRTSPConfig ..................................................................................................................................................................... 67
5.10 Telnet ........................................................................................................................................................................................... 68
5.10.1 GetTelnetConfig ..................................................................................................................................................................68
5.10.2 SetTelnetConfig ...................................................................................................................................................................68
5.11 NetAlarmServer ........................................................................................................................................................................... 68
5.11.1 GetAlarmServerConfig ........................................................................................................................................................ 68
5.11.2 SetAlarmServerConfig ......................................................................................................................................................... 68
6 Alarm .............................................................................................................................................................................................................. 69
6.1 EventHandler ............................................................................................................................................................................... 69
6.1.1 GetEventHandler ................................................................................................................................................................ 69
6.1.2 SetEventHandler ................................................................................................................................................................. 70
6.2 Alarm ........................................................................................................................................................................................... 72
6.2.1 GetAlarmConfig .................................................................................................................................................................. 72
6.2.2 SetAlarmConfig ................................................................................................................................................................... 72

5
6.2.3 GetAlarmOutConfig ............................................................................................................................................................ 73
6.2.4 SetAlarmOutConfig ............................................................................................................................................................. 73
6.2.5 GetInSlots ........................................................................................................................................................................... 74
6.2.6 GetOutSlots......................................................................................................................................................................... 74
6.2.7 GetInState ........................................................................................................................................................................... 74
6.2.8 GetOutState ........................................................................................................................................................................ 74
6.3 MotionDetect ............................................................................................................................................................................... 74
6.3.1 GetMotionDetectConfig...................................................................................................................................................... 74
6.3.2 SetMotionDetectConfig ...................................................................................................................................................... 75
6.4 BlindDetect .................................................................................................................................................................................. 76
6.4.1 GetBlindDetectConfig ......................................................................................................................................................... 76
6.4.2 SetBlindDetectConfig .......................................................................................................................................................... 76
6.5 LossDetect ....................................................................................................................................................................................77
6.5.1 GetLossDetectConfig ..........................................................................................................................................................77
6.5.2 SetLossDetectConfig ...........................................................................................................................................................77
6.6 LoginFailureAlarm ........................................................................................................................................................................77
6.6.1 GetLoginFailureAlarmConfig ...............................................................................................................................................77
6.6.2 SetLoginFailureAlarmConfig ................................................................................................................................................ 78
6.7 StorageAbnormal ......................................................................................................................................................................... 78
6.7.1 GetStorageNotExistConfig .................................................................................................................................................. 78
6.7.2 SetStorageNotExistConfig ................................................................................................................................................... 78
6.7.3 Get StorageFailureConfig .................................................................................................................................................... 79
6.7.4 Set StorageFailureConfig ..................................................................................................................................................... 79
6.7.5 GetStorageLowSpaceConfig ................................................................................................................................................ 79
6.7.6 SetStorageLowSpaceConfig................................................................................................................................................. 79
6.8 NetAbnormal ............................................................................................................................................................................... 80
6.8.1 GetNetAbortConfig ............................................................................................................................................................. 80
6.8.2 SetNetAbortConfig .............................................................................................................................................................. 80
6.8.3 GetIPConflictConfig............................................................................................................................................................. 80
6.8.4 SetIPConflictConfig ............................................................................................................................................................. 80
6.9 GetEventIndexes .......................................................................................................................................................................... 81
6.10 Attach ........................................................................................................................................................................................... 81
6.11 GetCaps ........................................................................................................................................................................................ 83
7 PTZ .................................................................................................................................................................................................................. 83
7.1 PTZConfig ..................................................................................................................................................................................... 83
7.1.1 GetPTZConfig ...................................................................................................................................................................... 83
7.1.2 SetPTZConfig ....................................................................................................................................................................... 84
7.1.3 GetPtzAutoMovementConfig .............................................................................................................................................. 84
7.1.4 SetPtzAutoMovementConfig .............................................................................................................................................. 85
7.2 PTZControl.................................................................................................................................................................................... 86
7.2.1 GetProtocolList ...................................................................................................................................................................86
7.2.2 GetCurrentProtocolCaps ..................................................................................................................................................... 86
7.2.3 PTZ control commands ....................................................................................................................................................... 87
7.3 PTZStatus ..................................................................................................................................................................................... 90
7.3.1 PTZ GetStatus...................................................................................................................................................................... 90

6
8 Record ............................................................................................................................................................................................................ 90
8.1 RecordManager ........................................................................................................................................................................... 90
8.1.1 GetCaps............................................................................................................................................................................... 90
8.2 Record .......................................................................................................................................................................................... 91
8.2.1 GetRecordConfig .................................................................................................................................................................91
8.2.2 SetRecordConfig .................................................................................................................................................................91
8.2.3 GetRecordModeConfig ....................................................................................................................................................... 92
8.2.4 SetRecordModeConfig ........................................................................................................................................................ 92
8.3 Record MediaGlobal..................................................................................................................................................................... 93
8.3.1 GetMediaGlobalConfig ....................................................................................................................................................... 93
8.3.2 SetMediaGlobalConfig ........................................................................................................................................................ 93
9 System ............................................................................................................................................................................................................ 93
9.1 General......................................................................................................................................................................................... 93
9.1.1 GetGeneralConfig ............................................................................................................................................................... 93
9.1.2 SetGeneralConfig ................................................................................................................................................................ 94
9.2 SystemTime ................................................................................................................................................................................. 94
9.2.1 GetCurrentTime ..................................................................................................................................................................94
9.2.2 SetCurrentTime ..................................................................................................................................................................94
9.3 Locales ......................................................................................................................................................................................... 94
9.3.1 GetLocalesConfig ................................................................................................................................................................ 94
9.3.2 SetLocalesConfig .................................................................................................................................................................95
9.4 Language ...................................................................................................................................................................................... 96
9.4.1 GetLanguageCaps ............................................................................................................................................................... 96
9.4.2 GetLanguageConfig ............................................................................................................................................................. 96
9.4.3 SetLanguageConfig ............................................................................................................................................................. 97
9.5 AccessFilter .................................................................................................................................................................................. 97
9.5.1 GetAccessFilterConfig ......................................................................................................................................................... 97
9.5.2 SetAccessFilterConfig .......................................................................................................................................................... 97
9.6 AutoMaintain ............................................................................................................................................................................... 98
9.6.1 GetAutoMaintainConfig ...................................................................................................................................................... 98
9.6.2 SetAutoMaintainConfig....................................................................................................................................................... 98
9.7 UserManager ............................................................................................................................................................................... 99
9.7.1 Group .................................................................................................................................................................................. 99
9.7.2 GetGroupInfo ...................................................................................................................................................................... 99
9.7.3 GetGroupInfoAll ................................................................................................................................................................ 100
9.7.4 AddUser ............................................................................................................................................................................ 100
9.7.5 DeleteUser ........................................................................................................................................................................ 100
9.7.6 ModifyUser ....................................................................................................................................................................... 101
9.7.7 ModifyPassword ............................................................................................................................................................... 101
9.7.8 GetUserInfo ....................................................................................................................................................................... 101
9.7.9 GetUserInfoAll................................................................................................................................................................... 101
9.7.10 GetActiveUserInfoAll ......................................................................................................................................................... 102
9.8 System Operation ....................................................................................................................................................................... 102
9.8.1 Reboot .............................................................................................................................................................................. 102
9.8.2 Shutdown.......................................................................................................................................................................... 102

7
9.8.3 GetDeviceType .................................................................................................................................................................. 103
9.8.4 GetHardwareVersion......................................................................................................................................................... 103
9.8.5 GetSerialNo ....................................................................................................................................................................... 103
9.8.6 GetMachineName ............................................................................................................................................................. 103
9.8.7 GetSystemInfo .................................................................................................................................................................. 103
9.8.8 GetVendor......................................................................................................................................................................... 104
9.8.9 GetSoftwareVersion .......................................................................................................................................................... 104
9.8.10 GetBuildDate .................................................................................................................................................................... 104
9.8.11 GetCGIVersion ................................................................................................................................................................... 104
9.8.12 GetOnvifVersion ................................................................................................................................................................ 104
9.8.13 GetDeviceClass .................................................................................................................................................................104
9.9 Log.............................................................................................................................................................................................. 105
9.9.1 StartFind ........................................................................................................................................................................... 105
9.9.2 DoFind .............................................................................................................................................................................. 105
9.9.3 StopFind ............................................................................................................................................................................ 106
9.9.4 Clear .................................................................................................................................................................................. 106
9.10 OnvifLoginCheck ........................................................................................................................................................................ 106
9.10.1 GetOnvifLoginCheckConfig ............................................................................................................................................... 106
9.10.2 SetOnvifLoginCheckConfig ................................................................................................................................................ 106
9.11 ConfigRestore ............................................................................................................................................................................. 107
9.11.1 Restore .............................................................................................................................................................................. 107
9.11.2 RestoreExcept ................................................................................................................................................................... 107
9.12 Holiday ....................................................................................................................................................................................... 107
9.12.1 GetHolidayConfig .............................................................................................................................................................. 107
9.12.2 SetHolidayConfig............................................................................................................................................................... 108
10 Storage ......................................................................................................................................................................................................... 108
10.1 FileFinding ................................................................................................................................................................................. 108
10.1.1 Create ............................................................................................................................................................................... 108
10.1.2 StartFind ........................................................................................................................................................................... 109
10.1.3 FindNextFile...................................................................................................................................................................... 109
10.1.4 Close ................................................................................................................................................................................. 110
10.1.5 Destroy.............................................................................................................................................................................. 110
10.2 Storage Device ........................................................................................................................................................................... 110
10.2.1 GetStorageDevicePortInfo ................................................................................................................................................ 110
10.2.2 GetStorageDeviceNames .................................................................................................................................................. 111
10.2.3 GetDeviceAllInfo ............................................................................................................................................................... 111
10.2.4 GetCaps............................................................................................................................................................................. 111
10.3 Work Group................................................................................................................................................................................ 112
10.3.1 GetWorkGroupCollect....................................................................................................................................................... 112
10.4 Work Directory ........................................................................................................................................................................... 112
10.4.1 GetWorkDirectoryCollect .................................................................................................................................................. 112
10.5 NAS ............................................................................................................................................................................................ 112
10.5.1 GetNASConfig ................................................................................................................................................................... 112
10.5.2 SetNASConfig .................................................................................................................................................................... 113
10.6 Storage Point .............................................................................................................................................................................. 113

8
10.6.1 GetRecordStoragePointConfig .......................................................................................................................................... 113
10.6.2 SetRecordStoragePointConfig ........................................................................................................................................... 114
10.6.3 GetStorageGroupConfig .................................................................................................................................................... 114
10.6.4 SetStorageGroupConfig .................................................................................................................................................... 114
11 Display .......................................................................................................................................................................................................... 115
11.1 GUIConfig ................................................................................................................................................................................... 115
11.1.1 GetGUIConfig .................................................................................................................................................................... 115
11.1.2 SetGUIConfig..................................................................................................................................................................... 116
11.2 Split ............................................................................................................................................................................................ 116
11.2.1 GetSplitMode .................................................................................................................................................................... 116
11.2.2 SetSplitMode .................................................................................................................................................................... 117
11.3 Monitor Tour .............................................................................................................................................................................. 117
11.3.1 EnableMonitorTour ........................................................................................................................................................... 117
11.3.2 GetMonitorTourConfig ...................................................................................................................................................... 117
11.3.3 SetMonitorTourConfig ...................................................................................................................................................... 118
11.4 Monitor Collect .......................................................................................................................................................................... 118
11.4.1 GetMonitorCollectionConfig ............................................................................................................................................. 118
11.4.2 SetMonitorCollectionConfig ............................................................................................................................................. 118
11.5 VideoOut.................................................................................................................................................................................... 119
11.5.1 GetVideoOutConfig .......................................................................................................................................................... 119
11.5.2 SetVideoOutConfig ........................................................................................................................................................... 120
12 VideoFocus ................................................................................................................................................................................................... 120
12.1 AdjustFocus ................................................................................................................................................................................ 120
12.2 AdjustFocusContinuously ........................................................................................................................................................... 121
12.3 AutoFocus .................................................................................................................................................................................. 121
12.4 GetFocusStatus .......................................................................................................................................................................... 121
12.5 getCurrentWindow .................................................................................................................................................................... 122
12.6 setCurrentWindow .................................................................................................................................................................... 122
13 Backup .......................................................................................................................................................................................................... 123
13.1 ConfigBackup ............................................................................................................................................................................. 123
13.2 LogBackup .................................................................................................................................................................................. 123
14 AccessControl ............................................................................................................................................................................................... 125
14.1 OpenDoor .................................................................................................................................................................................. 125
14.2 GetDoorStatus ........................................................................................................................................................................... 125
14.3 AccessControlCard ..................................................................................................................................................................... 125
14.3.1 find .................................................................................................................................................................................... 125
14.3.2 update............................................................................................................................................................................... 126
14.3.3 insert ................................................................................................................................................................................. 127
14.3.4 remove .............................................................................................................................................................................. 127
14.3.5 getQuerySize ..................................................................................................................................................................... 127
14.4 AccessControlCardRec ................................................................................................................................................................ 128
14.4.1 find .................................................................................................................................................................................... 128
14.5 Announcement .......................................................................................................................................................................... 129
14.5.1 insert ................................................................................................................................................................................. 129
14.6 VideoTalkLog .............................................................................................................................................................................. 129

9
14.6.1 find .................................................................................................................................................................................... 129
14.7 AlarmRecord .............................................................................................................................................................................. 130
14.7.1 find .................................................................................................................................................................................... 130
15 DeviceDiscovery ........................................................................................................................................................................................... 131
15.1 DeviceDiscovery ......................................................................................................................................................................... 131
16 VideoAnalyse................................................................................................................................................................................................ 131
16.1 GetCaps ...................................................................................................................................................................................... 132
16.1.1 GetCaps............................................................................................................................................................................. 132
16.2 VideoAnalyseRule ...................................................................................................................................................................... 132
16.2.1 GetVideoAnalyseRule ....................................................................................................................................................... 132
16.2.2 SetVideoAnalyseRule ........................................................................................................................................................ 133
16.3 VideoWidgetNumberStat .......................................................................................................................................................... 134
16.3.1 GetVideoWidgetNumberStat ........................................................................................................................................... 134
16.3.2 SetVideoWidgetNumberStat ............................................................................................................................................ 134
16.4 VideoEncodeROI ........................................................................................................................................................................ 135
16.4.1 GetVideoEncodeROI ......................................................................................................................................................... 135
16.4.2 SetVideoEncodeROI .......................................................................................................................................................... 135
16.5 VideoStatServer ......................................................................................................................................................................... 136
16.5.1 GetSummary ..................................................................................................................................................................... 136
16.5.2 StartFind ........................................................................................................................................................................... 136
16.5.3 DoFind .............................................................................................................................................................................. 137
16.5.4 StopFind ............................................................................................................................................................................ 137
17 Traffic ............................................................................................................................................................................................................ 139
17.1 TrafficSnap ................................................................................................................................................................................. 139
17.1.1 GetParkingSpaceStatus ..................................................................................................................................................... 139
17.2 TrafficParking ............................................................................................................................................................................. 139
17.2.1 GetAllParkingSpaceStatus ................................................................................................................................................. 139
18 Radiometry ................................................................................................................................................................................................... 141
18.1 RadioMetry Config ..................................................................................................................................................................... 141
18.1.1 GetHeatImagingThermometryConfig ............................................................................................................................... 141
18.1.2 SetHeatImagingThermometryConfig ................................................................................................................................ 141
18.1.3 GetThermometryRuleConfig ............................................................................................................................................. 142
18.1.4 SetThermometryRuleConfig ............................................................................................................................................. 143
18.1.5 GetHeatImagingTemperConfig.......................................................................................................................................... 144
18.1.6 SetHeatImagingTemperConfig .......................................................................................................................................... 144
18.2 GetCaps ...................................................................................................................................................................................... 145
18.3 GetRandomPointTemper............................................................................................................................................................ 146
18.4 GetTemper ................................................................................................................................................................................. 146
19 Thermography .............................................................................................................................................................................................. 147
19.1 Thermography Config................................................................................................................................................................. 147
19.1.1 GetThermographyOptionsConfig ...................................................................................................................................... 147
19.1.2 SetThermographyOptionsConfig....................................................................................................................................... 148
19.2 GetExternSystemInfo .................................................................................................................................................................149
19.3 GetPresetParam ......................................................................................................................................................................... 149
19.4 GetCaps ...................................................................................................................................................................................... 150

10
19.5 GetOptimizedRegion .................................................................................................................................................................. 151
19.6 EnableShutter ............................................................................................................................................................................ 151
20 HeatMap ....................................................................................................................................................................................................... 152
20.1 GetPicByTime............................................................................................................................................................................. 152
21 VideoTalkPeer............................................................................................................................................................................................... 152
21.1 attachState ................................................................................................................................................................................. 152
21.2 detachState ................................................................................................................................................................................ 153
21.3 invite .......................................................................................................................................................................................... 153
21.4 cancel ......................................................................................................................................................................................... 154
21.5 answer ....................................................................................................................................................................................... 154
21.6 refuse ......................................................................................................................................................................................... 155
21.7 hangup ....................................................................................................................................................................................... 155
22 Abandoned APIs ........................................................................................................................................................................................... 155
22.1 Get Video Detect Caps ............................................................................................................................................................... 155
22.2 GetChannelInState ..................................................................................................................................................................... 156
22.3 GetChannelOutState .................................................................................................................................................................. 156
22.4 GetUUID ..................................................................................................................................................................................... 156
22.5 SetStorageDevice ....................................................................................................................................................................... 156
23 Appendix ...................................................................................................................................................................................................... 157
23.1 Stream Format ........................................................................................................................................................................... 157
23.2 Extend Header Format ............................................................................................................................................................... 158
23.2.1 Audio extend header ........................................................................................................................................................ 158
23.2.2 Video Extend Header: ....................................................................................................................................................... 158
23.2.3 Channel Title Extend Header: ........................................................................................................................................... 159
23.2.4 TimeZone Extend Header: ................................................................................................................................................ 159
23.2.5 Event Flag Extend Header: ................................................................................................................................................ 159

11
1 HTTP API Transaction

1.1 Transaction

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 Dahua video products, and then sends the response back to the client application. The HTTP request is taken in GET form. If the
request is successful, the Dahua video product 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 an integer
not less than 0 and not larger than 100. “{0, 1, 2, 3}” denotes the valid value of an integer among 0, 1, 2 and 3.
4. In the request and response, we use “[]” to denote an array. The index is usually an integer and start form 0.
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
Description Get Video Color configuration.
Response HTTP/1.1 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=VideoColor[0][0].Brightness
Response:
HTTP/1.1 200 OK
Content-Type: text/plain
table.VideoColor[0][0].Brightness=50

12
1.2 Format

The format of API Description is below table:

URL Syntax http://<ip>/cgi-bin/magicBox.cgi?action=getProductDefinition&name=MaxExtraStream


Description Get Max Extra Stream number of device
For example:
http://192.168.1.108/cgi-bin/magicBox.cgi?action=getProductDefinition&name=MaxExtraStream
Response table.MaxExtraStream=1
Comment [Params in URL:]

Params in Resp :
the range of table.MaxExtraStream is {1,2,3}

URL Syntax: the format of the CGI. The variable is between "<" and ">", and unnecessary params are between "[" and "]". We also use “[]” to
denote an array.
Description: the function explanation of the CGI, and a real example if there is any variable in the CGI.
Response: example of response for the CGI.
Comment: the comments of the CGI. “Params in URL” is followed by comments of params in URL Syntax and “Params in Resp” is followed by
comments of params in the Response. The comments contain type of params, range of params, explanations of abbreviations and so on.

1.3 Authentication

The Dahua video product supplies two authentication ways: basic authentication and digest authentication. If the http request does not
have a legal “Authorization”, the Dahua video product returns 401, requiring an authentication of the http request.
For example:
1. When basic authentication, the Dahua video product response:
401 Unauthorized
WWW-Authenticate: Basic realm=”XXXXXX”
Then the client encodes the username and password with base64, and then sends the following authorization with request:
Authorization: Basic VXZVXZ.
2. When digest authentication, the Dahua video product response:
WWW-Authenticate: Digest realm="DH_00408CA5EA04", nonce="000562fdY631973ef04f77a3ede7c1832ff48720ef95ad",
stale=FALSE, qop="auth";
The client calculates the digest using username, password, nonce, realm, qop and URI with MD5, and then sends the following
authorization with request:
Authorization: Digest username="admin", realm="DH_00408CA5EA04", nc=00000001, cnonce="0a4f113b", qop="auth",
nonce="000562fdY631973ef04f77a3ede7c1832ff48720ef95ad", uri="/cgi-bin/magicBox.cgi?action=getLanguageCaps",
response="65002de02df697e946b750590b44f8bf"

13
1.4 Response

When cgi response is failed, the answer’s format is:


Error\n
ErrorID=<Error Code>, Detail=<Error Description>\n
For example:
Error
ErrorID=0, Detail=Invalid Authority!

Error definitions are as follows:

Table3-1 Error Code and Description


Error Code Description 错误描述
0 Invalid Authority! 用户没有该项权限
1 Request parse error! 请求错误,比如请求内容不全
2 Invalid Request! 请求非法
3 Method not found! 接口没找到,不支持该请求
4 Request invalid param! 请求带有的参数不合法
5 Server internal error! 设备内部错误,比如该请求执行失败
6 Request Timeout! 请求超时
7 Client keepalive failed! 客户端保活失败
8 Network error! 设备端网络错误

2 MediaStream
Camera API allows application to configure and view Dahua video product settings.

2.1 Video

2.1.1 GetMaxExtraStreamCounts

URL Syntax http://<ip>/cgi-bin/magicBox.cgi?action=getProductDefinition&name=MaxExtraStream


Description Get max extra stream count
Response table.MaxExtraStream=1
Comment the value of table.MaxExtraStream can be 1, 2 or 3

14
2.1.2 GetRtspStream

URL Syntax rtsp://<username>:<password>@<ip>:<port>/cam/realmonitor?channel=<channelNo>&subtype=<typeNo>


Comment <username>: a valid user’s username.
<password>: user’s password.
<ip>: the IP address of the Dahua video product.
<port >: the default port is 554. It can be omitted.
<channelNo>: the channel number. It starts from 1.
<typeNo>: the stream type. The <typeNo> of main stream is 0, extra stream 1 is 1, extra stream 2 is 2. The extra stream
counts can be obtained in GetMaxExtraStreamCounts. The stream must be enabled by setting head.VideoEnable to true
in SetVideoEncodeConfig.
For example, we request the extra stream 1 of channel 1, the URL is:
rtsp://admin:admin@10.7.6.67:554/cam/realmonitor?channel=1&subtype=1.
The IP Camera supports both TCP and UDP transmission forms.
It also supplies basic authentication and digest authentication ways. The authentication process is similar with 1.3
Authentication.

2.1.3 RtspPlayback

URL Syntax rtsp://<username>:<password>@<ip>:<port>/cam/


playback?channel=<channelNo>&starttime=<starttime>&endtime=<endtime>
Comment It’s similar with GetRtspStream. Except there are parameters starttime and endtime.
For example:
rtsp://admin:admin@10.44.200.8:554/cam/playback?channel=1&starttime=2012_09_15_12_37_05&endtime=20
12_09_15_18_34_14

2.1.4 RtspPlayBack By Filename

URL Syntax rtsp://<username>:<password>@<ip>:<port>/<filename>


Response It’s similar with GetRtspStream.
For example:
rtsp://admin:admin@10.44.200.8:554/2012_09_15_12_37_05:2012_09_15_18_34_14[0][0].dav

2.1.5 GetMjpgStream

URL Syntax http://<ip>/cgi-bin/mjpg/video.cgi[?channel=<channelNo>&subtype=<typeNo>]


Description Get a video stream encoded by mjpg.
Example:

15
To get a video stream of channel 1, main stream, the URL can be
http://192.168.1.108/cgi-bin/mjpg/video.cgi
or
http://192.168.1.108/cgi-bin/mjpg/video.cgi?channel=1&subtype=0
Response video stream encoded by MJPG.
Return:
HTTP Code:200 OK
Content-Type: multipart/x-mixed-replace; boundary=<boundary>
Body:
--<boundary>
Content-Type: image/jpeg
Content-Length:<image size>

<JPEG image data>


--<boundary>
Comment Params in URL:
channelNo: integer, the video channel index which starts from 1, default 1 if not specified.
typeNo: the stream type, default 0 if not specified. It can be the following value:
0-Main Stream
1-Extra Stream 1
2-Extra Stream 2

2.1.6 Download File


URL Syntax http://<ip>/cgi-bin/loadfile.cgi?action=startLoad&channel=<channelNo>&startTime=<starttime>&endTime=<endtime>[&sub
type=<typeNo>]
Description Download a video file.
Example:
http://192.168.1.108/cgi-bin/loadfile.cgi?action=startLoad&channel=1&startTime=2012-10-8%2013:00:01&endTime=2012-10
-8%2014:00:01&subtype=0
Response HTTP Code: 200 OK
Content-Type: Application/octet-stream
Content-Length:<fileLength>
Body:
<data>
<data>
Comment Params in URL:
channelNo: integer, the video channel index which starts from 1.
typeNo: the stream type, default 0 if not specified.
0-Main Stream
1-Extra Stream 1
2-Extra Stream 2
starttime & endtime: video start time and end time. Time format: yyyy-mm-dd hh:mm:ss

16
2.1.7 Download File By Filename
URL Syntax http://<ip>/cgi-bin/RPC_Loadfile/<filename>
Description Download a file by filename.
Example:
http://192.168.1.108/cgi-bin/RPC_Loadfile/2012_09_15_12_37_05:2012_09_15_18_34_14[0][0].dav
Response HTTP Code: 200 OK
Content-Type: Application/octet-stream
Content-Length:<fileLength>
Body:
<data>
<data>
Comment Params in URL:
filename: name of media files which would be downloaded

2.1.8 GetStream

URL Syntax http://<ip>/cgi-bin/realmonitor.cgi?action=getStream[&channel=<channelNo>&subtype=<typeNo>]


Description Get a video stream.
Example:
http://192.168.1.108/cgi-bin/realmonitor.cgi?action=getStream&channel=1&subtype=0
Response HTTP Code: 200 OK
Content-Type: Application/octet-stream
Body:
<data>
<data>

Comment Params in URL:


channelNo: video channel index, default 1 if not specified.
typeNo: the stream type, default 0 if channelNo was not specified.
0-Main Stream
1-Extra Stream 1
2-Extra Stream 2
Compared to 4.1.1 GetStream using RTSP, it is another way to get stream. This is a way to use http protocol
to get real monitor stream. The data format is shown in appendix.

2.1.9 Playback

URL Syntax http://<ip>/cgi-bin/playBack.cgi?action=getStream[&channel=<channelNo>&subtype=<typeNo>]&startTime=<startTime>&e


ndTime=<endTime>
Description Playback stream using http protocol
Example:
http://192.168.1.108/cgi-bin/playBack.cgi?action=getStream&channel=1&subtype=0&startTime=2012-10-8%2013:00:01&end
17
Time=2012-10-8%2014:00:01
Response HTTP Code: 200 OK
Content-Type: Application/octet-stream
Body:
streamId=<streamId>\r\n
<data>
<data>

Comment Params in URL:


channelNo: video channel index.
typeNo: the stream type, default 0 if not specified.
0-Main Stream
1-Extra Stream 1
2-Extra Stream 2
starttime & endtime: video start time and end time. Time format: yyyy-mm-dd hh:mm:ss
Compared to 4.1.5 Playback using RTSP, it is another way of get playback stream. This is a way to use http
protocol to get playback stream. The data format is shown in appendix.

URL Syntax http://<ip>/cgi-bin/playBack.cgi?action=control&streamId=<streamId>&cmd=<cmd>&<paramName>=<paramValue>[&<para


mName>=<paramValue>...]
Description Control the playback stream
Example:
http://192.168.1.108/cgi-bin/playBack.cgi?action=control&streamId=0&cmd=play&speed=1&iframe=0
Response OK or Error
Comment Params in URL:
cmd=play
speed=<speed> optional, default speed=1, if speed > 0, play back forward, else if speed < 0, playback
backward(param iframe is ignored, only support iframe playback backward);
Iframe=<iframe> optional, default iframe=0, if iframe=1, playback I frame only;
seekTime=<seekTime> seek time, optional, default playback from the stream current point;

cmd=pause
pause the playback stream;

cmd=cancel
cancel the playback stream, and destroy the streamed;
This is the cgi to control playback stream, used to control the stream which built by “action=getStream”.

2.2 Audio

All the audio stream cgis

18
2.2.1 Audio MIME type

MIME Description
Audio/PCM
Audio/ADPCM
Audio/G.711A
Audio/G.711Mu
Audio/G.726
Audio/G.729
Audio/MPEG2
Audio/AMR
Audio/AAC

2.2.2 Get Audio Input Channel

URL Syntax http://<ip>/cgi-bin/devAudioInput.cgi?action=getCollect


Description Get Audio input channel number.
Response result=2
Comment Above response means there are 2 audio input channels.

2.2.3 Get Audio Output Channel

URL Syntax http://<ip>/cgi-bin/devAudioOutput.cgi?action=getCollect


Description Get Audio output channel number.
Response result=2
Comment Above response means there are 2 audio output channels.

2.2.4 Post Audio Stream

URL Syntax http://<ip>/cgi-bin/audio.cgi?action=postAudio&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Post audio
Example for single part
The URL of transmit a single part、channel 1 audio stream(encoded with G.711 A-law) is:
http: //192.168.1.108/cgi-bin/audio.cgi?action=postAudio&httptype=singlepart&channel=1

example:
POST /cgi-bin/audio.cgi?action=postAudio&httptype=singlepart&channel=1 HTTP/1.1
Content-Type: Audio/G.711A
Content-Length:9999999

19
<Audio data>
<Audio data>

Example for multipart


The URL of transmit a multipart、channel 1 audio stream(encoded with G.711 A-law) is:
http: //192.168.1.108/cgi-bin/audio.cgi?action=postAudio&httptype=multipart&channel=1

example:
POST /cgi-bin/audio.cgi?action=postAudio&httptype=multipart&channel=1 HTTP/1.1
Content-Type: multipart/x-mixed-replace; boundary=<boundary>
--<boundary>
Content-Type: Audio/G.711A
Content-Length: 800

<Audio data>
--<boundary>
Response OK or Error
Comment Params in URL:
The paramName and paramValue are in the below table.

ParamName ParamValue type Description


httptype string singlepart: HTTP content is a continuous flow of audio
packets
multipart: HTTP content type is
multipart/x-mixed-replace, and each audio packet
ends with a boundary string
channel integer The audio channel

2.2.5 Get Audio Stream

URL Syntax http://<ip>/cgi-bin/audio.cgi?action=getAudio&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Get audio
Example for single part
The URL of Request a single part、channel 1 audio stream(encoded with G.711 A-law) is:
http: //192.168.1.108/cgi-bin/audio.cgi?action=getAudio&httptype=singlepart&channel=1

If the request was successful, the server returns a continuous flow of audio packets. The content type is only set at the
beginning of the connection.
Return:
HTTP Code: 200 OK
Content-Type: Audio/G.711A
Body:
<Audio data>
<Audio data>

20
Example for multipart
The URL of Request a multipart、channel 1 audio stream(encoded with G.711 A-law) is:
http: //192.168.1.108/cgi-bin/audio.cgi?action=getAudio&httptype=multipart&channel=1

If the request was successful, the server returns a continuous flow of audio packets. The content type is
“multipart/x-mixed-replace” and each audio packet ends with a boundary string.
Return:
HTTP Code: 200 OK
Content-Type: multipart/x-mixed-replace; boundary=<boundary>
--<boundary>
Content-Type: Audio/G.711A
Content-Length: 800

<Audio data>
--<boundary>

Response OK or Error
Comment Params in URL:
The paramName and paramValue are in the below table.

ParamName ParamValue type Description


httptype string singlepart:HTTP content is a continuous flow of audio
packets
multipart: HTTP content type is
multipart/x-mixed-replace, and each audio packet
ends with a boundary string
channel integer The audio channel

2.3 Snapshot

2.3.1 GetSnapConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=Snap


Description Get Snap config
Response table. Snap[channel].TimeSection[weekday][0]=1 00:00:00-24:00:00
table. Snap[channel].TimeSection[weekday][1]=0 02:00:00-24:00:00
table. Snap[channel].TimeSection[weekday][2]=0 03:00:00-24:00:00
table. Snap[channel].TimeSection[weekday][3]=0 04:00:00-24:00:00

21
table. Snap[channel].TimeSection[weekday][4]=0 05:00:00-24:00:00
table. Snap[channel].TimeSection[weekday][5]=0 06:00:00-24:00:00
Comment Params in Resp:
Channel is video channel number, weekday range is [0-6] (Sunday - Saturday).

2.3.2 SetSnapConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set Snap config
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Snap[0].TimeSection[0][0]=1%2012:00:00-18:00:00
Response OK or Error
Comment Params in URL:
In below table,
ch = channel index
wd = week day index
ts = time section index

ParamName ParamValue type Description


Snap[ch].TimeSection[wd][ts] string wd (week day) range is [0-6] (Sunday- Saturday)
ts (time section) range is [0-23], it’s time section table index.

Format: mask hh:mm:ss-hh:mm:ss


Mask: [0-65535], hh: [0-24], mm: [0-59], ss: [0-59]

Mask indicates record type by bits:


Bit0: regular snapshot
Bit1: motion detection snapshot
Bit2: alarm snapshot
Bit3: card snapshot

2.3.3 Manual Snapshot

URL Syntax http://<ip>/cgi-bin/snapshot.cgi[?channel=<channelNo>]


Description Get a snapshot of a video channel.
Example:
To get a snapshot of video channel 1, the URL can be
http://192.168.1.108/cgi-bin/snapshot.cgi
or
http://192.168.1.108/cgi-bin/snapshot.cgi?channel=1
Response An image file of jpg format.
22
Comment Params in URL:
channelNo: integer, the video channel index which starts from 1, default 1 if not specified.

2.3.4 Event Snapshot

URL Syntax http://<ip>/cgi-bin/snapManager.cgi?action=attachFileProc&Flags[0]=Event[&channel=<channelNo>]&Events=[<eventCode>,


<eventCode>,…]
Description Subscribe pictures when that event of code eventCode happens.
Example:
http://192.168.1.108/cgi-bin/snapManager.cgi?action=attachFileProc&Flags[0]=Event&Events=[VideoMotion]
Response --<boundary>\r\n
Content-Type: text/plain\r\n
Content-Length: <data length>\r\n
Events[0].Code=TrafficJunction
Events[0].CountInGroup=1
Events[0].IndexInGroup=1
Events[0].Lane=1
Events[0].Data.PTS= 42949485818.0
Events[0].TrafficCar.PlateNumber=浙 A12345
Events[0].TrafficCar. DeviceAddress=杭州
……
Events[1].Code=TrafficJunction
……
--<boundary>
Content-Type: image/jpeg
Content-Length:<image size>
<JPEG image data>
--<boundary>
Comment Params in URL:
channelNo : integer, the video channel index which starts from 1.
eventCode can be any one of the standard codes defined in DHIIF.

eventCode includes:
VideoMotion: motion detection event
VideoLoss: video loss detection event
VideoBlind: video blind detection event.
AlarmLocal: alarm detection event.

23
3 VideoAttributes

3.1 VideoColor

3.1.1 GetVideoColorConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=VideoColor


Description Get Video Color config
Response head. Brightness=50
head. Contrast=50
head. Hue=50
head. Saturation=50
head. TimeSection=1 00:00:00-24:00:00
Comment Params in Resp:
head= table.VideoColor[ChannelNo][ColorConfigNo]
ChannelNo = video channel index,
colorConfigNo = color config index.
0 = Color Config 1
1 = Color Config 2

3.1.2 SetVideoColorConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set Video Color config
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoColor[1][0].Brightness=50
Response OK or Error
Comment Params in URL:
In below table, head=VideoColor[ChannelNo][ColorConfigNo]
ChannelNo = video channel index,
colorConfigNo = color config index,
0 = Color Config 1
1 = Color Config 2

ParamName ParamValue type Description


head. Brightness integer Brightness, range is [0-100]
head. Contrast integer Contrast, range is [0-100]
head. Hue integer Hue

24
head. Saturation integer Saturation
head. TimeSection string Effective time for this video color config.
Format is: mask starttime endtime
Mask range is {0, 1}.
Mask 0 – this video config is not effective
Mask 1 - this config is effective
Starttime/Endtime format like 11:00:00.

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

head.NightOptions.ExposureValue1 float
head.NightOptions.ExposureValue2 float
head.NightOptions.Gain integer
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

3.2 VideoEncode

3.2.1 GetVideoConfigCaps

URL Syntax http://<ip>/cgi-bin/encode.cgi?action=getConfigCaps&channel=<channelNo>


Description Get video capabilities config.
Example:
http://192.168.1.108/cgi-bin/encode.cgi?action=getConfigCaps&channel=1
Response headMain.Video.BitRateOptions=448,2560
headMain.Video.CompressionTypes=H.264,MJPG
headMain.Video.FPSMax=25
headMain.Video.ResolutionTypes=2048 x 1536,1080,SXGA, 1280 x 960,720,D1,CIF
headExtra.Video.BitRateOptions=80,448
headExtra.Video.CompressionTypes=H.264,MJPG
headExtra.Video.FPSMax=25
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 Params in URL:
channelNo: video channel index

25
Params in Resp:
headMain= caps[Channel].MainFormat[RecordType]
headExtra = caps[Channel].ExtraFormat[ExtraStream]
headSnap = caps[Channel].SnapFormat[SnapType]

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

Field in response Value range Description


BitRateOptions string Before comma is minimum bit rate. (kbps), after comma is maximum bit rate.(kbps)
BitRateOptions=80,448
80 is the minimum bitrate, 448 is maximum.
CompressionTypes It contains all supported video compression types separated by comma.
string
Range is {MPEG4, MPEG2, MPEG1, MJPG, H.263, H.264}
FPSMax integer Maximum FPS.
ResolutionTypes It contains all supported video resolutions.
string
Range is in Resolution.

3.2.2 Resolution(翻译成英文)

Fixed Resolution Name Size in PAL Size in NTSC


"D1" 704 x 576 704 x 480
"HD1" 352 x 576 352 x 480
"BCIF"/"2CIF" 704 x 288 704 x 240
"CIF" 352 x 288 352 x 240
"QCIF" 176 x 144 176 x 120
"NHD" 640 x 360
"VGA" 640 x 480

26
"QVGA" 320 x 240
"SVCD" 480 x 480
"QQVGA" 160 x 128
"SVGA" 800 x 592
"SVGA1" 800 x 600
"WVGA" 800 x 480
"FWVGA" 854 x 480
"DVGA" 960 x 640
"XVGA" 1024 x 768
"WXGA" 1280 x 800
"WXGA2" 1280 x 768
"WXGA3" 1280 x 854
"WXGA4" 1366 x 768
"SXGA" 1280 x 1024
"SXGA+" 1400 x 1050
"WSXGA" 1600 x 1024
"UXGA" 1600 x 1200
"WUXGA" 1920 x 1200
"ND1" 240 x 192
"720P" 1280 x 720
"1080P" 1920 x 1080
"QFHD" 3840 x 2160
"1_3M", "1280x960" 1280 x 960 (1.3 Mega Pixels)
"2_5M", "1872x1408" 1872 x 1408 (2.5 Mega Pixels)
"5M", "3744x1408" 3744 x 1408 (5 Mega Pixels)
"3M", "2048x1536" 2048 x 1536 (3 Mega Pixels)
"5_0M", "2432x2048" 2432 x 2048 (5 Mega Pixels)
"1_2M", "1216x1024" 1216 x 1024 (1.2 Mega Pixels)
"1408x1024" 1408 x 1024 (1.5 Mega Pixels)
"3296x2472" 3296 x 2472 (8 Mega Pixels)
"5_1M", "2560x1920" 2560 x 1920 (5 Mega Pixels)
"960H", 960 x 576 960 x 480
"DV720P" 960 x 720
"2560x1600" 2560 x 1600 (4 Mega Pixels)
"2336x1752" 2336 x 1752 (4 Mega Pixels)
"2592x2048" 2592 x 2048
"2448x2048" 2448 x 2048
"1920x1440" 1920x1440
"2752x2208" 2752x2208
"3840x2160" 3840x2160
"4096x2160" 4096x2160
"3072x2048" 3072x2048

27
3.2.3 GetVideoEncodeConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=Encode


Description Get video encode config.
Response headMain.Video.BitRate=8192
headMain.Video.BitRateControl=CBR
headMain.Video.Compression=H.264
headMain.Video.FPS=25
headMain.Video.GOP=50
headMain.Video.Height=1200
headMain.Video.Profile=Main
headMain.Video.Quality=4
headMain.Video.Width=1600
headMain.VideoEnable=true
headExtra.Video.BitRate=8192
headExtra.Video.BitRateControl=CBR
headExtra.Video.Compression=H.264
headExtra.Video.FPS=25
headExtra.Video.GOP=50
headExtra.Video.Height=1200
headExtra.Video.Profile=Main
headExtra.Video.Quality=4
headExtra.Video.Width=1600
headExtra.VideoEnable=true
Comment Params in Resp:
headMain= table. Encode[Channel].MainFormat[RecordType]
headExtra =table. Encode[Channel].ExtraFormat[ExtraStream]

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

3.2.4 SetVideoEncodeConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


28
Description Set video encode config.
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Encode[1].MainFormat[0].Video.Compression=MPEG4
Response OK or Error
Comment Params in URL:
In below table,
head=Encode[Channel].MainFormat[RecordType] (or)
Encode[Channel].ExtraFormat[ExtraStream]

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

ParamName ParamValue type Description


head.Video.BitRate integer Unit is Kbps
Range depends on capability in GetVideoConfigCaps
head.Video.BitRateControl string Range is {CBR,VBR}
CBR: constant bitrate
VBR: variable bitrate
head.Video.Compression String Range is {MPEG4,MPEG2, MPEG1,MJPG,H.263,H.264}
Depends on capacity in 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

29
3.2.5 GetCaps

URL Syntax http://<ip>/cgi-bin/encode.cgi?action=getCaps


Description Get video capabilities.
Response caps.PlaybackCompressSplitNumList[0]=1
caps.PlaybackCompressSplitNumList[1]=2
caps.PlaybackCompressSplitNumList[2]=4
caps.PreviewMode=SplitSnap
caps.VideoEncodeDevices[0].CoverAreaPercent=100
caps.VideoEncodeDevices[0].CoverCount=4
caps.VideoEncodeDevices[0].LadenBitrate=162201600
caps.VideoEncodeDevices[0].MaxCIFPFrameSize=40
caps.VideoEncodeDevices[0].MaxExtraStream=1
caps.VideoEncodeDevices[0].MinCIFPFrameSize=7
caps.VideoEncodeDevices[0].RecordIndividualResolution=true
caps.VideoEncodeDevices[0].SupportIndividualResolution=true
caps.VideoEncodeDevices[0].TitleCount=4

Comment

3.3 AudioEncode

3.3.1 GetAudioConfigCaps

URL Syntax http://<ip>/cgi-bin/encode.cgi?action=getConfigCaps&channel=<channelNo>


Description Get audio capabilities config.
Example:
http://192.168.1.108/cgi-bin/encode.cgi?action=getConfigCaps&channel=1
Response headMain.Audio.CompressionTypes=PCM,G.711A,G.711Mu
headExtra.Audio.CompressionTypes=PCM,G.711A,G.711Mu
headSnap.Audio.CompressionTypes=PCM,G.711A,G.711Mu
Comment Params in URL:
channelNo: video channel index
Params in Resp:
headMain= caps[Channel].MainFormat[RecordType]
headExtra = caps[Channel].ExtraFormat[ExtraStream]
headSnap = caps[Channel].SnapFormat[SnapType]

Channel: video channel index


RecordType:
0 = regular record
1 = motion detection record
2 = alarm record
30
ExtraStream:
0 = extra stream 1
1 = extra stream 2
2 = extra stream 3
SnapType:
0 = regular snapshot
1 = motion detection snapshot
2 = alarm snapshot

Field in response Value range Description


CompressionTypes It contains all supported audio compression types, separated by comma.
string
Range is {PCM, ADPCM, G.711A, G.711Mu, G.726, G.729, MPEG2, AMR}

3.3.2 GetAudioEncodeConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=Encode


Description Get audio encode config.
Response headMain.Audio.Bitrate=64
headMain.Audio.Compression=G.711A
headMain.Audio.Depth=16
headMain.Audio.Frequency=44000
headMain.Audio.Mode=0
headMain.AudioEnable=false
headExtra.Audio.Bitrate=64
headExtra.Audio.Compression=G.711A
headExtra.Audio.Depth=16
headExtra.Audio.Frequency=44000
headExtra.Audio.Mode=0
headExtra.AudioEnable=false
Comment Params in Resp:
headMain= table. Encode[Channel].MainFormat[RecordType]
headExtra =table. Encode[Channel].ExtraFormat[ExtraStream]

Channel: video channel index


RecordType:
0 = regular record
1 = motion detection record
2 = alarm record
ExtraStream:
0 = extra stream 1
1 = extra stream 2

31
2 = extra stream 3

3.3.3 SetAudioEncodeConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set audio encode config.
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Encode[1].MainFormat[0].Audio.Bitrate=128
Response OK or Error
Comment Params in URL:
In below table,
head=Encode[Channel].MainFormat[RecordType] (or)
Encode[Channel].ExtraFormat[ExtraStream]

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

ParamName ParamValue type Description


head.Audio.Bitrate integer Unit is kbps
Range depends on capacity in GetAudioConfigCaps
head.Audio.Compression string Range depends on capacity in GetAudioConfigCaps
head.Audio.Depth integer Audio sampling depth
head.Audio.Frequency integer Audio sampling frequency
head.Audio.Mode integer Range is {0,1,2,3,4,5,6,7}
Audio encode mode.
0: 4.75kbps,
1: 5.15 kbps,
2: 5.9 kbps,
3: 6.7 kbps,
4: 7.4 kbps,
5: 7.95 kbps,
6: 10.2 kbps,
7: 12.2 kbps,
head.AudioEnable bool Enable/Disable audio

32
3.4 SnapEncode

3.4.1 GetSnapConfigCaps

URL Syntax http://<ip>/cgi-bin/encode.cgi?action=getConfigCaps&channel=<channelNo>


Description Get snap capabilities config.
Example:
http://192.168.1.108/cgi-bin/encode.cgi?action=getConfigCaps&channel=1
Response caps[Channel].SnapFormat[SnapType].Video.CompressionTypes=H.264,MJPG
caps[Channel].SnapFormat[SnapType].Video.ResolutionTypes=3M,1080,SXGA,1_3M,720,D1,CIF
Comment Params in URL:
channelNo: video channel index
Params in Resp:
Channel: video channel index
SnapType:
0 = regular snapshot
1 = motion detection snapshot
2 = alarm snapshot

Field in response Value range Description


CompressionTypes It contains all supported video compression types separated by comma.
string
Range is {MPEG4, MPEG2, MPEG1, MJPG, H.263, H.264}
ResolutionTypes It contains all supported video resolutions, separated by comma.
string Range is {D1, HD1, BCIF, CIF, QCIF, VGA, QVGA, SVGA, XVGA, WXGA, SXGA, WSXGA, UXGA,
WUXGA, ND1,720, 1080, 1_3M, 2_5M, 3M, 5M}.

3.4.2 GetSnapEncodeConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=Encode[Channel].SnapFormat


Description Get snap encode config
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Encode[1].SnapFormat
Response headSnap.Video.BitRate=384
headSnap.Video.BitRateControl=VBR
headSnap.Video.Compression=H.264
headSnap.Video.FPS=1
headSnap.Video.GOP=50
33
headSnap.Video.Height=576
headSnap.Video.Quality=4
headSnap.Video.Width=704
headSnap.VideoEnable=true
Comment Params in URL:
Channel: video channel index
Params in Resp:
headSnap = table. Encode[Channel].SnapFormat[SnapType]

Channel: video channel index


SnapType:
0 = regular snapshot
1 = motion detection snapshot
2 = alarm snapshot

3.4.3 SetSnapEncodeConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set snap encode config
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Encode[1].SnapFormat[0].Video.Compression=MPEG4
Response OK or Error
Comment Params in URL:
In below table,
head= Encode[Channel].SnapFormat[SnapType]

Channel: video channel index


SnapType:
0 = regular snapshot
1 = motion detection snapshot
2 = alarm snapshot

ParamName ParamValue type Description


head.Video.BitRate integer Unit is Kbps
Range depends on capability in GetVideoConfigCaps
head.Video.BitRateControl string Range is {CBR,VBR}
CBR: constant bitrates
VBR: variable bitrate
head.Video.Compression String Range is {MPEG4,MPEG2, MPEG1,MJPG,H.263,H.264}
Depends on capacity in GetVideoConfigCaps
head.Video.FPS float Range is [0.2-30].

34
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

3.5 ChannelTitle

3.5.1 GetChannelTitleConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=ChannelTitle


Description Get the title of the channel.
Response table.ChannelTitle[Channel].Name=CAM1
Comment Params in Resp:
Channel = video channel index

3.5.2 SetChannelTitleConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>


Description Set the title of the channel.
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&ChannelTitle[1].Name=test
Response OK or Error
Comment If VideoWidget[Channel].ChannelTitle.EncodeBlend is true, this title is blended to the video frames.
Please refer to SetVideoWidgetConfig.

Params in URL:
In below table,
Channel : video channel index

ParamName ParamValue type Description


ChannelTitle[Channel].Name String Channel Name

35
3.6 ChannelNumber

3.6.1 Get Video Input Channels

URL Syntax http://<ip>/cgi-bin/devVideoInput.cgi?action=getCollect


Description Get video input channels
Response result=1
Comment

3.7 VideoStandard

3.7.1 GetVideoStandardConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=VideoStandard


Description Get Video Standard config
Response table.VideoStandard=PAL
Comment

3.7.2 SetVideoStandardConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>


Description Set Video Standard config
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoStandard=PAL
Response OK or Error
Comment

ParamName ParamValue type Description


VideoStandard string Range is {PAL,NTSC}
Video Standard

3.8 VideoWidget

3.8.1 GetVideoWidgetConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=VideoWidget


Description Video Widget config contains Channel Title, Covers and Time Title parameters, defines the background color, front color

36
and positions of channel title and time title, and defines the regions which are not visible (cover).
Response head.BackColor[0]=0
head.BackColor[1]=0
head.BackColor[2]=0
head.BackColor[3]=128
head.EncodeBlend=true
head.FrontColor[0]=255
head.FrontColor[1]=255
head.FrontColor[2]=255
head.FrontColor[3]=0
head.Rect[0]=0
head.Rect[1]=8191
head.Rect[2]=0
head.Rect[3]=8191


Comment Params in Resp:
head=table.VideoWidget[Channel].ChannelTitle (or)
table.VideoWidget[Channel].Covers[CoReg] (or)
table.VideoWidget[Channel].TimeTitle

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

3.8.2 SetVideoWidgetConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set Video Widget config
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoWidget[1].Covers[0].BackColor[0]=128&
VideoWidget[1].Covers[0].BackColor[1]=128&VideoWidget[1].Covers[0].BackColor[2]=128&
VideoWidget[1].Covers[0].BackColor[3]=0
Response OK or Error
Comment Params in URL:
In below table,
headChannelTitle = VideoWidget[Channel].ChannelTitle
headCover = VideoWidget[Channel].Covers[CoReg]

37
headTimeTitle = VideoWidget[Channel].TimeTitle

Channel: video channel index


CoReg :Cover region index
Covers is an array which contains multiple cover regions
0 = region 1
1 = region 2
2 = region 3
3 = region 4

ParamName ParamValue type Description


headCover.BackColor[0] integer Range is [0-255].
headCover.BackColor[1] BackColor[0]:red value
headCover.BackColor[2] BackColor[1]:green value
headCover.BackColor[3] BackColor[2]:blue value
BackColor[3]: alpha value
headCover.EncodeBlend bool false - widget blend is disabled.
headCover.FrontColor[0] integer Range is [0-255].
headCover.FrontColor[1] FrontColor[0]:red value
headCover.FrontColor[2] FrontColor[1]:green value
headCover.FrontColor[3] FrontColor[2]:blue value
FrontColor[3]: alpha value
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

38
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.

3.9 VideoInOptions

3.9.1 GetVideoInputCaps

URL Syntax http://<ip>/cgi-bin/devVideoInput.cgi?action=getCaps&channel=<channelNo>


Description Get video input capabilities.
Example:
http://192.168.1.108/cgi-bin/devVideoInput.cgi?action=getCaps&channel=1
Response caps. AutoSyncPhase=false
caps. Backlight=2
caps. BrightnessCompensation=true
caps. ChipID=0
caps. CoverCount=4
caps. CoverType=1
caps. CustomManualExposure=true
caps. DayNightColor=true
caps. DayNightColorIO=0
caps. DoubleExposure=0
caps. DownScaling=false
caps. EEModeRange=100
caps. ElectricFocus=false
caps. Exposure=16
caps. ExposureMode=31
caps. ExternalSyncInput=0
caps. FishEye=false
caps. FlashAdjust=false
caps. Flip=true
caps. FormatCount=5
caps. Gain=true
caps. GainAuto=true
caps. Gamma=true
caps. GammaModeRange=100
caps. GlareInhibition=1
39
caps. HorizontalBinning=0
caps. IRCUT=true
caps. ImageEnhancement.LevelRange[0]=0
caps. ImageEnhancement.LevelRange[1]=100
caps. ImageEnhancement.Support=true
caps. InfraRed=true
caps. Iris=true
caps. IrisAuto=true
caps. LadenBitrate=972000
caps. LimitedAutoExposure=true
caps. MaxExposureTime=300
caps. MaxExposureTime1=0
caps. MaxHeight=1080
caps. MaxMultiProfile=3
caps. MaxWidth=1920
caps. MeteringRegionCount=0
caps. MinExposureTime=1
caps. MinExposureTime1=0
caps. Mirror=true
caps. MultiOptions=false
caps. NightOptions=true
caps. ReferenceLevel=false
caps. Rotate90=true
caps. SetColor=true
caps. SignalFormats=Inside
caps. SignalType[0]=VGA
caps. SnapshotExposure=false
caps. SupportProfile=false
caps. SupportWhiteLevel=true
caps. SupportWriteLevel=false
caps. SyncChipChannels=false
caps. SyncFocus=0
caps. TitleCount=4
caps. TridimDenoise=2
caps. TridimDenoiseDetails=0
caps. UTC=0
caps. UpScaling=false
caps. Version=0
caps. VerticalBinning=0
caps. VideoInDenoise.2D.LevelRange[0]=0
caps. VideoInDenoise.2D.LevelRange[1]=100
caps. VideoInDenoise.2D.Support=true
caps. VideoInDenoise.3D.3DAutoType.ModRange[0]=0
caps. VideoInDenoise.3D.3DAutoType.ModRange[1]=100
caps. VideoInDenoise.3D.Support=true

40
caps. VideoInDenoise.Support=true
caps. WhiteBalance=3
caps. WideDynamicRange=1
Comment Params in URL:
channelNo: video channel index
Params in Resp:
see below table

Field in response Value type Description


Backlight bool True: support backlight
ChipID String ID of chips in this channel
CoverCount integer The maximum cover region count.
CoverType integer 0: don’t support cover
1: support realtime cover
2: support non-realtime cover
CustomManualExposure bool, true: support use defined manual exposure time
DayNightColor bool true: support color alternate between day and night.
DownScaling bool true: support down scaling, binning mode not included.
Exposure integer Exposure grade. 0 – don’t support exposure control.
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.

41
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}

Inside – inside input.


1_3M - 1280*960
SyncChipChannels bool True: channels in same chip should be synchronized. Synchronized means video resolution
of these channels should be the same.
TitleCount integer Maximum count of blending titles.
UpScaling bool true: support up scaling.
WhiteBalance integer Range is {0, 1, 2, 3}
0 – don’t support white balance.
1 – support auto white balance
2 - support auto and pre defined white balance.
3 - support auto, pre defined and user defined white balance

3.9.2 GetVideoInOptionsConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=VideoInOptions


Description Get Video In Options config, including Backlight, ExposureSpeed, DayNightColor, DayOptions, NightOptions, NormalOptions
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.AntiFlicker=0
head. NightOptions.Backlight=0
head. NightOptions.BacklightRegion[0]=3096
head. NightOptions.BacklightRegion[1]=3096
head. NightOptions.BacklightRegion[2]=5096
head. NightOptions.BacklightRegion[3]=5096

42
head. NightOptions.BrightnessThreshold=50
head. NightOptions.DayNightColor=2
head. NightOptions.ExposureMode=0
head. NightOptions.ExposureSpeed=0
head. NightOptions.ExposureValue1=0
head. NightOptions.ExposureValue2=40
head. NightOptions.ExternalSyncPhase=125
head. NightOptions.Flip=false
head. NightOptions.Gain=50
head. NightOptions.GainAuto=true
head. NightOptions.GainBlue=50
head. NightOptions.GainGreen=50
head. NightOptions.GainMax=50
head. NightOptions.GainMin=0
head. NightOptions.GainRed=50
head. NightOptions.GlareInhibition=0
head. NightOptions.IrisAuto=true
head. NightOptions.Mirror=false
head. NightOptions.Profile=3
head. NightOptions.ReferenceLevel=50
head. NightOptions.Rotate90=0
head. NightOptions.SunriseHour=0
head. NightOptions.SunriseMinute=0
head. NightOptions.SunriseSecond=0
head. NightOptions.SunsetHour=23
head. NightOptions.SunsetMinute=59
head. NightOptions.SunsetSecond=59
head. NightOptions.SwitchMode=4
head. NightOptions.WhiteBalance=Auto
head. NightOptions.WideDynamicRange=0
head. NightOptions.WideDynamicRangeMode=0
head. NormalOptions.AntiFlicker=0
head. NormalOptions.Backlight=0
head. NormalOptions.BacklightRegion[0]=3096
head. NormalOptions.BacklightRegion[1]=3096
head. NormalOptions.BacklightRegion[2]=5096
head. NormalOptions.BacklightRegion[3]=5096
head. NormalOptions.BrightnessThreshold=50
head. NormalOptions.DayNightColor=1
head. NormalOptions.ExposureMode=0
head. NormalOptions.ExposureSpeed=0
head. NormalOptions.ExposureValue1=0
head. NormalOptions.ExposureValue2=40
head. NormalOptions.ExternalSyncPhase=125
head. NormalOptions.Flip=false

43
head. NormalOptions.Gain=50
head. NormalOptions.GainAuto=true
head. NormalOptions.GainBlue=50
head. NormalOptions.GainGreen=50
head. NormalOptions.GainMax=50
head. NormalOptions.GainMin=0
head. NormalOptions.GainRed=50
head. NormalOptions.GlareInhibition=0
head. NormalOptions.IrisAuto=true
head. NormalOptions.Mirror=false
head. NormalOptions.Profile=0
head. NormalOptions.ReferenceLevel=50
head. NormalOptions.Rotate90=0
head. NormalOptions.SunriseHour=0
head. NormalOptions.SunriseMinute=0
head. NormalOptions.SunriseSecond=0
head. NormalOptions.SunsetHour=23
head. NormalOptions.SunsetMinute=59
head. NormalOptions.SunsetSecond=59
head. NormalOptions.SwitchMode=0
head. ReferenceLevel=50
head. ReferenceLevelEnable=false
head. Rotate90=0
head. SignalFormat=BT656
head. WhiteBalance=Disable
Comment Params in Resp:
head = table.VideoInOptions[ChannelNo]
ChannelNo = video channel index.

3.9.3 SetVideoInOptionsConfig

URL http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]
Synt
ax
Desc Set Video In Options config, including Backlight, ExposureSpeed, DayNightColor, DayOptions, NightOptions, NormalOptions and so on
ripti For example:
on Auto Exposure:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[0].ExposureMode=0&VideoInOptions[0].Exposure
Speed=0
Low Noise:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[0].ExposureMode=1&VideoInOptions[0].Exposure
Speed=0&VideoInOptions[0].GainMin=0&VideoInOptions[0].GainMax=60
Low Motion Blur:

44
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[0].ExposureMode=2&VideoInOptions[0].Exposure
Speed=0&VideoInOptions[0].GainMin=0&VideoInOptions[0].GainMax=50&VideoInOptions[0].ExposureValue1=0&VideoInOptions[0].E
xposureValue2=20
Manual:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[0].ExposureMode=4&VideoInOptions[0].Exposure
Speed=32&VideoInOptions[0].GainMin=0&VideoInOptions[0].GainMax=50&VideoInOptions[0].ExposureValue1=40&
VideoInOptions[0].ExposureValue2=40
Resp OK or Error
onse
Com Params in URL:
ment In below table, head =VideoInOptions[ChannelNo]
ChannelNo = video channel index.

ParamName ParamValue Description


type
head. Backlight integer Range is [0-n]
n depends on capability in GetVideoInputCaps
0 – backlight closed.
1 – backlight grade 1

n – backlight grade n
head. DayNightColor integer Range is {0,1,2}
0: always multicolor
1: autoswitch along with brightness,
2: always monochrome
head. ExposureMode integer Range is {0,1,2, 4}
0: AutoExposure
1: Gain first
2: Exposure first
4:Manual.
head. ExposureSpeed integer Range is [0-n+1]
n depends on capability in GetVideoInputCaps
0: AutoExposure
1-n-1: manual Exposure grade
n: AutoExposure with time limit.
n+1:manualExposure with user-defined time
(n is supported maximum exposure grade )
head. ExposureValue1 float Range is [0.1-80], unit is millisecond
If ExposureSpeed is 0(AutoExposure enable), it’s lower limit of AutoExposure
time, otherwise it’s time of manualExposure
head. ExposureValue2 float Range is [0.1-80], unit is millisecond
Upper limit of AutoExposure time, should be bigger than ExposureValue1
head. ExternalSync integer Range is {0,1}
External Synchronous
0: Internal Synchronization

45
1: External Synchronous
head. ExternalSyncPhase integer Range is [0°-360°]
External Synchronous Signal Phase
head. FlashControl.Mode integer Range is {0,1,2}
0:forbid flash
1:always flash
2:auto flash
head. FlashControl.Pole integer Range is {0,1, 2, 3}
Trigger mode:
0:low level
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.

46
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. AntiFlicker integer Range is {0,1,2}
AntiFlicker mode:
0: Outdoor
1: 50 Hz AntiFlicker
2: 60 Hz AntiFlicker
head. GlareInhibition integer Range is [0-100]
GlareInhibition:
0: Close GlareInhibition.
head. NightOptions.BrightnessThreshold integer NightOptions contain a set of parameters used when brightness is not enough.
Range is [0-100]
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,always use day options;
1: Switch depends on brightness;
2: Switch depends on time, switch to NightOptions when time is after sunset
time and before sunrise.
3: NoSwitch,always use NightOptions;
4:No switch,always use NormalOptions.
head. NightOptions.Profile integer Range is {0,1,2,3}
0: use temporary day options;
1: use temporary NightOptions;
2: use temporary NormalOptions;
3:depends on head.NightOptions.SwitchMode.
head. NightOptions.ExposureSpeed integer Range is the same as relevant items of day options in this table.
head. NightOptions.ExposureValue1 float Example:
head. NightOptions.ExposureValue2 float Value range of head.NightOptions.ExposureSpeed is the same with

47
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
head. NightOptions.AntiFlicker integer
head. NightOptions.Backlight integer
head. NightOptions.DayNightColor integer
head. NightOptions.ExposureMode integer
head. NightOptions.GlareInhibition integer
head. NightOptions.Mirror integer
head. NightOptions.Flip integer
head. NightOptions.Rotate90 integer
head. integer NomalOptions contain a set of parameters similar with NightOptions.
NomalOptions.BrightnessThreshold Range is the same as relevant items of NightOptions in this table.
head. NormalOptions.IrisAuto bool
head. NormalOptions.SunriseHour integer
head. NormalOptions.SunriseMinute integer
head. NormalOptions.SunriseSecond integer
head. NormalOptions.SunsetHour integer
head. NormalOptions.SunsetMinute integer
head. NormalOptions.SunsetSecond integer
head. NormalOptions.ExposureSpeed integer
head. NormalOptions.ExposureValue1 float
head. NormalOptions.ExposureValue2 float
head. NormalOptions.Gain integer
head. NormalOptions.GainAuto bool
head. NormalOptions.GainBlue integer
head. NormalOptions.GainGreen integer
head. NormalOptions.GainRed integer
head. NormalOptions.WhiteBalance String
head. NormalOptions.ReferenceLevel integer
head. NormalOptions.ExternalSyncPhase integer
head. NormalOptions.AntiFlicker integer
head. NormalOptions.Backlight integer
head. NormalOptions.DayNightColor integer
head. NormalOptions.ExposureMode integer
head. NormalOptions.GlareInhibition integer
head. NormalOptions.Mirror integer
head. NormalOptions.Flip integer
head. NormalOptions.Rotate90 integer

48
3.10 VideoInWhiteBalance

3.10.1 SetVideoInWhiteBalance

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set Video Input White Balance.
For example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[0][0].ColorTemperatureLevel=50
Response OK or Error
Comment Params in URL:
paramName and paramValue are as below table.
In below table,
head =VideoInOptions[ChannelNo][ConfigNo]
ChannelNo: integer, array index which equals to video channel index -1, starts from 0.
ConfigNo: array index, can be 0,1 or 2, which means normal, day and night.

ParamName ParamValue Description


type
head. Mode integer “Auto”, “Indoor", "Outdoor", "ATW", "Manual", "AutoOutdoor"
head. GainRed integer Range is 0-100

head. GainBlue integer Range is 0-100

3.10.2 SetVideoInWhiteBalance

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set Video Input White Balance.
For example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[0][0].ColorTemperatureLevel=50
Response OK or Error
Comment Params in URL:
paramName and paramValue are as below table.
In below table,
head =VideoInOptions[ChannelNo][ConfigNo]
ChannelNo: integer, array index which equals to video channel index -1, starts from 0.
ConfigNo: array index, can be 0, 1 or 2, which means normal, day and night.

ParamName ParamValue Description


type
head. Mode integer “Auto”, “Indoor", "Outdoor", "ATW", "Manual", "AutoOutdoor"
49
head. GainRed integer Range is 0-100
head. GainBlue integer Range is 0-100

3.11 VideoInFocus

3.11.1 GetVideoInFocus

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=VideoInFocus


Description Get Video Input focus config.
Response table.VideoInFocus[0][0].FocusLimit=100
table.VideoInFocus[0][0].FocusLimitSelectMode=Manual
table.VideoInFocus[0][0].IRCorrection=0
table.VideoInFocus[0][0].Mode=3
table.VideoInFocus[0][0].Sensitivity=1
table.VideoInFocus[0][1].FocusLimit=100
table.VideoInFocus[0][1].FocusLimitSelectMode=Manual
table.VideoInFocus[0][1].IRCorrection=0
table.VideoInFocus[0][1].Mode=3
table.VideoInFocus[0][1].Sensitivity=1
table.VideoInFocus[0][2].FocusLimit=100
table.VideoInFocus[0][2].FocusLimitSelectMode=Manual
table.VideoInFocus[0][2].IRCorrection=0
table.VideoInFocus[0][2].Mode=3
table.VideoInFocus[0][2].Sensitivity=1

Comment

3.11.2 SetVideoInFocus

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set Video Input focus config.
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInFocus[0][0].FocusLimit
Response OK or Error
Comment Params in URL:
paramName and paramValue are as below table.
In below table,
head = VideoInFocus [ChannelNo] [ConfigNo]
ChannelNo: array index, equals to video channel index -1, start from 0.
ConfigNo: array index, can be 0,1 or 2, which means normal, day and night.

50
ParamName ParamValue Description
type
head. Mode integer 2-Auto focus, 3-Half auto focus, 4-Manual focus
head. FocusLimit integer 100、1000、2000、3000、5000、
head. Sensitivity integer Range is 0,1,2
0-high,1-default,2-low
head. IRCorrection integer 0: No correction; 1: Correction; 2: Auto correction
head. FocusLimitSelectMode Manual or Auto

3.12 VideoInZoom

3.12.1 GetVideoInZoom

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=VideoInZoom


Description Get video input zoom config.
Response table.VideoInZoom[0][0].DigitalZoom=true
table.VideoInZoom[0][0].Speed=7
table.VideoInZoom[0][0].ZoomLimit=4
table.VideoInZoom[0][1].DigitalZoom=true
table.VideoInZoom[0][1].Speed=0
table.VideoInZoom[0][1].ZoomLimit=4
table.VideoInZoom[0][2].DigitalZoom=false
table.VideoInZoom[0][2].Speed=7
table.VideoInZoom[0][2].ZoomLimit=4
Comment

3.12.2 SetVideoInZoom

URL http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]
Syntax
Descriptio Set video input zoom config.
n Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInZoom[0][0].DigitalZoom=false&VideoInZoom[0][0].Sp
eed=8
Response OK or Error
Comment Params in URL:
head = VideoInZoom [ChannelNo] [ConfigNo]
ChannelNo: integer, array index which equals to video channel index -1, starts from 0.
ConfigNo: array index, can be 0,1 or 2, which means normal, day and night.

ParamName ParamValue Description


51
type
head. DigitalZoom integer true: Enable Digital Zoom
false: Disable Digital Zoom

head. Speed integer Range is 0-7

3.13 VideoInSharpness

3.13.1 GetVideoInSharpness

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=VideoInSharpness


Description Get Video Input Sharpness settings.
Response table.VideoInSharpness[0][0].Level=4
table.VideoInSharpness[0][0].Mode=1
table.VideoInSharpness[0][0].Sharpness=8
table.VideoInSharpness[0][1].Level=4
table.VideoInSharpness[0][1].Mode=1
table.VideoInSharpness[0][1].Sharpness=8
table.VideoInSharpness[0][2].Level=4
table.VideoInSharpness[0][2].Mode=1
table.VideoInSharpness[0][2].Sharpness=8
Comment

3.13.2 SetVideoInSharpness

URL http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]
Syntax
Descript Set Video Input Sharpness settings.
ion Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInSharpness[0][0].Level=10&VideoInSharpness[0][0].Mod
e=1&VideoInSharpness[0][0].Sharpness=0
Respons OK or Error
e
Comme Params in URL:
nt paramName and paramValue are as below table.
In below table,
head = VideoInSharpness [ChannelNo] [ConfigNo]
ChannelNo: integer, array index which equals to video channel index -1, starts from 0.
ConfigNo: array index, can be 0,1 or 2, which means normal, day and night.

ParamName ParamValue Description


52
type
head. Sharpness integer Range is 0-15

head. Level integer Range is 0-15

3.14 VideoInRotate

3.14.1 GetVideoInRotate

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=VideoInRotate


Description Get Video Input Rotate settings.
Response table.VideoInRotate[0][0].Flip=false
table.VideoInRotate[0][0].Freeze=false
table.VideoInRotate[0][0].Mirror=false
table.VideoInRotate[0][0].Rotate90=0
table.VideoInRotate[0][0].Stable=false
table.VideoInRotate[0][1].Flip=false
table.VideoInRotate[0][1].Freeze=false
table.VideoInRotate[0][1].Mirror=false
table.VideoInRotate[0][1].Rotate90=0
table.VideoInRotate[0][1].Stable=false
table.VideoInRotate[0][2].Flip=false
table.VideoInRotate[0][2].Freeze=false
table.VideoInRotate[0][2].Mirror=false
table.VideoInRotate[0][2].Rotate90=0
table.VideoInRotate[0][2].Stable=false

Comment

3.14.2 SetVideoInRotate

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Descriptio Set Video Input Rotate settings.
n Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInRotate[0][0].Flip=true&VideoInRotate[0][0].Freeze=f
alse
Response OK or Error
Comment Params in URL:
paramName and paramValue are as below table.
In below table,
53
head = VideoInRotate [ChannelNo] [ConfigNo]
ChannelNo: integer, array index which equals to video channel index -1, starts from 0.
ConfigNo: array index, can be 0,1 or 2, which means normal, day and night.

ParamName ParamValue Description


type
head. Flip string true: Enable flip function
false: Disable flip function

3.15 VideoInMode

3.15.1 GetVideoInMode

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=VideoInMode


Description Get Video Input Mode settings.
Response table.VideoInMode[0].Config[0]=1
table.VideoInMode[0].Mode=0
table.VideoInMode[0].TimeSection[0][0]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[0][1]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[0][2]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[0][3]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[0][4]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[0][5]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[1][0]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[1][1]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[1][2]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[1][3]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[1][4]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[1][5]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[2][0]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[2][1]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[2][2]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[2][3]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[2][4]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[2][5]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[3][0]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[3][1]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[3][2]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[3][3]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[3][4]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[3][5]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[4][0]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[4][1]=0 00:00:00-23:59:59
54
table.VideoInMode[0].TimeSection[4][2]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[4][3]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[4][4]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[4][5]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[5][0]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[5][1]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[5][2]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[5][3]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[5][4]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[5][5]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[6][0]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[6][1]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[6][2]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[6][3]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[6][4]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[6][5]=0 00:00:00-23:59:59

Comment

3.15.2 SetVideoInMode

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set Video Input Mode settings.
Example:
Response OK or Error
Comment Params in URL:
paramName and paramValue are as below table.
In below table,
head = VideoInMode [ChannelNo]
ChannelNo : integer, the array index which equals to video channel index -1, starts from 0.

ParamName ParamValue Description


type
head. Mode integer Range is {0,1}
0: No Switch;
1: Switch depends on head.TimeSection.
head. Config integer Mode=0 Config[0]={0、1/2}
Mode=1 Config[1]={ 1 }
Config[2]={ 2 }
head. TimeSection[0][0] integer The time format is "0 H:m: H:m:S "
For example: 0 00:00:00-10:59:59

55
4 Flashlight

4.1 FlashlightConfig

4.1.1 GetFlashlightConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=FlashLight


Description Get Flashlight config
Response head.Brightness=50
head.Enable=false
head.TimeSection[0][0]=1 00:00:00-23:59:59
head.TimeSection[0][1]=0 00:00:00-23:59:59

head.TimeSection[6][5]=0 00:00:00-23:59:59
Comment Params in Resp:
head = table.FlashLight

4.1.2 SetFlashlightConfig

URL http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]
Syntax
Descriptio Set Flashlight config
n Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&FlashLight.Enable=true&FlashLight.TimeSection[1][0]=1%201
2:00:00-18:00:00
Response OK or Error
Comment

ParamName ParamValue type Description


FlashLight. Enable bool Enable
FlashLight. Brightness integer Brightness
FlashLight. TimeSection[wd][ts] string It is an effective time period for flash light every day.
wd (week day) range is [0-6] (Sunday-Saturday)
ts (time section) range is [0-23], it’s index of time section table.

Format: mask hh:mm:ss-hh:mm:ss


Mask: {0,1}, hh: [0-24], mm: [00-59], ss: [00-59]
Mask 0: this time section is not used.
Mask 1: this time section is used.

56
Example:
TimeSection[1][0]=1 12:00:00-18:00:00
Means flash light is effective between 12:00:00 and 18:00:00 at
Monday.

5 Network

5.1 Net Interfaces

5.1.1 GetInterfaces

URL Syntax http://<ip>/cgi-bin/netApp.cgi?action=getInterfaces


Description Get all of the system network interfaces.
Response netInterface[0].Name=eth0
netInterface[0].Type=Normal
netInterface[0].Valid=true
netInterface[1]….

Comment result item value:
Name: network interface name.
“eth0” - wired network interface
“eth2” - wireless network interface
“3G” - 3G network interface

Type: “Normal” – wired network


“Wireless” – wireless network
"Auto", "TD-SCDMA", "WCDMA", "CDMA1x", "EDGE", "EVDO" – 3G network types.

Valid: network interface is valid if netInterface[n].Valid is true.

5.2 BasicNetworkConfig

5.2.1 GetBasicNetworkConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=Network


Description Get network basic config. Basic config contains basic network parameters (Default interface, domain name, host name), and
configuration of each network interface.
Response table.Network.DefaultInterface=eth0

57
table.Network.Domain=dahua
table.Network.Hostname=badak
table.Network.interface.DefaultGateway=10.7.0.1
table.Network.interface.DhcpEnable=false
table.Network.interface.DnsServers[0]=221.123.33.228
table.Network.interface.DnsServers[1]=221.12.1.228
table.Network.interface.IPAddress=10.7.2.3
table.Network.interface.MTU=1500
table.Network.interface.PhysicalAddress=00:10:5c:f2:1c:b4
table.Network.interface.SubnetMask=255.255.0.0
Comment interface in response is network interface name, such as eth0, eth2…

5.2.2 SetBasicNetworkConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Descriptio Set network basic config.
n Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&NetWork.Domain=DahuaTech&NetWork.eth0.DhcpEnable=t
rue
Response OK or Error
Comment interface in below ParamName is network interface name, such as eth0, eth2…

ParamName ParamValue type Description


NetWork. DefaultInterface string Set default network interface when multiple interfaces exist.
Range of interfaces is depends on 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:

58
255.255.255.0

5.3 PPPoE

5.3.1 GetPPPoEConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=PPPoE


Description Get PPPoE config
Response table.PPPoE.Enable=false
table.PPPoE.Password=123456
table.PPPoE.UserName=123456
Comment

5.3.2 SetPPPoEConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set PPPoE config
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&PPPoE.UserName=user1&PPPoE.Password=123456
Response OK or Error
Comment

ParamName ParamValue type Description


PPPoE. Enable bool Enable/Disable PPPoE.
PPPoE. UserName string PPPoE user name.
PPPoE. Password string PPPoE user password.

5.4 DDNS

5.4.1 GetDDNSConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=DDNS


Description Get DDNS config
Response table.DDNS[index].Address=www.dahuatech.com
table.DDNS[index].Enable=true
table.DDNS[index].HostName=www.dahuatech.com

59
table.DDNS[index].KeepAlive=10
table.DDNS[index].Password=none
table.DDNS[index].Port=5050
table.DDNS[index].Protocol= Quick DDNS
table.DDNS[index].UserName=user1
table.DDNS[index].DefaultHostName.Enable=false
table.DDNS[index].DefaultHostName.HostName=9002A9D77133.quickddns.com
Comment Index in response is the DDNS protocol table index, start from 0.
the meaning of params can refer to SetDDNSConfig chapter.

5.4.2 SetDDNSConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Descriptio Set DDNS config
n Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&DDNS[0].Address=www.dahuatech.com&DDNS[0].Enable=tr
ue
Response OK or Error
Comment Index in below ParamName is the DDNS protocol table index, start from 0.

ParamName ParamValue type Description


DDNS[index].Address string DDNS server IP address or name.
DDNS[index].Enable bool Multiple DDNS hostname can be configured, but
Only one hostname can be enabled, others should
be disabled.
DDNS[index].HostName String Hostname of this device.
DDNS[index].KeepAlive integer Range is [1-65535].
Unit is minutes.
DDNS[index].Password string DDNS user password
DDNS[index].Port integer Range is [1-65535].
Port of DDSN server
DDNS[index].Protocol string DDNS protocol type.
Range is {"NO-IP DDNS", "Dyndns DDNS", "DAHUA",
"Private DDNS", "DHDDNS", "QUICK DDNS" }.
DDNS[index].UserName string DDNS user name
DDNS[index].DefaultHostName.Enable bool Only protocol is in range {"Private DDNS",
"DHDDNS", "QUICK DDNS"}, it effects.
true : use the DefaultHostName.HostName
false: use the HostName
DDNS[index].DefaultHostName.HostName string The default hostname. It cannot be modified.

60
5.5 Email

5.5.1 GetEmailConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=Email


Description Get Email config
Response table.Email.Address=www.dahuatech.com
table.Email.Anonymous=true
table.Email.AttachEnable=true
table.Email.AttachmentEnable=true
table.Email.Enable=true
table.Email.HealthReport.Enable=false
table.Email.HealthReport.Interval=61
table.Email.Password=123456
table.Email.Port=26
table.Email.Receivers[0]=x@dahuatech.com
table.Email.Receivers[1]=y@dahuatech.com
table.Email.Receivers[2]=z@dahuatech.com
table.Email.SendAddress=x@dahuatech.com
table.Email.SslEnable=false
table.Email.Title=DVRMessage
table.Email.UserName=anonymity
Comment

5.5.2 SetEmailConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Descriptio Set Email config
n Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Email.Address=mail.dahuatech.com&Email.Anonymous=fals
e
Response OK or Error
Comment

ParamName ParamValue type Description


Email. Address string SMTP server IP address or name.
Email. Anonymous bool Enable/Disable anonymous email.
Email. AttachEnable bool Enable/Disable email attachment
Email. AttachmentEnable bool Enable/Disable email attachment

61
Email. Enable bool Enable/Disable email function
Email. HealthReport.Enable bool Enable/Disable report device status by email.
Email. HealthReport.Interval integer Range is [30-1440].
Unit is minutes
Email. Password string User password of email account.
Email. Port integer Range is [1-65535]
Email. Receivers[0] string Email addresses of 3 receivers.
Email. Receivers[1] string
Email. Receivers[2] string
Email. SendAddress string Sender email address.
Email. SslEnable bool True: enable SSL email.
Email. Title string Title of email.
Email. UserName string User name of email account.

5.6 Wlan

5.6.1 GetWlanConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=WLan


Description Get Wlan config
Response table.WLan.eth2.Enable=true
table.WLan.eth2.Encryption=off
table.WLan.eth2.KeyFlag=false
table.WLan.eth2.KeyID=0
table.WLan.eth2.KeyType=Hex
table.WLan.eth2.Keys[0]=password1
table.WLan.eth2.Keys[1]=password2
table.WLan.eth2.Keys[2]=password3
table.WLan.eth2.Keys[3]=password4
table.WLan.eth2.LinkMode=Auto
table.WLan.eth2.SSID=dahua
Comment

5.6.2 SetWlanConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set wlan config

62
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Wlan.eth2.Enable=true&Wlan.eth2.KeyType=Hex

Response OK or Error
Comment In below ParamName, interface is name of wireless interface.

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, and 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.6.3 ScanWlanDevices

URL Syntax http://<ip>/cgi-bin/wlan.cgi?action=scanWlanDevices&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Search wifi information
Example:
http://192.168.1.108/cgi-bin/wlan.cgi?action=scanWlanDevices&SSID=xia_yuguo 13098 Internet
Response Available wifi num and detailed information, for example:
found=1
wlanDevice[0].ApConnected=0
wlanDevice[0].ApMaxBitRate=54000000
wlanDevice[0].ApNetWorkType=255

63
wlanDevice[0].AuthMode=7
wlanDevice[0].BSSID=28:2c:b2:5c:de:36
wlanDevice[0].EncrAlgr=3
wlanDevice[0].LinkMode=0
wlanDevice[0].LinkQuality=31
wlanDevice[0].RSSIQuality=0
wlanDevice[0].SSID=xia_yuguo 13098 Internet
Comment

ParamName ParamValue type Description


SSID string Specified SSID, if not include any SSID, all wifi
information will be searched and displayed.

5.7 UPnP

5.7.1 GetUPnPConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=UPnP


Description Get UPnP config
Response table.UPnP.Enable=true
table.UPnP.MapTable[index].Enable=true
table.UPnP.MapTable[index].InnerPort=80
table.UPnP.MapTable[index].OuterPort=8080
table.UPnP.MapTable[index].Protocol=TCP
table.UPnP.MapTable[index].ServiceName=HTTP
Comment Index in response is the UPNP map table index, start from 0.

5.7.2 SetUPnPConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set UPnP config
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&UPnP.Enable=true&UPnP.MapTable[0].Protocol=TCP
Response OK or Error
Comment Index in below ParamName is UPNP map table index, range is [0-255]

ParamName ParamValue type Description


UPnP.Enable bool Enable/Disable UPNP feature.
UPnP.MapTable[index].Enable bool Enable/Disable this UPNP map.
64
UPnP.MapTable[index].InnerPort integer Range is [1-65535].
Inner port number
UPnP.MapTable[index].OuterPort integer Range is [1-65535].
Outer port number.
UPnP.MapTable[index].Protocol string Range is {TCP, UDP]
UPnP.MapTable[index].ServiceName string User defined UPnP service name.

5.7.3 GetUPnPStatus

URL Syntax http://<ip>/cgi-bin/netApp.cgi?action=getUPnPStatus


Description Get UPnP Status
Response status.InnerAddress=
status.OuterAddress=
status.PortMapStatus[0]=
status.PortMapStatus[1]=
status.PortMapStatus[2]=
status.PortMapStatus[3]=
status.PortMapStatus[4]=
status.PortMapStatus[5]=
status.PortMapStatus[6]=
status.Status=Unknown
status.Working=

Comment

5.8 NTP

5.8.1 GetNTPConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=NTP


Description Get NTP config
Response table.NTP.Address=clock.isc.org
table.NTP.Enable=false
table.NTP.Port=38
table.NTP.TimeZone=9
table.NTP.UpdatePeriod=31
Comment

65
5.8.2 SetNTPConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set NTP config
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&NTP.Address=time.dahuatech.com&NTP.Enable=true
Response OK or Error
Comment

ParamName ParamValue type Description


NTP.Address string NTP server IP address or name.
NTP.Enable bool Enable/Disable NTP server.
NTP.Port integer Range is [1-65535].
Port of NTP server.
NTP.TimeZone integer Range is [0-32].
0: "GMT+00:00"
1: "GMT+01:00"
2: "GMT+02:00"
3: "GMT+03:00"
4: "GMT+03:30"
5: "GMT+04:00"
6: "GMT+04:30"
7: "GMT+05:00"
8: "GMT+05:30"
9: "GMT+05:45"
10: "GMT+06:00"
11: "GMT+06:30"
12: "GMT+07:00"
13: "GMT+08:00"
14: "GMT+09:00"
15: "GMT+09:30"
16: "GMT+10:00"
17: "GMT+11:00"
18: "GMT+12:00"
19: "GMT+13:00"
20: "GMT-01:00"
21: "GMT-02:00"
22: "GMT-03:00"
23: "GMT-03:30"
24: "GMT-04:00"
25: "GMT-05:00"
26: "GMT-06:00"
27: "GMT-07:00"

66
28: "GMT-08:00"
29: "GMT-09:00"
30: "GMT-10:00"
31: "GMT-11:00"
32: "GMT-12:00"
NTP.UpdatePeriod integer Range is [0-65535], unit is minutes

5.9 RTSP

5.9.1 GetRTSPConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=RTSP


Description Get RTSP config
Response table.RTSP.Enable=true
table.RTSP.Port=554
table.RTSP.RTP.EndPort=40000
table.RTSP.RTP.StartPort=20000
Comment

5.9.2 SetRTSPConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set RTSP config
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&RTSP.Enable=true&RTSP.Port=554
Response OK or Error
Comment

ParamName ParamValue type Description


RTSP.Enable bool Enable/Disable RTSP.
RTSP.Port integer RTSP port.
RTSP.RTP.StartPort integer RTP start port.
RTSP.RTP.EndPort integer RTP end port.

67
5.10 Telnet

5.10.1 GetTelnetConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=Telnet


Description Get Telnet config
Response table.Telnet.Enable=true
Comment

5.10.2 SetTelnetConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set Telnet config
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Telnet.Enable=true
Response OK or Error
Comment

ParamName ParamValue type Description


Telnet.Enable bool Enable/Disable Telnet.

5.11 NetAlarmServer

5.11.1 GetAlarmServerConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=AlarmServer


Description Get AlarmServer config
Response table.AlarmServer.Address=0.0.0.0
table.AlarmServer.Enable=true
table.AlarmServer.Port=37777
Comment

5.11.2 SetAlarmServerConfig

URL http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]

68
Syntax
Descriptio Set Alarm Server config
n Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&AlarmServer.Address=as.dahuatech.com&AlarmServer.Enabl
e=false
Response OK or Error
Comment

ParamName ParamValue type Description


AlarmServer. Address string Alarm server IP address or name.
AlarmServer. Enable bool Enable/Disable Alarm server.
AlarmServer. Port integer Range is [1-65535].
Port of Alarm server.

6 Alarm

6.1 EventHandler

EventHandler is used in alarm and event config in following sections.


It contains settings for actions linked with alarm and events. Actions include record, snapshot, PTZ action,
log, mail, alarm out and so on.
When alarm or event happen, actions defined in alarm EventHandler and event EventHandler are executed.

6.1.1 GetEventHandler

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=<handlerName>


Description Get EventHandler settings

Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Alarm[0].EventHandler
can get EventHandler settings of alarm channel 0.
Response 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

69
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.RecordChannels[0]=1
handlerName.EventHandler.RecordChannels[1]=1

handlerName.EventHandler.RecordEnable=true
handlerName.EventHandler.RecordLatch=10

handlerName.EventHandler.SnapshotChannels[0]=1
handlerName.EventHandler.SnapshotChannels[1]=1

handlerName.EventHandler.SnapshotEnable=false
handlerName.EventHandler.SnapshotPeriod=3
handlerName.EventHandler.SnapshotTimes=0
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

handlerName.EventHandler. ExAlarmOutEnable=true
handlerName. ExAlarmOutChannels[0] =2
handlerName.ExAlarmOutChannels[1]=3

Comment Params in URL:
< handlerName> can be one of below four formats
Alarm[alarm channel].EventHandler
MotionDetect[video channel]. EventHandler
BlindDetect[video channel]. EventHandler
LossDetect[video channel]. EventHandler

6.1.2 SetEventHandler

URL http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]
Syntax

70
Descripti Modify Event Handler settings
on Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Alarm[0].EventHandler.AlarmOutChannels[0]=1&Alarm[0].Eve
ntHandler.AlarmOutEnable=true
Respons OK or Error
e
Commen In below paramName, Meaning of handlerName is the same with GetEventHandler
t

paramName paramValue Description


type
handlerName.EventHandler.AlarmOutChannels[ch] integer Range is {0, 1}, ch is alarm out channel index.
0 – do not output alarm at alarm out channel ch
1 – output alarm at alarm out channel ch
handlerName.EventHandler.AlarmOutEnable bool Enable/Disable alarm out function.
handlerName.EventHandler.AlarmOutLatch Integer Range is [10-300].
Unit is seconds, indicates the time to output alarm after input alarm is
cleared.
handlerName.EventHandler.BeepEnable bool Enable/Disable beep.
handlerName.EventHandler.Dejitter integer Range is [0-255].
Alarm signal dejitter seconds. Alarm signal change during this period is
ignored.
handlerName.EventHandler.Delay integer Range is [0-300].
Delay seconds before setting take effect.
handlerName.EventHandler.LogEnable bool Enable/Disable log for alarm.
handlerName.EventHandler.MailEnable bool Enable/Disable mail send for alarm.
handlerName.EventHandler.PtzLink[ch][0] string Range is {None, Preset, Tour, Pattern}
This is PTZ action linked with events. ch is PTZ channel index.
handlerName.EventHandler.PtzLink[ch][1] integer This is the parameter of PtzLink[ch][0],
If PtzLink[ch]][0] is
Preset: this is preset point.
Tour: this is tour path number.
Pattern: this is pattern number.
handlerName.EventHandler.PtzLinkEnable Bool Enable/Disable PTZ link.
handlerName.EventHandler.RecordChannels[ch] Integer Range is {0, 1}
0 – do not record on video channel ch
1 – record. on video channel ch
handlerName.EventHandler.RecordEnable bool Enable/Disable record function.
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.
71
handlerName.EventHandler.SnapshotPeriod integer Range is [0-255].
Frames between snapshots.
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 an effective time period for eventHanlder everyday.
wd (week day) range is [0-6] (Sunday-Saturday)
ts (time section) range is [0-23], it’s index of time section table.

Format: mask hh:mm:ss-hh:mm:ss


Mask: {0,1}, hh: [0-24], mm: [00-59], ss: [00-59]
Mask 0: this time section is not used.
Mask 1: this time section is used.

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.
handlerName.EventHandler. ExAlarmOutEnable bool
handlerName. ExAlarmOutChannels[channels] integer

6.2 Alarm

6.2.1 GetAlarmConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=Alarm


Description Get Alarm Config
Response table.Alarm[0].Enable=false
table.Alarm[0].EventHandler….(output of EventHandler is described in GetEventHandler)
table.Alarm[0].Name=Door1
table.Alarm[0].SensorType=NC
table.Alarm[1]….

Comment

6.2.2 SetAlarmConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set Alarm Config
Example:
72
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Alarm[0].Enable=true
Response OK or Error
Comment In below ParamName, input is external alarm input channel.
EventHandler defines parameter of relevant actions when alarm or event happens. It’s also used in following sections about
events.

ParamName ParamValue type Description


Alarm[input].Enable bool Enable/Disable alarm from a input channel
Alarm[input].EventHandler Setting of EventHandler is described in SetEventHandler
Alarm[input].Name string Name of alarm input channel.
Alarm[input].SensorType string Range is {NC, NO].
NC: normal close
NO: normal open

6.2.3 GetAlarmOutConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=AlarmOut


Description Get Alarm Out config
Response table.AlarmOut[alarmOutChannel].Mode=0
table.AlarmOut[alarmOutChannel].Name=Beep
Comment Params in Resp:
alarmOutChannel the alarm out channel index.

6.2.4 SetAlarmOutConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set Alarm Out config
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&AlarmOut[0].Mode=0&AlarmOut[0].Name=port1
Response OK or Error
Comment Port in below ParamName is alarm out port index, start form 0.

ParamName ParamValue type Description


AlarmOut[port].Mode integer Range is {0, 1, 2}
0: automatically alarm
1: force alarm
2: close alarm
AlarmOut[port].Name string Alarm out port name.

73
6.2.5 GetInSlots

URL Syntax http://<ip>/cgi-bin/alarm.cgi?action=getInSlots


Description Get alarm input channel number.
Response result=2
Comment

6.2.6 GetOutSlots

URL Syntax http://<ip>/cgi-bin/alarm.cgi?action=getOutSlots


Description Get alarm output channel number.
Response result=1
Comment

6.2.7 GetInState

URL Syntax http://<ip>/cgi-bin/alarm.cgi?action=getInStates


Description Get alarm input state for all channels.
Response result=3
Comment A bit in the response result indicates a channel alarm states, result 3 means alarm channel 1 and channel 2 have alarm now.

6.2.8 GetOutState

URL Syntax http://<ip>/cgi-bin/alarm.cgi?action=getOutStates


Description Get alarm output state for all channels.
Response result=0
Comment A bit in the response result indicates a channel, result 1 means alarm is present.

6.3 MotionDetect

6.3.1 GetMotionDetectConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=MotionDetect

74
Description Motion Detect config of a video channel contains Enable, Level, Region and EventHandler.
Response table.MotionDetect[0].Enable=false
table.MotionDetect[0].EventHandler… (output of EventHandler is described in GetEventHandler)
table.MotionDetect[0].Level=3
table.MotionDetect[0].Region[0]=4194303
table.MotionDetect[0].Region[1]=4194303


table.MotionDetect[1]…

Comment

6.3.2 SetMotionDetectConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set Motion Detect config
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&MotionDetect[0].Enable=true&MotionDetect[0].Region[0]=
0
Response OK or Error
Comment Params in URL:
In below table,
Head = MotionDetect[Channel]
Channel: video channel index
LineNum
Index of region, region is divided into lines and each line has several blocks, a line is described by a 32 bit integer, a bit for a
block..
0=Line 1
1=Line 2

ParamName ParamValue type Description


head. Enable bool Enable/Disable motion detect feature in a channel.

head. EventHandler Setting of EventHandler is described in SetEventHandler


head. Level integer Range is [1-6].
Sensitivity of motion detection.
1: lowest sensitivity.
6: highest sensitivity.
head. Region[LineNum] integer Currently, region is divided into 18 lines and 22 blocks/lines.
A bit describes a block in the line.
Bit = 1: motion in this block is monitored..
Example:

75
MotionDetect[0].Region[0] = 4194303 (0x3FFFFF): the 22 blocks in channel 0 line
0 is monitored.
MotionDetect[0].Region[1] =0: the 22 blocks in channel 0 line 1 is not monitored.
MotionDetect[0].Region[17] = 3: the left two blocks in the last line of channel 0 is
monitored.

6.4 BlindDetect

6.4.1 GetBlindDetectConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=BlindDetect


Description Get Blind Detect config
Response head. Enable=false
head. EventHandler= (output of EventHandler is described in GetEventHandler)
head. Level=3
Comment Params in Resp:
head= table.BlindDetect[Channel]
Channel: video channel number

6.4.2 SetBlindDetectConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set Blind Detect config
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&BlindDetect[0].Enable=true
Response OK or Error
Comment Params in URL:
In below table,
head= BlindDetect[Channel]
Channel: video channel number

ParamName ParamValue type Description


head. Enable bool Enable/Disable blind detect feature.

head. EventHandler Setting of EventHandler is described in SetEventHandler


head. Level integer Range is [1-6].
Sensitivity of blind detection.
1: lowest sensitivity.
6: highest sensitivity.

76
6.5 LossDetect

6.5.1 GetLossDetectConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=LossDetect


Description Get Loss Detect config
Response head. Enable=false
head. EventHandler= (output of EventHandler is described in GetEventHandler)
Comment Params in Resp:
head=table.LossDetect [Channel]
Channel: video channel number

6.5.2 SetLossDetectConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set Loss Detect config
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&LossDetect[0].Enable=true
Response OK or Error
Comment Params in URL:
In below table,
head= LossDetect [Channel]
Channel: video channel number

ParamName ParamValue type Description


head. Enable bool Enable/Disable loss detect feature.

head. EventHandler Setting of EventHandler is described in SetEventHandler

6.6 LoginFailureAlarm

6.6.1 GetLoginFailureAlarmConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=LoginFailureAlarm


Description Get Login Failure Alarm config
Response head. Enable=false
head. EventHandler= (output of EventHandler is described in GetEventHandler)
Comment Params in Resp:
head= table.LoginFailureAlarm
Channel: video channel number

77
6.6.2 SetLoginFailureAlarmConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set Login Failure Alarm config
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&LoginFailureAlarm.Enable=true
Response OK or Error
Comment Params in URL:
In below table,
head= LoginFailureAlarm

ParamName ParamValue type Description


head. Enable bool Enable/Disable notify LoginFailure event.Now this event can be linked
with send email and alarm out.The max try login times can be configured
in chapter SetGeneralConfig.
head. EventHandler Setting of EventHandler is described in SetEventHandler

6.7 StorageAbnormal

6.7.1 GetStorageNotExistConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=StorageNotExist


Description Get Storage Not Exist event config
Response StorageNotExist.Enable=false
StorageNotExist.EventHandler= (output of EventHandler is described in GetEventHandler)
Comment

6.7.2 SetStorageNotExistConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set Storage Not Exist event config
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&StorageNotExist.Enable=true
Response OK or Error
Comment

ParamName ParamValue type Description


StorageNotExist.Enable bool Enable/Disable loss detect feature.

StorageNotExist.EventHandler Setting of EventHandler is described in SetEventHandler

78
6.7.3 Get StorageFailureConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=StorageFailure


Description Get Storage Failure event config
Response StorageFailure.Enable=false
StorageFailure.EventHandler= (output of EventHandler is described in GetEventHandler)
Comment

6.7.4 Set StorageFailureConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set Storage Failure event config
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&StorageFailure.Enable=true
Response OK or Error
Comment

ParamName ParamValue type Description


StorageFailure.Enable bool Enable/Disable loss detect feature.

StorageFailure.EventHandler Setting of EventHandler is described in SetEventHandler

6.7.5 GetStorageLowSpaceConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=StorageLowSpace


Description Get Storage Low Space event config
Response StorageLowSpace.Enable=false
StorageLowSpace.EventHandler= (output of EventHandler is described in GetEventHandler)
Comment

6.7.6 SetStorageLowSpaceConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set Storage Low Space event config
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&StorageLowSpace.Enable=true
Response OK or Error
Comment

ParamName ParamValue type Description


79
StorageLowSpace.Enable bool Enable/Disable loss detect feature.

StorageLowSpace.EventHandler Setting of EventHandler is described in SetEventHandler

6.8 NetAbnormal

6.8.1 GetNetAbortConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name= NetAbort


Description Get Net Abort event config
Response NetAbort.Enable=false
NetAbort.EventHandler= (output of EventHandler is described in GetEventHandler)
Comment

6.8.2 SetNetAbortConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set Net Abort event config
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&NetAbort.Enable=true
Response OK or Error
Comment

ParamName ParamValue type Description


NetAbort.Enable bool Enable/Disable loss detect feature.

NetAbort.EventHandler Setting of EventHandler is described in SetEventHandler

6.8.3 GetIPConflictConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name= IPConflict


Description Get IP Conflict event config
Response IPConflict.Enable=false
IPConflict.EventHandler= (output of EventHandler is described in GetEventHandler)
Comment

6.8.4 SetIPConflictConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set IP Conflict event config
Example:
80
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&IPConflict.Enable=true
Response OK or Error
Comment

ParamName ParamValue type Description


IPConflict.Enable bool Enable/Disable loss detect feature.

IPConflict.EventHandler Setting of EventHandler is described in SetEventHandler

6.9 GetEventIndexes

URL Syntax http://<ip>/cgi-bin/eventManager.cgi?action=getEventIndexes&code=<eventCode>


Description Get channels indexes that event of code eventCode happens.
Example:
http://192.168.1.108/cgi-bin/eventManager.cgi?action=getEventIndexes&code=AlarmLocal
Response channels[0]=0
channels[1]=2
channels[2]=3

(This response means event happened on channel 0, channel 2, and channel 3.)
Comment Params in URL:
eventCode includes:
VideoMotion: motion detection event
VideoLoss: video loss detection event
VideoBlind: video blind detection event.
AlarmLocal: alarm detection event.
StorageNotExist: storage not exist event.
StorageFailure: storage failure event.
StorageLowSpace: storage low space event.
AlarmOutput: alarm output event.

6.10 Attach

URL Syntax http://<ip>/cgi-bin/eventManager.cgi?action=attach&codes=[<eventCode>,<eventCode> ,…]


Description Subscribe to messages that event of code eventCode happens.
Example:
http://192.168.2.108/cgi-bin/eventManager.cgi?action=attach&codes=[AlarmLocal, VideoMotion, VideoLoss, VideoBlind]
Response HTTP Code: 200 OK\r\n
Cache-Control: no-cache\r\n
Pragma: no-cache\r\n
Expires: Thu, 01 Dec 2099 16:00:00 GMT\r\n

81
Connection: close\r\n
Content-Type: multipart/x-mixed-replace; boundary=<boundary>\r\n
Body:
--<boundary>\r\n
Content-Type: text/plain\r\n
Content-Length: <data length>\r\n
<eventInfo>\r\n\r\n
--<boundary>\r\n
Content-Type: text/plain\r\n
Content-Length: <data length>\r\n
<eventInfo>\r\n\r\n

For example:
HTTP Code: 200 OK\r\n
Cache-Control: no-cache\r\n
Pragma: no-cache\r\n
Expires: Thu, 01 Dec 2099 16:00:00 GMT\r\n
Connection: close\r\n
Content-Type: multipart/x-mixed-replace; boundary=myboundary\r\n\r\n
Body:
-- myboundary \r\n
Content-Type: text/plain\r\n
Content-Length: 39\r\n
Code=VideoMotion;action=Start;index=0\r\n\r\n
-- myboundary \r\n
Content-Type: text/plain\r\n
Content-Length: 38\r\n
Code=VideoBlind;action=Start;index=0\r\n\r\n
-- myboundary \r\n
Content-Type: text/plain\r\n
Content-Length: 38\r\n
Code= MDResult;action=Pulse;index=0;data=61708863,61708863…\r\n\r\n
-- myboundary \r\n

Comment eventCode can be any one of the standard codes defined in DHIIF.
For example:
VideoMotion: motion detection event
VideoLoss: video loss detection event
VideoBlind: video blind detection event.
AlarmLocal: alarm detection event.
StorageNotExist: storage not exist event.
StorageFailure: storage failure event.
StorageLowSpace: storage low space event.
AlarmOutput: alarm output event.
MDResult: motion detection data reporting event. The motion detect window contains 18 rows and 22 columns. The

82
event info contains motion detect data with mask of every row.

6.11 GetCaps

URL Syntax http://<ip>/cgi-bin/eventManager.cgi?action=getCaps


Description Get event manager capabilities.
Response caps.AlarmOutEnable=true
caps.BeepEnable=true
caps.DejitterEnable=true
caps.MMSEnable=true
caps.MailEnable=true
caps.MonitorTourEnable=true
caps.PtzLinkEnable=true
caps.RecordEnable=true
caps.SnapshotEnable=true
caps.TimeSectionEnable=true
caps.TipEnable=true
Comment

7 PTZ

7.1 PTZConfig

7.1.1 GetPTZConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=Ptz


Description Get Ptz config
Response table.Ptz[port].Address=8
table.Ptz[port].Attribute[0]=115200
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
Comment Params in Resp:
Port is PTZ port index, start form 0.

83
7.1.2 SetPTZConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set Ptz config
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Ptz[0].Address=192.168.0.1&Ptz[0].Attribute[0]=9600
Response OK or Error
Comment Port in below ParamName is PTZ port index, start form 0.

ParamName ParamValue type Description


Ptz[port].Address integer Range is [0-255].
Device address, if there are more than one device connected to
this port, distinguish them by this address.
Ptz[port].Attribute[0] integer The baud rate. Range is {1200, 2400 ,4800, 9600, 19200, 38400,
57600, 115200}.
Ptz[port].Attribute[1] integer Range is {4, 5, 6, 7, 8}.
Data bit.
Ptz[port].Attribute[2] string Range is {Even, Mark, None, Odd, Space}.
Parity verification mode.
Ptz[port].Attribute[3] float Range is {1, 1.5, 2}.
Stop bit.
Ptz[port].Homing[0] integer Range is {-1,0-255}
-1: homing is disabled.
[0-255]: preset point number
Ptz[port].Homing[1] integer Range is [0-65535].
No operation timeout, unit is seconds.
After no operation timeout, PTZ go to preset point set in
Ptz[port].Homing[0].
Ptz[port].ProtocolName string PTZ protocol name, depends on PTZ capability,
refer to GetProtocolList to get the protocol list.

7.1.3 GetPtzAutoMovementConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=PtzAutoMovement


Description Get Ptz Auto Movement config
Response table.PtzAutoMovement[port][Task].Enable = true
table.PtzAutoMovement[port][Task].TimeSection[week][ section] = ”1 10:00:00-11:00:00”

table.PtzAutoMovement[port][Task].Fuction = “Scan”

84
table.PtzAutoMovement[port][Task].ScanId = 0
table.PtzAutoMovement[port][Task].PresetId = 1
table.PtzAutoMovement[port][Task].PatternId = 0
table.PtzAutoMovement[port][Task].TourId = 0
table.PtzAutoMovement[port][Task].AutoHoming.Enable = true
table.PtzAutoMovement[port][Task].AutoHoming.Time = 300
table.PtzAutoMovement[port][Task].SnapshotEnable = false
table.PtzAutoMovement[port][Task].SnapshotDelayTime = 30
Comment Params in Resp:
Port is PTZ port index, start from 0.
Task is the number of task, start from 0.
week: from 1 to 7.
section: time section, from 0 to 5.

7.1.4 SetPtzAutoMovementConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set PtzAutoMovement config
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&PtzAutoMovement[0][0].Fuction=Tour
Response OK or Error
Comment Params in URL:
In below table,
head=PtzAutoMovement[port][task]
port is PTZ port index, start from 0.
task is the number of task, start from 0.
week: from 1 to 7.
section: time section, from 0 to 5.

ParamName ParamValue type Description


head. Enable bool Enable/Disable PtzAutoMovement
head. TimeSection timeSchedule timeSchedule[week][section]=”1 10:00:00-11:00:00”

head. Fuction string Range is {Scan, Preset, Pattern, Tour}.
head. ScanId integer Scan Id, start from 0
head. PresetId integer Preset Id, start from 1
head. PatternId integer Pattern Id, start from 0
head. TourId integer Tour Id, start from 1
head. AutoHoming.Enable bool Enable/Disable AutoHoming.
If ptz manual operation have stopped, it will recover auto movement.
head. AutoHoming.Time integer Recover time, unit is second.

85
head. SnapshotEnable bool Enable/Disable Snap, when “Fuction” is “Preset”.
head. SnapshotDelayTime integer Delay time of snap, when “Fuction” is “Preset”.

7.2 PTZControl

7.2.1 GetProtocolList

URL Syntax http://<ip>/cgi-bin/ptz.cgi?action=getProtocolList


Description Get PTZ protocol list.
Response result=NONE,AD1641M,ADMATRIX,BANKNOTE,DH-CC440,DH-MATRIX,DH-SD1,DH-SD2,HAIYU,HY,LILIN,PANASONIC
Comment Response contains all support PTZ protocols separated by comma.

7.2.2 GetCurrentProtocolCaps

URL Syntax http://<ip>/cgi-bin/ptz.cgi?action=getCurrentProtocolCaps&channel=<channelNo>


Description Get Ptz channel protocol capabilities
Example:
http://192.168.1.108/cgi-bin/ptz.cgi?action=getCurrentProtocolCaps&channel=1
Response caps.AlarmLen=0
caps.AuxMax=8
caps.AuxMin=1
caps.CamAddrMax=255
caps.CamAddrMin=1
caps.Interval=200
caps.Menu=false
caps.MonAddrMax=255
caps.MonAddrMin=0
caps.Name=DH-SD1
caps.PanSpeedMax=255
caps.PanSpeedMin=1
caps.PatternMax=5
caps.PatternMin=1
caps.PresetMax=80
caps.PresetMin=1
caps.TileSpeedMax=255
caps.TileSpeedMin=1
caps.TourMax=7
caps.TourMin=0
caps.Type=1
86
Comment Params in URL:
channelNo: PTZ channel index

Field in response Description


AlarmLen Alarm length in protocol
AuxMax Maximum/Minimum number for auxiliary functions
AuxMin
CamAddrMax Maximum/Minimum channel address
CamAddrMin
Menu True or false, support internal menu of the PTZ or not,
MonAddrMax Maximum/Minimum monitor address
MonAddrMin
Name Name of the operation protocol
PanSpeedMax Maximum/Minimum pan speed.
PanSpeedMin
PatternMax Maximum/Minimum pattern path number.
PatternMin
PresetMax Maximum/Minimum preset point number.
PresetMin
TileSpeedMax Maximum/Minimum tile speed.
TileSpeedMin
TourMax Maximum/Minimum tour path number.
TourMin
Type Type of PTZ protocol.

7.2.3 PTZ control commands

URL Syntax http://<ip>/cgi-bin/ptz.cgi?action=[action]&channel=[ch]&code=[code]&arg1=[argstr]& arg2=[argstr]&arg3=[argstr]


Description Control Ptz
Example:
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=0&code=Up&arg1=0&arg2=1&arg3=0
Response OK or Error
Comment Params in URL:
action is PTZ control command, it can be start or stop.
ch is PTZ channel range is [0 - n-1], code is PTZ operation, and arg1, arg2, arg3 is the arguments of operation.
Code and argstr values are listed in below table.

Code Code description arg1 arg2 arg3 arg4


Up Tile up 0 Vertical speed, 0 0
range is [1-8]
Down Tile down 0 Vertical speed, 0 0
range is [1-8]
Left Pan left 0 Vertical speed, 0 0
range is [1-8]
87
Right Pan right 0 Vertical speed, 0 0
range is [1-8]
ZoomWide Zoom out 0 multiple 0 0
ZoomTele Zoom in 0 multiple 0 0
FocusNear Focus near 0 multiple 0 0
FocusFar Focus far 0 multiple 0 0
IrisLarge Aperture larger 0 multiple 0 0
IrisSmall Aperture smaller 0 multiple 0 0
GotoPreset Go to PTZ preset point 0 Preset point 0 0
number
SetPreset Set PTZ preset point 0 Preset point 0 0
number
ClearPreset Clear PTZ preset point 0 Preset point 0 0
number
LampWaterClear 1: open 0 0 0
2: close
StartTour Start PTZ tour Tour path 0 1: start 0
number 2: automatically
3: stop
LeftUp Pan left and tile up Vertical speed, Horizontal speed, 0 0
range is [1-8] range is [1-8]
RightUp Pan right and tile up Vertical speed, Horizontal speed, 0 0
range is [1-8] range is [1-8]
LeftDown Pan left and tile down Vertical speed, Horizontal speed, 0 0
range is [1-8] range is [1-8]
RightDown Pan right and tile down Vertical speed, Horizontal speed, 0 0
range is [1-8] range is [1-8]
AddTour Add preset point to tour path Tour path Preset point 0 0
number number
DelTour Delete preset point from tour Tour path Preset point 0 0
path number number
ClearTour Clear tour path Tour path 0 0 0
number
AutoPanOn Start pan rotate 0 0 0 0
AutoPanOff Stop pan rotate 0 0 0 0
SetLeftLimit Set left limit. 0 0 0 0
SetRightLimit Set right limit. 0 0 0 0
AutoScanOn Start auto scan. 0 0 0 0
AutoScanOff Stop auto scan. 0 0 0 0
SetPatternBegin Begin pattern path set. Pattern number 0 0 0
SetPatternEnd End pattern path set. Pattern number 0 0 0
StartPattern Run pattern path Pattern number 0 0 0
StopPattern Stop pattern path Pattern number 0 0 0
ClearPattern Clear pattern path Pattern number 0 0 0

88
AlarmSearch Search alarm. 0 0 0 0
Position Go to position Horizontal Vertical position Zoom change 0
position
AuxOn Auxiliary function on, auxiliary 0 0 0 0
function is defined in product
definition document.
AuxOff Auxiliary function off 0 0 0 0
Menu 0 0 0 0
Exit 0 0 0 0
Enter 0 0 0 0
Esc 0 0 0 0
MenuUp 0 0 0 0
MenuDown 0 0 0 0
MenuLeft 0 0 0 0
MenuRight 0 0 0 0
Reset Restore default configuration. 0 0 0 0
SetPresetName Preset point Preset point title. 0 0
number (1 byte)
AlarmPtz Alarm linked PTZ. External alarm Link type: Argument of link 0
input channel. 1: go to preset type:
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 0
controller
PositionABS Go to ABS position Horizontal angle: Vertical Zoom in mutiple Speed[1-8], not
0°-360° angle :0°-90° must
PositionReset Use current direction as 0 0 0 0
reference.
UpTele up + TELE Speed [1-8] 0 0 0
DownTele down + TELE Speed [1-8] 0 0 0
LeftTele left + TELE Speed [1-8] 0 0 0
RightTele right + TELE Speed [1-8] 0 0 0
LeftUpTele leftup + TELE Speed [1-8] 0 0 0
LeftDownTele leftdown + TELE Speed [1-8] 0 0 0
RigjtUpTele rightup + TELE Speed [1-8] 0 0 0
RightDownTele rightdown + TELE Speed [1-8] 0 0 0
UpWide up + WIDE Speed [1-8] 0 0 0
DownWide down + WIDE Speed [1-8] 0 0 0

89
LeftWide left + WIDE Speed [1-8] 0 0 0
RightWide right + WIDE Speed [1-8] 0 0 0
LeftUpWide leftup + WIDE Speed [1-8] 0 0 0
LeftDownWide leftdown + WIDE Speed [1-8] 0 0 0
RightUpWide rightup + WIDE Speed [1-8] 0 0 0
RightDownWide rightdown + WIDE Speed [1-8] 0 0 0
Continuously Horizontal Speed Vertical Speed Zoom Speed [-8-8] Timeout
Move Continuously
[-8-8] [-8-8]
Relatively Relatively angle: Relatively Relatively Zoom
Move Relatively
0°-360° angle :0°-90°

7.3 PTZStatus

7.3.1 PTZ GetStatus

URL Syntax http://<ip>/cgi-bin/ptz.cgi?action=getStatus


Description Get Ptz status
Comment This URL is used to get PTZStatus.
Response status.UTC=6538920
status.MoveStatus=Idle
status.ZoomStatus=Idle
status.PresetID=10
status.Position=120,12,2

8 Record

8.1 RecordManager

8.1.1 GetCaps

URL Syntax http://<ip>/cgi-bin/recordManager.cgi?action=getCaps


Description Get record Manager capabilities.
Response caps.MaxPreRecordTime=30
caps.PacketLengthRange[0]=1
caps.PacketLengthRange[1]=60
caps.PacketSizeRange[0]=131072
caps.PacketSizeRange[1]=2097152
caps.SupportExtraRecordMode=true

90
caps.SupportHoliday=true
caps.SupportPacketType[0]=Time
caps.SupportPacketType[1]=Size
caps.SupportResumeTransmit=false
Comment

8.2 Record

8.2.1 GetRecordConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=Record


Description Get Record config
Response table.Record[channel].PreRecord=6
table.Record[channel].TimeSection[weekday][0]=1 00:00:00-24:00:00
table.Record[channel].TimeSection[weekday][1]=0 02:00:00-24:00:00
table.Record[channel].TimeSection[weekday][2]=0 03:00:00-24:00:00
table.Record[channel].TimeSection[weekday][3]=0 04:00:00-24:00:00
table.Record[channel].TimeSection[weekday][4]=0 05:00:00-24:00:00
table.Record[channel].TimeSection[weekday][5]=0 06:00:00-24:00:00
Comment Params in Resp:
Channel is video channel number, weekday range is [0-6] (Sunday - Saturday).
Record config contains pre record time and record time sections of every day.

8.2.2 SetRecordConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set Record config
Example:
Set record time to every Sunday all day. Record type is motion detection and alarm.
URL should be:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Record[0].TimeSection[0][0]=6 00:00:00-23:59:59
In this example, “6 00:00:00-23:59:59” means motion detection and alarm record all day (6 = 4 & 2, alarm is 4, motion
detection is 2.).
Response OK or Error
Comment Params in URL:
In below table,
ch = channel index
wd = week day index
ts = time section index

91
ParamName ParamValue type Description
Record[ch].PreRecord integer Range is [0-300].
Prerecord seconds, 0 means no prerecord.
ch (Channel number) starts form 0
Record[ch].TimeSection[wd][ts] string wd (week day) range is [0-6] (Sunday - Saturday)
ts (time section) range is [0-23], time section table index.

Format: mask hh:mm:ss-hh:mm:ss


Mask: [0-65535], hh: [0-24], mm: [0-59], ss: [0-59]
Mask indicates record type by bits:
Bit0: regular record
Bit1: motion detection record
Bit2: alarm record
Bit3: card record

8.2.3 GetRecordModeConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=RecordMode


Description Get Record Mode config
Response table.RecordMode[channel].Mode=0
Comment Params in Resp:
channel is video channel number.

8.2.4 SetRecordModeConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set Record Mode config
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&RecordMode[0].Mode=0
Response OK or Error
Comment Params in URL:
In below table,
channel is video channel index, start form 0.

ParamName ParamValue type Description


RecordMode[channel].Mode integer Range is {0, 1, 2}.
0: automatically record
1: manually record
2: stop record.

92
8.3 Record MediaGlobal

8.3.1 GetMediaGlobalConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=MediaGlobal


Description Get Media Global config
Response table.MediaGlobal.SnapFormatAs=MainFormat
Comment

8.3.2 SetMediaGlobalConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set MediaGlobal config
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&MediaGlobal.SnapFormatAs=MainFormat
Response OK or Error
Comment

ParamName ParamValue type Description


MediaGlobal.SnapFormatAs string The range is {“MainFormat”, “ExtraFormat”}

9 System

9.1 General

9.1.1 GetGeneralConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=General


Description Get General config
Response table.General.MachineName=Dahua001
table.General. LocalNo=8
table.General. MachineAddress=”binjiangqv jiangnandadao weiyelu”
table.General. MachineGroup=”jiaojing yidui
Comment

93
9.1.2 SetGeneralConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set General config
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&General.MachineName=MyIPC
Response OK or Error
Comment

ParamName ParamValue type Description


General.MachineName string Device name or serial number.
General. LocalNo integer
General. MachineAddress string
General. MachineGroup string

9.2 SystemTime

9.2.1 GetCurrentTime

URL Syntax http://<ip>/cgi-bin/global.cgi?action=getCurrentTime


Description Get current time
Response result = 2011-7-3 21:02:32
Comment The time format is "Y-M-D H-m-S". It’s not be effected by Locales.TimeFormat in SetLocalesConfig.

9.2.2 SetCurrentTime

URL Syntax http://<ip>/cgi-bin/global.cgi?action=setCurrentTime&time=2011-7-3%2021:02:32


Description Set current time
Response OK or Error
Comment The time format is "Y-M-D H-m-S". It’s not be effected by Locales.TimeFormat in SetLocalesConfig.

9.3 Locales

9.3.1 GetLocalesConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=Locales

94
Description Get Locales config
Response table.Locales.DSTEnable=false
table.Locales.DSTEnd.Day=1
table.Locales.DSTEnd.Hour=0
table.Locales.DSTEnd.Minute=0
table.Locales.DSTEnd.Month=1
table.Locales.DSTEnd.Week=2
table.Locales.DSTEnd.Year=2011
table.Locales.DSTStart.Day=0
table.Locales.DSTStart.Hour=0
table.Locales.DSTStart.Minute=0
table.Locales.DSTStart.Month=1
table.Locales.DSTStart.Week=1
table.Locales.DSTStart.Year=2011
table.Locales.TimeFormat=yyyy-MM-dd HH:mm:ss
Comment

9.3.2 SetLocalesConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set Locales config
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Locales.DSTEnable=false
Response OK or Error
Comment

ParamName ParamValue Description


type
Locales.DSTEnable bool Enable/Disable DST (daylight saving time)
Locales.DSTEnd.Day integer Range is [0-6] or [1-31]
[0-6]: week day, 0 = Sunday, 6 = Saturday
[1-31]: month day
If Locales.DSTEnd.Week is 0, use month day, otherwise, use week day.
Locales.DSTEnd.Hour integer Range is [0-23]
Locales.DSTEnd.Minute integer Range is [0-59]
Locales.DSTEnd.Month integer Range is [1-12]
Locales.DSTEnd.Week Integer Range is {1, 2, 3, 4, -1, 0}.
0 = Use month day
[1, 2, 3, 4, -1]: use week day.
1 = first week, 2 = second, 3 = third, 4 = fourth, -1 = last.
Locales.DSTEnd.Year Integer Range is [2000-2038]

95
Locales.DSTStart.Day Range is the same with items in Locales.DSTEnd
Locales.DSTStart.Hour Locales.DSTStart table and Locales.DSTEnd table together defines the
Locales.DSTStart.Minute time range of DST.
Locales.DSTStart.Month
Locales.DSTStart.Week
Locales.DSTStart.Year
Locales.TimeFormat string Defines time format displayed in video time title.
String form is: year-month-day hour:mm:ss.
Position of year, month and day can be exchanged.

Range of year is {yy, yyyy}


yy = year without century, yyyy = year with century.
Range of month is {M, MM, MMMM}
M = 1 for January, MM = 01 for January, MMMM = Jan for January
Range of day is {d, dd}
d = 1 for first day, dd = 01 for first day
Range of hour is {H, HH, h, hh}
H = 1 for 1:00, HH = 01 for 1:00, range is 0-23
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.4 Language

9.4.1 GetLanguageCaps

URL Syntax http://<ip>/cgi-bin/magicBox.cgi?action=getLanguageCaps


Description Get the list of supported languages
Response Languages=SimpChinese,English,French
Comment response is a string contains languages with comma separated.
Languages include
{English, SimpChinese, TradChinese, Italian, Spanish, Japanese, Russian, French, German]

9.4.2 GetLanguageConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=Language


Description Get system language config.
96
Response table.Language=SimpChinese
Comment

9.4.3 SetLanguageConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set system language config.
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Language=SimpChinese
Response OK or Error
Comment NOTE: After changing language setting, system will automatically reboot!

ParamName ParamValue type Description


Language string The language range is get from interface in GetLanguageCaps

9.5 AccessFilter

9.5.1 GetAccessFilterConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=AccessFilter


Description Get Access Filter config
Response table.AccessFilter.BannedList[bannedIndex]=10.6.10.1
table.AccessFilter. TrustList[trustIndex]=1.2.3.4
table.AccessFilter.Enable=false
table.AccessFilter.Type=BannedList
Comment Params in Resp:
bannedIndex is the banned IP list index,
trustIndex is the trust IP list index.

9.5.2 SetAccessFilterConfig

URL http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]
Syntax
Descriptio Set Access Filter config
n Example:

97
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&AccessFilter.BannedList[0]=192.168.1.1&AccessFilter.Type=B
annedList
Response OK or Error
Comment Params in Resp:
In below table,
index is the IP list index, it's range is [0-255]

ParamName ParamValue type Description


AccessFilter.BannedList[index] string Banned IP address list
AccessFilter.TrustList[index] string Trusted IP address list
AccessFilter.Enable bool Enable/Disable access filter function
AccessFilter.Type string Range is {TrustList, BannedList},
TrustList: Trust list is used, banned list is not used.
BannedList: Banned list is used, trust list is not used.

9.6 AutoMaintain

9.6.1 GetAutoMaintainConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=AutoMaintain


Description Get Auto Maintain config
Response table.AutoMaintain. AutoRebootDay=3
table.AutoMaintain. AutoRebootHour=0
table.AutoMaintain. AutoRebootMinute=0
table.AutoMaintain. AutoShutdownDay=1
table.AutoMaintain. AutoShutdownHour=0
table.AutoMaintain. AutoShutdownMinute=0
table.AutoMaintain. AutoStartUpDay=1
table.AutoMaintain. AutoStartUpHour=2
table.AutoMaintain. AutoStartUpMinute=0
Comment

9.6.2 SetAutoMaintainConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set Auto Maintain config
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&AutoMaintain. AutoRebootDay=7
Response OK or Error
98
Comment

ParamName ParamValue Description


type
AutoMaintain. AutoRebootDay integer Range is [-1-7].
Auto restart day.
-1 = never auto restart
0- 6 = Sunday-Saturday
7 = restart every day
AutoMaintain. AutoRebootHour integer Range is [0-23].
Auto restart hour
AutoMaintain. AutoRebootMinute integer Range is [0-59].
Auto restart minute
AutoMaintain. AutoShutdownDay integer Auto reboot time.
AutoMaintain. AutoShutdownHour Range is same with AutoOpenDay, AutoOpenHour, AutoOpenMinute.
AutoMaintain. AutoShutdownMinute
AutoMaintain. AutoStartUpDay integer Auto shutdown time.
AutoMaintain. AutoStartUpHour Range is same with AutoOpenDay, AutoOpenHour, and AutoOpenMinute.
AutoMaintain. AutoStartUpMinute

9.7 UserManager

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 monitoring and replaying authorities.

9.7.2 GetGroupInfo

URL Syntax http://<ip>/cgi-bin/userManager.cgi?action=getGroupInfo&name=<groupName>


Description Get group setting with name groupName.
Example:
http://192.168.1.108/cgi-bin/userManager.cgi?action=getGroupInfo&name=admin
Response group.Name=admin
group.Memo=administrator group
goup. AuthorityList=<authList>
Comment Params in URL:
The device has one or two default user groups: “admin” or “admin” and “user”. The “admin” group has all the
authorities of operating the device. The “user” group only has monitoring and replaying authorities.
groupName: name of the group.
99
If the group named groupName does not exist, the device returns Error..

9.7.3 GetGroupInfoAll

URL Syntax http://<ip>/cgi-bin/userManager.cgi?action=getGroupInfoAll


Description Get information of all groups.
Response group[0].Name=admin
group[0].Memo=administrator group
group[0]. AuthorityList=<authList>
group[1].Name=user
group[1].Memo=user group
group[1]. AuthorityList=<authList>
group[2]….
Comment

9.7.4 AddUser

URL Syntax http://<ip>/cgi-bin/userManager.cgi?action=addUser&user.Name=<userName>&user.Password=<userPassword>&user.Gr


oup=<userGroup>&user.Sharable=<userSharable>[&user.Memo=<userMemo>&user.Reserved=<userReserved>]
Description Add a user
For example:
Add a user of name operator, password 123456, belongs to group user, and allow multi-point login.
http://192.168.1.108/cgi-bin/userManager.cgi?action=addUser&user.Name=operator&user.Password=123456&user.Group
=user&user.Sharable=true&user.Reserved=false
Response OK or Error
Comment Params in URL:
user.Group: string, the range is “admin” and “user”. In different group, the user has different authorities.
user.Sharable: bool, true means allow multi-point login.
User.Reserved: bool, true means this user can’t be deleted.

9.7.5 DeleteUser

URL Syntax http://<ip>/cgi-bin/userManager.cgi?action=deleteUser&name=<userName>


Description Delete user with name username.
Example:
http://192.168.1.108/cgi-bin/userManager.cgi?action=deleteUser&name=operator
Response OK or Error
Comment

100
9.7.6 ModifyUser

URL Syntax http://<ip>/cgi-bin/userManager.cgi?action=modifyUser&name=<UserName>&user.Password=<userPassword>&user.Memo


=<userMemo>&user.Group=<userGroup>&user.Reserved=<userReserved>&user.Sharable=<userSharable>
Description Modify user info
Example:
http://192.168.1.108/cgi-bin/userManager.cgi?action=modifyUser&name=operator&user.Password=123456&user.Group=ad
min
Response OK or Error
Comment User is identified by <UserName> and <userPassword>, other params are the same with AddUser.

9.7.7 ModifyPassword

URL Syntax http://<ip>/cgi-bin/userManager.cgi?action=modifyPassword&name=<username>&pwd=<newPwd>&pwdOld=<oldPwd>


Description Modify user password
Example:
http://192.168.1.108/cgi-bin/userManager.cgi?action=modifyPassword&name=operator&pwd=abcdef&pwdOld=123456
Response OK or Error
Comment old password oldPwd should be supplied, new password is newPwd.

9.7.8 GetUserInfo

URL Syntax http://<ip>/cgi-bin/userManager.cgi?action=getUserInfo&name=<userName>


Description Get use information with name username
Example:
http://192.168.1.108/cgi-bin/userManager.cgi?action=getUserInfo&name=admin
Response user.Name=admin
user.Memo=admin 's account
user.Group=admin
user.Reserved=true
user.Sharable=true
user. AuthList=<authList>
Comment

9.7.9 GetUserInfoAll

URL Syntax http://<ip>/cgi-bin/userManager.cgi?action=getUserInfoAll


Description Get information of all users.
Response users[0].Group=admin

101
users[0].Id=1
users[0].Memo=admin 's account
users[0].Name=admin
users[0].Reserved=true
users[0].Sharable=true
users[0]. AuthList=<authList>
users[1].Group=admin

Comment

9.7.10 GetActiveUserInfoAll

URL Syntax http:// <ip>/cgi-bin/userManager.cgi?action=getActiveUserInfoAll


Description Get active users.
Response users[0].name=admin
users[0].ip=10.43.2.16
users[0].group=admin
users[0].clienttype=web3.0
users[0].logintime=2011-11-08 09:51:03
Comment

9.8 System Operation

9.8.1 Reboot

URL Syntax http://<ip>/cgi-bin/magicBox.cgi?action=reboot


Description Reboot the device
Response OK or Error
Comment If successful, response OK. If fail, response Error.

9.8.2 Shutdown

URL Syntax http://<ip>/cgi-bin/magicBox.cgi?action=shutdown


Description Shutdown the device
Response OK or Error
Comment If successful, response OK. If fail, response Error.

102
9.8.3 GetDeviceType

URL Syntax http://<ip>/cgi-bin/magicBox.cgi?action=getDeviceType


Description Get the device type.
Response type=DVR
Comment

9.8.4 GetHardwareVersion

URL Syntax http://<ip>/cgi-bin/magicBox.cgi?action=getHardwareVersion


Description Get the device hardware version
Response version=1.00
Comment

9.8.5 GetSerialNo

URL Syntax http://<ip> /cgi-bin/magicBox.cgi?action=getSerialNo


Description Get the device serial number
Response sn=YZC0GZ05100020
Comment

9.8.6 GetMachineName

URL Syntax http://<ip>/cgi-bin/magicBox.cgi?action=getMachineName


Description Get the device machine name.
Response name=YZC0GZ05100020
Comment

9.8.7 GetSystemInfo

URL Syntax http://<ip>/cgi-bin/magicBox.cgi?action=getSystemInfo


Description Get the system information.
Response serialNumber= PA1FQ15900207
deviceType=27
processor= ST7108
Comment

103
9.8.8 GetVendor

URL Syntax http://<ip>/cgi-bin/magicBox.cgi?action=getVendor


Description Get the Vendor information.
Response vendor=Dahua
Comment

9.8.9 GetSoftwareVersion

URL Syntax http://<ip>/cgi-bin/magicBox.cgi?action=getSoftwareVersion


Description Get the software information.
Response version=2.212.0000.0.R,build:2013-11-14
Comment

9.8.10 GetBuildDate

This CGI is abandoned. It is replaced by GetSoftwareVersion to get the build information of software.
URL Syntax http://<ip>/cgi-bin/magicBox.cgi?action=getBuildDate
Description Get the build date information.
Response builddate=2013-04-22
Comment

9.8.11 GetCGIVersion

URL Syntax http://<ip>/cgi-bin/IntervideoManager.cgi?action=getVersion&Name=CGI


Description Get CGI version
Response version=2.0.0
Comment

9.8.12 GetOnvifVersion

URL Syntax http://<ip>/cgi-bin/ IntervideoManager.cgi?action=getVersion&Name=Onvif


Description Get onvif version
Response version=2.4.2
Comment

9.8.13 GetDeviceClass

URL Syntax http://<ip>/cgi-bin/magicBox.cgi?action=getDeviceClass

104
Description Get the Device Class.
Response class=HDVR
Comment

9.9 Log

9.9.1 StartFind

URL http://<ip>/cgi-bin/log.cgi?action=startFind&condition.StartTime=<start>&condition.EndTime=<end>
Syntax
Descriptio Start to find log
n Example:
Find log between 2011-1-1 12:00:00 and 2011-1-10 12:00:00, URL is:
http://192.168.1.108/cgi-bin/log.cgi?action=startFind&condition.StartTime=2011-1-1%2012:00:00&condition.EndTime=2011-1-1
0%2012:00:00
Response token=1
Comment Params in URL:
start/end: the start/end time of log. Format is: yyyy-mm-dd hh:mm:ss.
in response, there is a token for further log finding process.

9.9.2 DoFind

URL Syntax http://<ip>/cgi-bin/log.cgi?action=doFind&token=<tokenValue>&count=<logCount>


Description Find log with token tokenValue and count logCount
Example:
http://192.168.1.108/cgi-bin/log.cgi?action=doFind&token=1&count=100
Response found=2
items[0].RecNo=789
items[0].Time=2011-05-20 11:59:10
items[0].Type=ClearLog
items[0].User=admin
items[1].Detail.Compression=H.264->MJPG
items[1].Detail.Data=Encode
items[1].RecNo=790
items[1].Time=2011-05-20 11:59:21
items[1].Type=SaveConfig
items[1].User=System

Comment Params in URL:
The tokenValue is got by startFind in above section, logCount is the count of logs for this query.
The maximum value of logCount is 100.
105
Field in Response Description
found Count of found log, found is 0 if no log is found.
User User name
Type Log type
Time Time of this log
RecNo Log number.
Detail Log details.

9.9.3 StopFind

URL Syntax http://<ip>/cgi-bin/log.cgi?action=stopFind&token=<tokenValue>


Description Stop query log by token tokenValue
Example:
http://192.168.1.108/cgi-bin/log.cgi?action=stopFind&token=1
Response OK or Error
Comment

9.9.4 Clear

URL Syntax http://<ip>/cgi-bin/log.cgi?action=clear


Description Clear all the logs.
Response OK or Error
Comment

9.10 OnvifLoginCheck

9.10.1 GetOnvifLoginCheckConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=UserGlobal


Description Get User Global config
Response table.UserGlobal.OnvifLoginCheck=false
Comment

9.10.2 SetOnvifLoginCheckConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&UserGlobal.OnvifLoginCheck=<flag>


Description Enable onvif login check or not
Example:

106
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&UserGlobal.OnvifLoginCheck=true
Response OK or Error
Comment Params in URL:
<flag> range is {true, false}.

9.11 ConfigRestore

9.11.1 Restore

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=restore&names[0]=xxx&names[1]=yyy[&...]


Description Restore config
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=restore&names[0]=UPnP
Response OK or Error
Comment Params in URL:
xxx and yyy is config name which need to be restore

9.11.2 RestoreExcept

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=restoreExcept&names[0]=xxx&names[1]=yyy[&...]


Description Restore all config except several
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=restoreExcept&names[0]=UPnP
Response OK or Error
Comment Params in URL:
All the config file but xxx and yyy will be restored

9.12 Holiday

9.12.1 GetHolidayConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=Holiday


Description Get holiday config for record or snap.
Response table.Holiday.MonthMask[0]=3
table.Holiday.MonthMask[1]=0
table.Holiday.MonthMask[2]=0
table.Holiday.MonthMask[3]=0
table.Holiday.MonthMask[4]=0

107
table.Holiday.MonthMask[5]=0
table.Holiday.MonthMask[6]=0
table.Holiday.MonthMask[7]=0
table.Holiday.MonthMask[8]=0
table.Holiday.MonthMask[9]= 1610612739
table.Holiday.MonthMask[10]=0
table.Holiday.MonthMask[11]=0
Comment

9.12.2 SetHolidayConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set holiday config
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Holiday.MonthMask[0]=3
Response OK or Error
Comment Params in URL:
In below table,
monthIndex presents the index of a month. 0 presents January, 1 presents February, 11 presents December.

ParamName ParamValue type Description


Holiday.MonthMask[monthIndex] integer It is the mask of a month.Every bit present a day. For example, 0x0001
presents the first day of a month is holiday.0x0002 presents the second
day of a month is holiday, 0x0003 presents the first day and second day
of a month is holiday.

10 Storage

10.1 FileFinding

10.1.1 Create

URL Syntax http://<ip>/cgi-bin/mediaFileFind.cgi?action=factory.create


Description Create a media file finder
Response result= 2086170840
Comment

108
10.1.2 StartFind

URL Syntax http://<ip>/cgi-bin/mediaFileFind.cgi?action=findFile&object=<objectId>&condition.Channel=<channelNo>&condition.StartTim


e=<start>&condition.EndTime=<end>[&condition.Dirs[0]=<dir>&condition.Types[0]=<type>&condition.Flag[0]=<flag>&conditio
n.Events[0]=<event>&condition.VideoStream=<stream>]
Description Check if there are files that satisfy all the conditions.
Example:
Find file in channel 1, in directory “/mnt/dvr/sda0",event type is "AlarmLocal" or "VideoMotion", file type is “dav”, and time
between 2014-1-1 12:00:00 and 2015-1-10 12:00:00 , URL is:
http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=findFile&object=2086170840&condition.Channel=1&condition.Dirs[0]=/
mnt/dvr/sda0&condition.Types[0]=dav&condition.Events[0]=AlarmLocal&condition.Events[1]=VideoMotion&condition.StartTim
e=2014-1-1%2012:00:00&condition.EndTime=2015-1-10%2012:00:00&condition.VideoStream=Main
Response OK or Error
Comment Start to find file with the above condition. If files exist, return OK, else return Error.
Params in URL:
objected : The object Id is got from interface in Create
channelNo : in which channel you want to find the file .
start / end: the start/end time when recording.
dir : in which directories you want to find the file. It is an array. The index starts from 0. The range of dir is {“/mnt/dvr/sda0”,
“/mnt/dvr/sda1”}. This condition can be omitted. If omitted, find files in all the directories.
type : which types of the file you want to find. It is an array. The index starts from 0. The range of type is {“dav”, “jpg”, “mp4”}.
If omitted, find files with all the types.
flag : which flags of the file you want to find. It is an array. The index starts from 0. The range of flag is {“Timing”, “Manual”,
“Marker”, “Event”, “Mosaic”, “Cutout”}. If omitted, find files with all the flags.
event : by which event the record file is triggered. It is an array. The index starts from 0. The range of event is {“AlarmLocal”,
“VideoMotion”, “VideoLoss”, “VideoBlind”, “Traffic*”}. This condition can be omitted. If omitted, find files of all the events.
stream : which video stream type you want to find. The range of stream is {“Main”, “Extra1”, “Extra2”, “Extra3”}. If omitted,
find files with all the stream types.

10.1.3 FindNextFile

URL Syntax http://<ip>/cgi-bin/mediaFileFind.cgi?action=findNextFile&object=<objectId>&count=<fileCount>


Description Find the next files no more than fileCount..
Example:
http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=findNextFile&object=08137&count=100
Response found=1
items[0]. Channel =1
items[0]. StartTime =2011-1-1 12:00:00
items[0]. EndTime =2011-1-1 13:00:00
items[0]. Type =dav
items[0]. Events[0]=AlarmLocal
items[0]. VideoStream=Main
items[0]. FilePath =/mnt/dvr/sda0/2010/8/11/dav/15:40:50.jpg
109
items[0]. Length =790
items[0]. Duration = 3600
Comment The maximum value of fileCount is 100.

Field in Response Description


found Count of found file, found is 0 if no file is found.
Channel Channel
StartTime Start Time
EndTime End time
Type File type
Events Event type.
VideoStream Video Stream type.
FilePath File path.
Length File length
Duration Duration time

10.1.4 Close

URL Syntax http://<ip>/cgi-bin/mediaFileFind.cgi?action=close&object=<objectId>


Description Stop find.
Example:
http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=close&object=08137
Response OK or Error
Comment

10.1.5 Destroy

URL Syntax http://<ip>/cgi-bin/mediaFileFind.cgi?action=destroy&object=<objectId>


Description Destroy the media file finder.
Example:
http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=destroy&object=08137
Response OK or Error
Comment

10.2 Storage Device

10.2.1 GetStorageDevicePortInfo

URL Syntax http://<ip>/cgi-bin/storageDevice.cgi?action=factory.getPortInfo


Description Get the storage device port info
Response device port info
110
Total=2
Plug=1
Mask=1
Bad=0
Comment

10.2.2 GetStorageDeviceNames

URL Syntax http://<ip>/cgi-bin/storageDevice.cgi?action=factory.getCollect


Description Get all the storage device names
Response A list of all device names
list[0]=”/dev/sda0”
list[1]=”/dev/sda1”
list[2]=”/dev/sg1”
Comment

10.2.3 GetDeviceAllInfo

URL Syntax http://<ip>/cgi-bin/storageDevice.cgi?action=getDeviceAllInfo


Description Get all the storage device infos
Response list[0].Detail[0].IsError=false
list[0].Detail[0].Pointer=27023434
list[0].Detail[0].TotalBytes=0
list[0].Detail[0].Type=ReadWrite
list[0].Detail[0].UsedBytes=0
list[0].Pointer=22347602
list[0].State=Success
Comment

10.2.4 GetCaps

URL Syntax http://<ip>/cgi-bin/storage.cgi?action=getCaps


Description Get storage capabilities.
Response caps.RedundantDisk.Support=false
caps.SupportRemoteLimit=true
Comment

111
10.3 Work Group

10.3.1 GetWorkGroupCollect

URL Syntax http://<ip>/cgi-bin/workGroup.cgi?action=factory.getCollect


Description Get all the work group names
Response A list of all device names
list [0]=”group1”
list [1]=”group2”
list [2]=”group3”
Comment

10.4 Work Directory

10.4.1 GetWorkDirectoryCollect

URL Syntax http://<ip>/cgi-bin/workDirectory.cgi?action=factory.getCollect


Description Get all the work directory names
Response A list of all work directory names
list [0]=”dir1”
list [1]=”dir2”
list [2]=”dir3”
Comment

10.5 NAS

10.5.1 GetNASConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=NAS


Description Get all the directories on the NAS server.
Response table.NAS[0].Name=” FTP1”
table.NAS[0].Enable = true
table.NAS[0].Protocol =”FTP”
table.NAS[0].Address =”www.dahuatech.com”
table.NAS[0].Port =21
table.NAS[0].UserName =”anonymity”
table.NAS[0].Password =”none”
table.NAS[0].Directory =”share”

112
Comment

10.5.2 SetNASConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set NAS config
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&NAS[0].Name=nas01&NAS[0].Enable=true
Response OK or Error
Comment Params in URL:
In below table,
Head =NAS[index]
Index: The index of the NAS Server

ParamName ParamValue type Description


Head. Name string NAS name.
Head . Enable bool Enable/Disable the NAS.
Head. Protocol string The range is {“FTP”, “SMB”}
Head. Address string The IP address or host name.
Head. Port integer NAS port.
Head. UserName string NAS username.
Head. Password string NAS password.
Head. Directory string Directory name.

10.6 Storage Point

10.6.1 GetRecordStoragePointConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=RecordStoragePoint


Description Get Record Storage Point config
Response table.RecordStoragePoint [0].TimingRecord.Local =”local”
table.RecordStoragePoint [0].TimingRecord. Redundant =” Redundant”
table.RecordStoragePoint [0].TimingRecord. Remote =” FTP”
table.RecordStoragePoint [0].TimingRecord. AutoSync = false
table.RecordStoragePoint [0].TimingRecord. AutoSyncRange =0
table.RecordStoragePoint [0].TimingRecord. LocalForEmergency =false
table.RecordStoragePoint [0].TimingRecord. CompressBefore =15
Comment

113
10.6.2 SetRecordStoragePointConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set Record Storage Point config.
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&RecordStoragePoint[0].TimingRecord.Local=local
Response OK or Error
Comment Params in URL:
In below table,
ch = channel index,
recType :The range is {“TimingRecord”,” VideoDetectRecord”,” AlarmRecord”,” EventRecord”,” TimingSnapShot”,”
VideoDetectSnapShot”,” AlarmSnapShot”,” EventSnapShot”}

ParamName ParamValue type Description


RecordStoragePoint [ch].[recType].Local string Local directory name.
RecordStoragePoint [ch].[recType]. Redundant string Redundant directory name.
RecordStoragePoint [ch].[recType]. Remote string Remote directory name.
RecordStoragePoint [ch].[recType]. AutoSync bool When remote directory recovers, auto synchronize local
directory to remote directory or not.
RecordStoragePoint [ch].[recType]. AutoSyncRange integer From the remote directory recovering time, how long the
data needs to be synchronized. The unit is hour. If it is 0, all
the data needs to be synchronized.
RecordStoragePoint [ch].[recType]. LocalForEmergency bool When the remote directory is unusable, save the data the
local directory or not.
RecordStoragePoint [ch].[recType]. CompressBefore integer How many days’ data will be compressed.

10.6.3 GetStorageGroupConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=StorageGroup


Description Get Storage Group config
Response table.StorageGroup[0]. FileHoldTime =0
table.StorageGroup[0]. OverWrite =1
Comment

10.6.4 SetStorageGroupConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set Storage Group config
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&StorageGroup[0].Name=main
Response OK or Error

114
Comment Params in URL:
In below table,
Index = Storage Group index
ch = channel index

ParamName ParamValue type Description


StorageGroup[Index]. Name string Storage group name.
StorageGroup[Index]. Memo string Storage group memo.
StorageGroup[Index]. FileHoldTime integer How many days the file will be hold.
StorageGroup[Index]. OverWrite bool Over write or not when there is not enough storage.
StorageGroup[Index]. Channels[ch]. MaxPictures Integer The max pictures beyond which the old pictures will be over
written. If it is 0, the old pictures will be not over written.
StorageGroup[Index]. Channels[ch]. Path string The channel path.

11 Display

11.1 GUIConfig

11.1.1 GetGUIConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=GUISet


Description Get the GUI settings. Every video out screen has a group setting.
Response table.GUISet[index]. WindowAlpha =128
table.GUISet[index]. TimeTitleEnable =true
table.GUISet[index]. TimeTitlePos[0]=0
table.GUISet[index]. TimeTitlePos[1]=0
table.GUISet[index]. TimeTitlePos[2]=8191
table.GUISet[index]. TimeTitlePos[3]=8191
table.GUISet[index]. MenuShowOption =0
table.GUISet[index]. MenuAutoHideTime =10
table.GUISet[index]. AutoLogout =10
table.GUISet[index]. ChannelTitleShowEnable =true
table.GUISet[index]. ChannelTitlePos[0]=0
table.GUISet[index]. ChannelTitlePos[1]=0
table.GUISet[index]. ChannelTitlePos[2]=8191
table.GUISet[index]. ChannelTitlePos[3]=8191
table.GUISet[index]. AutoGuideEnable =true

Comment Params in Resp :
index: the array index which starts from 0.

115
11.1.2 SetGUIConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set the GUI settings. Every video out screen has a group setting.
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&GUISet[0].WindowAlpha=192&GUISet[0].TimeTitleEnable
=false&GUISet[0].MenuShowOption=1
Response OK or Error
Comment Params in URL:
The paramName and paramValue are in the below table.
in below table,
index : the array index which starts from 0.

ParamName ParamValue type Description


GUISet[index].WindowAlpha integer Diaphaneity of the window background.
GUISet[index].TimeTitleEnable bool Show the time title or not.
GUISet[index].TimeTitlePos[0] integer The position of the time title.
GUISet[index].TimeTitlePos[1] integer
GUISet[index].TimeTitlePos[2] integer
GUISet[index].TimeTitlePos[3] integer
GUISet[index].MenuShowOption integer 0: Show the directory.
1: Hide the directory.
2: Timing hide the directory.
GUISet[index].MenuAutoHideTime integer How many seconds to hide the directory.
GUISet[index].AutoLogout integer How many minutes to auto logout. The range is
[0-120]. 0 expresses not logout.
GUISet[index].ChannelTitleShowEnable bool Show the channel title or not.
GUISet[index].ChannelTitlePos[0] integer The position of the channel title.
GUISet[index].ChannelTitlePos[1] integer
GUISet[index].ChannelTitlePos[2] integer
GUISet[index].ChannelTitlePos[3] integer
GUISet[index].AutoGuideEnable bool Auto guide or not when startup.

11.2 Split

11.2.1 GetSplitMode

URL Syntax http://<ip>/cgi-bin/split.cgi?action=getMode&channel=<channelNo>


Description Get the split screen mode.
Example:

116
http://192.168.1.108/cgi-bin/split.cgi?action=getMode&channel=1
Comment Params in URL:
channelNo: the display screen No. Start from 1 and <= 2.
Response mode=split1
group=4

11.2.2 SetSplitMode

URL Syntax http://<ip>/cgi-bin/split.cgi?action=setMode&channel=<channelNo>&mode=<mode>&group=<group>


Description Set the split screen mode.
Comment Params in URL:
channelNo : the display screen No. Start from 1.
mode:enum{split1,split2,split4,split6,split8,split9,split12,split16,split20,split25,split36,split64,split144,pip1,pip3, "Free",
"CompositeSplit1" / "FitDisplayUnit1", "CompositeSplit1" / "FitDisplayUnit4"};
group : the No. of a group which contains certain number channels. For example, if 16 video channels display in split4
Mode which contains 4 video channels on Screen, then there are 4 groups and each group contains 4 video channels.
Response OK or Error

11.3 Monitor Tour

11.3.1 EnableMonitorTour

URL Syntax http://<ip>/cgi-bin/split.cgi?action=enableTour&channel=<channelNo>&enable=<flag>


Description Enable tour in every video channel on a screen or not.
Response OK or Error
Comment channelNo : the display screen No. Start from 1 and <= 2.
flag : true or false

11.3.2 GetMonitorTourConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=MonitorTour


Description Get Monitor Tour config.
Response table.MonitorTour[ch].Enable=128
table.MonitorTour[ch].Interval=true
table.MonitorTour[ch].Mask.Split1=0,1,5
table.MonitorTour[ch].Mask.Split8=0,1,5
table.MonitorTour[ch].Collections=Favortite1, Favortite2…
Comment

117
11.3.3 SetMonitorTourConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set Monitor Tour config.
Response OK or Error
Comment Params in URL:
The paramName and paramValue are in the below table.

ParamName ParamValue type Description


MonitorTour[ch].Enable bool MonitorTour or not.
MonitorTour[ch].Interval integer MonitorTour interval.
MonitorTour[ch].Mask.Split1 Channel array for split1
MonitorTour[ch].Mask.Split8 Channel array for split8
MonitorTour[ch].Collections Split collections

11.4 Monitor Collect

11.4.1 GetMonitorCollectionConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=MonitorCollection


Description Get monitor collection config.
Response table.MonitorCollection.collectionname. Mode=Split1
table.MonitorCollection.collectionname.Windows[winno].Enable= true
table.MonitorCollection.collectionname.Windows[winno].Device=device1
table.MonitorCollection.collectionname.Windows[winno].VideoChannel=5
table.MonitorCollection.collectionname.Windows[winno].VideoStream=Main
table.MonitorCollection.collectionname.Windows[winno].AudioChannel=5
table.MonitorCollection.collectionname.Windows[winno].AudioStream=Main

Comment Params in Resp :
winno : integer, the array index which equals to the window index in a screen and starts from 0.

11.4.2 SetMonitorCollectionConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set monitor collection config.
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&MonitorCollection.Favorite1.Mode=split4&MonitorCollect
ion.Favorite1.Windows[1].Enable= true&MonitorCollection.Favorite1.Windows[1].VideoChannel=2
118
Response OK or Error
Comment Params in URL:
The paramName and paramValue are in the below table.
In below table:
Collect= MonitorCollection.collectionname.
collectionname can be any name.
winno : integer, the array index which equals to the window index in a screen and starts from 0.

ParamName ParamValue type Description


Collect. Mode string The range is the same as SetSplitMode
Collect. Windows[winno]. Enable bool Enable the window or not.
Collect. Windows[winno]. Device string The device Id.
Collect. Windows[winno]. VideoChannel integer The video channel .
Collect. Windows[winno]. VideoStream string The range is {“Main”, “Extra1”, “Extra2”, “Extra3”,
“Auto”}.
Collect. Windows[winno]. AudioChannel integer The audio channel .
Collect. Windows[winno]. AudioStream string The range is {“Main”, “Extra1”, “Extra2”, “Extra3”,
“Auto”}.

11.5 VideoOut

11.5.1 GetVideoOutConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=VideoOut


Description Get Video Out config
Response head.Margin[0]=0
head.Margin[1]=0
head.Margin[2]=0
head.Margin[3]=0
head.Color.Brightness=50
head.Color. Contrast =50
head.Color. Satuation =50
head.Color. Hue =50
head.Mode. Width =800
head.Mode. Height=600
head.Mode. BPP =16
head.Mode. Format =”Auto”
head.Mode. RefreshRate =60…

Comment Params in Resp:

119
head = table.VideoOut[channel].
channel: video channel index

11.5.2 SetVideoOutConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set Video Out config
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&table.VideoOut[1].Color.Brightness=50
Response OK or Error
Comment Params in URL:
In below table,
head = table.VideoOut[channel].

channel: video channel index

ParamName ParamValue type Description


head. Margin[0] integer Margin
head. Margin[1]
head. Margin[2]
head. Margin[3]
head. Color.Brightness integer Brightness
head. Color.Contrast =50 integer Contrast
head. Color.Satuation =50 integer Satuation
head. Color.Hue =50 integer Hue
head. Mode.Width =800 integer Resolution
head. Mode.Height=600
head. Mode.BPP =16 integer
head. Mode.Format =”Auto” string The range is {“Auto”, “TV”, “VGA”, “DVI”}
head. Mode.RefreshRate =60 integer Refresh rate.

12 VideoFocus

12.1 AdjustFocus

URL Syntax http://<ip>/cgi-bin/devVideoInput.cgi?action=adjustFocus&focus=<focusNo>&zoom=<zoomNo>[&channel=<channelNo>]


Description Adjust the focus.
Example:
http://192.168.1.108/cgi-bin/devVideoInput.cgi?action=adjustFocus&focus=0.5&zoom=-0.5
Response OK or Error
120
Comment Params in URL:
focusNo : float, the range is between 0 and 1; -1 means reset to position 0.
zoomNo : float, the range is between 0 and 1; -1 means reset to position 0.
channelNo : integer, the video channel index which starts from 1.

12.2 AdjustFocusContinuously

URL http://<ip>/cgi-bin/devVideoInput.cgi?action=adjustFocusContinuously&focus=<focusNo>&zoom=<zoomNo>[&channel=<chan
Syntax nelNo>]
Descriptio Adjust focus continuously.
n
For example:
If we want to adjust focus, the API like this:
http:// 192.168.1.108/cgi-bin/devVideoInput.cgi?action=adjustFocusContinuously&focus=0.02&zoom=-1
and when the motor is moving, we send below command to let it stop:
http:// 192.168.1.108/cgi-bin/devVideoInput.cgi?action=adjustFocusContinuously&focus=0&zoom=-1
Response OK or Error
Comment Params in URL:
focusNo : float, the range is -1 < focus < 1; 0 means stop.
zoomNo : float, the range is -1 < zoom< 1; 0 means stop.
channelNo : integer, the video channel index which starts from 1.

The value means the moving speed of motor lens, positive value means move forwards, negative value means move backwards.
This command is used to drive the lens move continuously, until it reaches end. When the motor is moving, you send this
command again with focus or zoom parameter as 0, and then the motor will stop immediately. In this command when you adjust
the focus parameter, the zoom parameter should be -1, and the focus parameter should be -1 when adjust the zoom parameter.

12.3 AutoFocus

URL Syntax http://<ip>/cgi-bin/devVideoInput.cgi?action=autoFocus


Description Set device auto focus.
Response OK or Error
Comment

12.4 GetFocusStatus

URL Syntax http://<ip>/cgi-bin/devVideoInput.cgi?action=getFocusStatus


Description Get device focus status.
Response status.Focus=0.5
status.Zoom=0.5

121
status.Status=Normal
Comment Params in Resp :
The range of status.Status is “Normal” and “Autofocus”. This command must be continual executed until status.Status is
“Normal”.

12.5 getCurrentWindow

URL Syntax http://<ip>/cgi-bin/devVideoInput.cgi?action=getCurrentWindow&channel=<channelNo>


Description Get the coordinates of the current window.
Example:
http://192.168.1.108/cgi-bin/devVideoInput.cgi?action=getCurrentWindow&channel=1
Response rect[0]=500
rect[1]=500
rect[2]=5000
rect[3]=5000
Comment Params in URL:
channelNo : integer, the video channel index which starts from 1.
Params in Resp :
rect[n] : relative coordinates, range is 0-8192。{0,0,0,0} top-left,
{8192,0,0,0} top-right, {0,8192,0,0} bottom-left, {8192,8192,0,0} bottom-right

12.6 setCurrentWindow

URL Syntax http://<ip>/cgi-bin/devVideoInput.cgi?action=setCurrentWindow&channel=<channelNo>&rect[0]=<rect0>&rect[1]=<rect1>


&rect[2]=<rect2>&rect[3]=<rect3>
Description Set the coordinates of the current window.
Example:
http://192.168.1.108/cgi-bin/devVideoInput.cgi?action=setCurrentWindow&channel=1&rect[0]=0&rect[1]=0&rect[2]=5000
&rect[3]=5000
Response OK or Error
Comment Params in URL:
channelNo : integer, the video channel index which starts from 1.
rect0 & rect1 & rect2 & rect3 : relative coordinates, range is 0-8192。{0,0,0,0} top-left,
{8192,0,0,0} top-right, {0,8192,0,0} bottom-left, {8192,8192,0,0} bottom-right

122
13 Backup

13.1 ConfigBackup

URL Syntax http://<ip>/cgi-bin/Config.backup?action=All


Description Download all the settings of a device as a file named Config. Backup default.
Response HTTP/1.1 200 OK
CONTENT-LENGTH: 743087
CONNECTION: close
Content-type: application/binarytet-stream;charset=utf-8

{
"ATM" : {
"DataSource" : "RS232",
"DisplayPostion" : "lefttop",
"EncodeBlend" : true,
"PreviewBlend" : true,
"ProtocolAbility" : [ "POS" ],
"ProtocolName" : "ATM\/POS",
"RecordChannels" : [ 0, 1, 2, 3 ]
}
……
}
Comment

13.2 LogBackup

URL Syntax http://<ip>/cgi-bin/Log.backup?action=All&condition.StartTime=<startTime>&condition.EndTime=<endTime>


Description Download the log information between the start time and the end time as a file named Log. Backup default.
Example:
http://192.168.1.108/cgi-bin/Log.backup?action=All&condition.StartTime=2014-8-25%2000:02:32&condition.EndTime=202
0-8-25%2001:02:32
Response HTTP/1.1 200 OK
CONTENT-LENGTH: 743087
CONNECTION: close
Content-type: application/binarytet-stream;charset=utf-8

&w_User: default
&Time: 2014-09-01 15:20:45
&Type: VideoLoss
&Content: EventType: VideoLoss

123
channel:<8>
StartTime:2014-09-01 15:20:45


Comment Params in URL:
startTime /endTime : the start/end time when log info built. 24 hour Format, as: yyyy-mm-dd hh:mm:ss.
For example:
2014-8-25 00:02:32
2020-8-25 01:02:32

124
14 AccessControl

14.1 OpenDoor

URL Syntax http://<ip>/cgi-bin/accessControl.cgi?action=openDoor&channel=<channelNo>[&UserID=<UserID >&Type=<Type>]


Description Use this method to open door.
Example:
http://192.168.1.108/cgi-bin/accessControl.cgi?action=openDoor&channel=1&UserID=101&Type=Remote
Response OK or Error
Comment Params in URL:
channelNo : the index of door. Start from 1;
UserID : remote User ID;
Type : the open type; default value is “Remote”

14.2 GetDoorStatus

URL Syntax http://<ip>/cgi-bin/ accessControl.cgi?action=getDoorStatus&channel=< channelNo >


Description Use this method to get door status.
Example:
http://192.168.1.108/cgi-bin/ accessControl.cgi?action=getDoorStatus&channel=1
Response Info.status=Open
Comment Params in URL :
channelNo : the index of door. Start from 1;
Params in Resp :
status :the range is {Open, Break, Close}

14.3 AccessControlCard

14.3.1 find

URL Syntax http://<ip>/cgi-bin/recordFinder.cgi?action=find&name=AccessControlCard[&<paramName>=<paramValue>...]


Description Use this method to find the access control card record.
Example:
http://192.168.1.108/cgi-bin/recordFinder.cgi?action=find&name=AccessControlCard&condition.CardNo=111245&conditio
n.UserID=112&count=500
Response totalCount = 1000
found = 500
records [0].RecNo=789

125
records [0].CardNo =123456
records [0].UserID =101
records [0].CardStatus =0
records [0].CardType =0
Comment Params in URL:
The paramName and paramValue are in the below table.

Params in Resp :
totalCount : the number of records which match the conditions.
found : the number of records returned

ParamName ParamValue Description


type
count integer The record count, default 1024
condition.CardNo string Card Number
condition.UserID string User ID
condition. IsValid bool true or false

14.3.2 update

URL Syntax http://<ip>/cgi-bin/recordUpdater.cgi?action=update&name=AccessControlCard&recno=<recno>&<paramName>=<param


Value>[&<paramName>=<paramValue>...]
Description Use this method to update the access control card record.
Example:
http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=update&name=AccessControlCard&recno=121&UserID=111&CardSt
atus=1&CardType=2
Response OK or Error
Comment Params in URL:
recno : the index of record.
Other Params are in the below table.

ParamName ParamValue type Description


UserID integer User ID
CardStatus string The Card Status.
0 Normal , 1<<0 Report Lost , 1<<1 Cancel , 1<<2 Freeze,
1<<3 Debt , 1<<4 OverDue
CardType string The Card Type.
0 Normal Card, 1 VIP Card, 2 Visitor Card , 3 Patrol Card, 4 Blacklist Card 5 Stress Card
0xff Mother Card

126
14.3.3 insert

URL Syntax http://<ip>/cgi-bin/recordUpdater.cgi?action=insert&name=AccessControlCard&<paramName>=<paramValue>[&<paramN


ame>=<paramValue>...]
Description Use this method to insert the access control card record.
Example:
http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=insert&name=AccessControlCard&CardNo=121&UserID=111&CardSt
atus=1&CardType=2
Response OK or Error
Comment Params in URL:
recno : the index of record.
Other Params are in the below table.

ParamName ParamValue Description


type
CardNo string The card index
UserID integer User ID
CardStatus Integer The Card Status.
0 Normal , 1<<0 Report Lost , 1<<1 Cancel , 1<<2 Freeze,
1<<3 Debt , 1<<4 OverDue
CardType Integer The Card Type.
0 Normal Card, 1 VIP Card, 2 Visitor Card , 3 Patrol Card, 4 Blacklist Card 5 Stress Card
0xff Mother Card

14.3.4 remove

URL Syntax http://<ip>/cgi-bin/recordUpdater.cgi?action=remove&name=AccessControlCard&recno=<recno>


Description Use this method to remove the access control card record.
Example:
http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=update&name=AccessControlCard&recno=121
Response OK or Error
Comment Params in URL:
recno : the index of record.

14.3.5 getQuerySize

URL Syntax http://<ip>/cgi-bin/recordFinder.cgi?action=getQuerySize&name=AccessControlCard


Description Use this method to get the access control card record number.
Example:
http://192.168.1.108/cgi-bin/recordFinder.cgi?action=getQuerySize&name=AccessControlCard
127
Response count = 100
Comment

14.4 AccessControlCardRec

14.4.1 find

URL Syntax http://<ip>/cgi-bin/recordFinder.cgi?action=find&name=AccessControlCardRec[&<paramName>=<paramValue>...]


Description Use this method to find the records of control door.
Example:
http://192.168.1.108/cgi-bin/recordFinder.cgi?action=find&name=AccessControlCardRec&condition.CardNo=123456&
StartTime=2014-8-25%200:02:32&EndTime=2014-8-25%201:02:32&count=1000
Response totalCount = 1000
found = 500
records [0].RecNo=789
records [0].CardNo =123456
records [0].UserID =101
records [0].CreateTime=1386243731
records [0].Status =0
records [0].Method =1
records [0].Door =1
records [0].Password =654321
Comment Params in URL:
The paramName and paramValue are in the below table.
Params in Resp :
totalCount : the record count which match condition
found : the record count to return
Status : the control result; 0 fail , 1 succeed
Method: the way to open the door. 0 - password, 1 - card, 2 - first card then password, 3 - first password then card, 4 -
remote, 5 - button, 6 - fingerprint, 7 – password + card + fingerprint, 8 - password + fingerprint, 9 - card+ fingerprint, 11 –
more than one person open the door, 12 - key, 13 - Be forced to open the door with password.
Door: the door index;

ParamName ParamValue Description


type
count integer The record count, default 1024
condition.CardNo string Card Number
condition.StartTime string The start time, format : 2014-8-25%200:01:32
condition. EndTime sting The end time, format : 2014-8-25%200:02:32

128
14.5 Announcement

14.5.1 insert

URL Syntax http://<ip>/cgi-bin/recordUpdater.cgi?action=insert&name=Announcement&Content=<Content>&ExpirTime=<ExpirTime


>&IssueTime=<IssueTime>&Title=<Title>&User=<User>&State=<State>&ReadFlag=<ReadFlag>
Description Use this method to insert the Announcement record.
Example:
http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=insert&name=Announcement&Content=stringData&ExpirTime=20
12-01-01%2012:00:00&IssueTime=2012-01-01%2012:00:00&Title=Anounce1&User=101&State=0&ReadFlag=0
Comment Params in URL:
Content:Announcement Content
ExpirTime:the time when the Announcement expire,format: 2012-01-01%2012:00:00
IssueTime:Announcement issue time, format: 2012-01-01%2012:00:00
Title:title of the announcement
User:the number the Announcement issued to
State:the state of the Announcement. 0 init, 1 send , 2 overdue
ReadFlag: the read flag , 0 not read , 1 read.
Response Ok or Error

14.6 VideoTalkLog

14.6.1 find

URL Syntax http://<ip>/cgi-bin/recordFinder.cgi?action=find&name=VideoTalkLog[&condition.CallType=<Type>&condition.EndState=


<State>&count=<countNo>]
Description Use this method to find the VideoTalkLog record.
For example:
http://192.168.1.108/cgi-bin/recordFinder.cgi?action=find&name=VideoTalkLog&condition.CallType=Incoming&condion.E
ndState=Missed&count=500
Comment Params in URL:
Type: call type
State: end state of the call
countNo: the number of records to get

Params in Resp :
totalCount : the record count which match condition
found : the record count to return
CallType: call type. The range is {“Incoming”, “Outgoing” }.
EndState: the range is { “EndState” , “Received”}
Response totalCount=1000

129
found=500
records[0].RecNo=789
records[0].CreateTime=123456789
records[0].CallType=Incoming
records[0].EndState=Received
records[0].PeerNumber=501
……

14.7 AlarmRecord

14.7.1 find

URL Syntax http://<ip>/cgi-bin/recordFinder.cgi?action=find&name=AlarmRecord[&StartTime


=<startTime>&EndTime=<endTime>&count=<countNo>]
Description Use this method to find the AlarmRecord record.
Example:
http://192.168.1.108/cgi-bin/recordFinder.cgi?action=find&name=AlarmRecord&StartTime=2014-8-25%2000:02:32&End
Time=2014-8-25%2001:02:32&count=500
Comment Params in URL:
startTime: The start time ,format : 2014-8-25%2000:01:32
endTime: The end time,format : 2014-8-25%2000:02:32
countNo: the number of records to get, The record count, default 1024

Params in Resp :
totalCount : the record count which match condition
found : the record count to return
SenseMethod :the range is { "DoorMagnetism", "PassiveInfrared", "GasSensor", "SmokingSensor", "WaterSensor",
"ActiveInfrared", "CallButton", "UrgencyButton", "Steal", "Perimeter", "PreventRemove", "DoorBell" }

Response totalCount = 1000


found = 500
records [0].RecNo=789
records [0].CreateTime=123456789
records [0].Channel=0
records [0].SenseMethod=DoorMagnetism
records [0].RoomNumber=501
records [0].ReadFlag=0
records [0].Notes=Friend

130
15 DeviceDiscovery

15.1 DeviceDiscovery

URL Syntax http://<ip>/cgi-bin/deviceDiscovery.cgi?action=attach[&DeviceClass=<deviceClass>]


Description Discover Dahua devices on internet.
Example:
http://192.168.1.108/cgi-bin/deviceDiscovery.cgi?action=attach&DeviceClass=VTO
Response deviceInfo[index].AlarmInputChannels=8
deviceInfo[index].AlarmOutputChannels=0
deviceInfo[index].DeviceClass=VTO
deviceInfo[index].DeviceType=VTO2000A
deviceInfo[index].HttpPort=80
deviceInfo[index].IPv4Address.DefaultGateway=172.12.0.1
deviceInfo[index].IPv4Address.DhcpEnable=false
deviceInfo[index].IPv4Address.IPAddress=172.12.7.102
deviceInfo[index].IPv4Address.SubnetMask=255.255.0.0
deviceInfo[index].IPv6Address.DefaultGateway=2008::1
deviceInfo[index].IPv6Address.DhcpEnable=false
deviceInfo[index].IPv6Address.IPAddress=2008::6/112
deviceInfo[index].Mac=00:01:5b:01:44:77
deviceInfo[index].MachineName=YZZ4DZ008D00031
deviceInfo[index].Port=37777
deviceInfo[index].RemoteVideoInputChannels=0
deviceInfo[index].SerialNo=YZZ4DZ008D00031
deviceInfo[index].Vendor=Multi
deviceInfo[index].Version=1.200.0.0
deviceInfo[index].VideoInputChannels=1
deviceInfo[index].VideoOutputChannels=16
Comment Params in URL:
deviceClass : in range of {VTO, VTH, VTT, VTS, VTNC,SHG}
Params in Resp :
Index : the array index which starts from 0.
Version: SoftWare Version

16 VideoAnalyse
This chapter is only effective with smart IP Camera.

131
16.1 GetCaps

16.1.1 GetCaps

URL Syntax http://<ip>/cgi-bin/devVideoAnalyse.cgi?action=getcaps&channel=<channelNo>


Description Get dev Video Analyse capabilities.
Example:
http://192.168.1.108/cgi-bin/devVideoAnalyse.cgi?action=getcaps&channel=1
Response caps.CalibrateBoxs[0]=2
caps.CalibrateBoxs[1]=3
caps.ComplexSizeFilter=false
caps.MaxCelibateAreas=10
caps.MaxExcludeRegions=0
caps.MaxInternalOptions=512
caps.MaxModules=1
caps.MaxPointOfLine=20
caps.MaxPointOfRegion=20
caps.MaxRules=10
caps.MaxStaffs=4
caps.SpecifiedObjectFilter=true
caps.SupportedRules[0]=CrossLineDetection
caps.SupportedRules[1]=CrossRegionDetection
caps.SupportedRules[2]=LeftDetection
caps.SupportedRules[3]=TakenAwayDetection
caps.SupportedScene[0]=Normal
caps.SupportedScene[1]=FaceDetection
caps.SupportedScene[2]=VideoDiagnosis
caps.SupportedScenes.FaceDetection.SupportedCalibrateParams.Groud.HorizontalStaffs[0]=0
caps.SupportedScenes.FaceDetection.SupportedCalibrateParams.Groud.HorizontalStaffs[1]=0
caps.SupportedScenes.FaceDetection.SupportedCalibrateParams.Groud.VerticalStaffs[0]=0
caps.SupportedScenes.FaceDetection.SupportedCalibrateParams.Groud.VerticalStaffs[1]=0
Comment Params in URL:
channelNo : integer, the video channel index which starts from 1.

16.2 VideoAnalyseRule

16.2.1 GetVideoAnalyseRule

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=VideoAnalyseRule

132
Description Get Video Analyse Rules config.
Response head.Name= line1
head.Type=CrossLineDetection
head.VideoAnalyseRule[0][0].Enable =true
head.VideoAnalyseRule[0][0].EventHandler= (output of EventHandler is described in GetEventHandler)

Comment Params in Resp :
head =table.VideoAnalyseRule[ChannelNo] [RuleNo]
ChannelNo = video channel index.
RuleNo =rule index.

16.2.2 SetVideoAnalyseRule

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set Video Analyse Rules config.
For example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoAnalyseRule[0][0].Name=myAnalyseRule1&VideoAn
alyseRule[0][0].Type=CrossLineDetection
Response OK or Error
Comment Params in URL:
paramName and paramValue are as below table.
In below table, head =VideoAnalyseRule[ChannelNo] [RuleNo]
ChannelNo = video channel index.
RuleNo =rule index.
ParamName starts with head.Config is only effective with {“CrossLineDetection”, “CrossRegionDetection”, “LeftDetection”,
“TakenAwayDetection”}

ParamName ParamValue Description


type
head. Name string Rule name, it must be unique.
head. Type string The range is {“CrossLineDetection”, “CrossRegionDetection”, “LeftDetection”,”
“TakenAwayDetection”,”VideoAbnormalDetection”,“FaceDetection”,
,”AudioMutation”,”AudioAnomaly”,”VideoUnFocus”,”WanderDetection”,”
RioterDetection”,” ParkingDetection”,” MoveDetection”, “NumberStat”}”
head. Enable bool Enable/Disable this rule
head. EventHandler Setting of EventHandler is described in SetEventHandler

head. Config.DetectLine[0][0] integer The start point of DetectLine 0;


head. Config.DetectLine[0][1] integer The end point of DetectLine 0;
head. Config.DetectLine[1][0] integer The start point of DetectLine 1;
head. Config.DetectLine[1][1] integer The end point of DetectLine 1;
head. Config.Direction string The range is {“LeftToRight”, “RightToLeft”, “Both”}
head. Config .SizeFilter.MaxSize[0] integer Maximum width. The width of the object must not be beyond maximum width.
Adapt to {“CrossLineDetection”, “CrossRegionDetection”, “LeftDetection”,

133
“TakenAwayDetection”,“FaceDetection”,“WanderDetection”, “RioterDetection”,
“ParkingDetection”, “MoveDetection”}
head. Config .SizeFilter.MaxSize[1] integer Maximum height. The height of the object must not be beyond maximum height.
head. Config .SizeFilter.MinSize[0] integer Minimum width. The width of the object must not be less than minimum width.
head. Config .SizeFilter.MinSize[1] integer Minimum height. The height of the object must not be beyond minimum height.
head. Config.DetectRegion[0][0] integer The start point of DetectRegion 0;
Adapt to {“CrossRegionDetection”, “LeftDetection”, “TakenAwayDetection”,
“WanderDetection”,“RioterDetection”, “ParkingDetection”, “MoveDetection”}
head. Config.DetectRegion[0][1] integer The end point of DetectRegion 0;
head. Config.DetectRegion[1][0] integer The start point of DetectRegion 1;
head. Config.DetectRegion[1][1] integer The end point of DetectRegion 1;
head. Config.DetectRegion[2][0] integer The start point of DetectRegion 2;
head. Config.DetectRegion[2][1] integer The start point of DetectRegion 2;
head. Config. MinDuration integer Range is 1-600, adapt to {“LeftDetection”, “TakenAwayDetection”,
“WanderDetection”}.
Range is 10-300, adapt to {“RioterDetection”}.
Range is 6-300, adapt to {“ParkingDetection”}.
head. Config. Sensitivity integer Range is 1-10, adapt to {“RioterDetection”, “MoveDetection”}.
Head. Config. EnterThreshold integer Range is 0- 100000000, adapt to {“NumberStat”}.
Head. Config. ExitThreshold integer Range is 0- 100000000, adapt to {“NumberStat”}.
Head. Config. InsideThreshold integer Range is 0- 100000000, adapt to {“NumberStat”}.

16.3 VideoWidgetNumberStat

16.3.1 GetVideoWidgetNumberStat

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=VideoWidgetNumberStat


Description Get OSD config when display human number status information..
Response head.EncodeBlend=true
head.ShowEnterNum=true
head.ShowExitNum=true
head.TextAlign=0

Comment Params in Resp :
head =table.VideoWidgetNumberStat[ChannelNo]
ChannelNo =array index starts from 0, which means video channel.

16.3.2 SetVideoWidgetNumberStat

URL http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]

134
Syntax
Descripti Set OSD config when display human number status information.
on Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoWidgetNumberStat[0].EncodeBlend=true&VideoWidget
NumberStat[0].ShowEnterNum=true
Respons OK or Error
e
Commen Params in URL:
t paramName and paramValue are as below table.
In below table,
head =VideoWidgetNumberStat[ChannelNo]
ChannelNo = array index starts from 0, which means video channel.

ParamName ParamValue Description


type
head. EncodeBlend bool Enable/Disable
head. ShowEnterNum bool Enable/Disable
head. ShowExitNum bool Enable/Disable
head. TextAlign integer 0 for left, 2 for right

16.4 VideoEncodeROI

16.4.1 GetVideoEncodeROI

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=VideoEncodeROI


Description Get video encode config of region interested.
Response Head.DynamicTrack=false
Comment Params in Resp :
head=table.VideoEncodeROI[ChannelNo]
ChannelNo = array index starts from 0, which means video channel.

16.4.2 SetVideoEncodeROI

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Get video encode config of region interested.
For example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoEncodeROI[0].DynamicTrack=true
Response OK or Error
Comment Params in URL:
paramName and paramValue are as below table.

135
In below table,
head = VideoEncodeROI[ChannelNo]
ChannelNo = array index starts from 0, which means video channel.

ParamName ParamValue Description


type
head. DynamicTrack bool Enable/Disable

16.5 VideoStatServer

16.5.1 GetSummary

URL Syntax http://<ip>/cgi-bin/videoStatServer.cgi?action=getSummary[&channel=<channelNo>]


Description Get summary information of video Stat.
For example:
http://192.168.1.108/cgi-bin/videoStatServer.cgi?action=getSummary&channel=1
Response Summary information shown
summary.Channel=0
summary.RuleName=NumberStat
summary.EnteredSubtotal.Today=0
summary.EnteredSubtotal.Total=14
summary.EnteredSubtotal.TotalInTimeSection=0
summary.ExitedSubtotal.Today=0
summary.ExitedSubtotal.Total=32
summary.ExitedSubtotal.TotalInTimeSection=0
Comment Params in URL:
ChannelNo: array index starts from 1, which means video channel.

16.5.2 StartFind

URL Syntax http://<ip>/cgi-bin/videoStatServer.cgi?action=startFind[&channel=<channelNo>]&condition.StartTime=<start>&condition.E


ndTime=<end>&condition.Granularity=<granularity>
Description Start to find Video Stat info, in response, there is a token for further info finding process, and there is a totalCount shows how
many data count(s).
For example:
Find Video Stat info between 2011-1-1 12:00:00 and 2011-1-10 12:00:00, with information granularity is hour:
http://192.168.1.108/cgi-bin/videoStatServer.cgi?action=startFind&channel=1&condition.StartTime=2011-1-1%2012:00:00&c
ondition.EndTime=2011-1-10%2012:00:00&condition.Granularity=Hour
Response token=1
totalCount=14
136
Comment Params in URL:
channelNo : video channel No. starts from 1
start/end: the start/end time of Video Stat info. 24 hour Format, as: yyyy-mm-dd hh:mm:ss.
granularity: the information granularity returned by the query requirements. the range is {Hour, Day, Week, Month, Season,
Year}

16.5.3 DoFind

URL Syntax http://<ip>/cgi-bin/videoStatServer.cgi?action=doFind[&channel=<channelNo>]&token=<tokenValue>&beginNumber=<begin


Number>&count=<Count>
Description Find Video Stat info with channel, token, begin Number and count.
For example:
http://192.168.1.108/cgi-bin/videoStatServer.cgi?action=doFind&channel=1&token=1&beginNumber=0&count=14
Response found=14
info[0].Channel=0
info[0].EndTime=2015-07-06 00:59:59
info[0].EnteredSubtotal=0
info[0].ExitedSubtotal=0
info[0].RuleName=
info[0].StartTime=2015-07-06 00:00:00
info[1].Channel=0
info[1].EndTime=2015-07-06 01:59:59
info[1].EnteredSubtotal=0
info[1].ExitedSubtotal=0
info[1].RuleName=
info[1].StartTime=2015-07-06 01:00:00

Comment Params in URL:
channelNo : video channel index, start from 1
tokenValue : get by startFind in above section.
beginNumber : the start count, must between 0 and Count -1
Count : the count of info for this query.

16.5.4 StopFind

URL Syntax http://<ip>/cgi-bin/videoStatServer.cgi?action=stopFind&token=<tokenValue>[&channel=<channelNo>]


Description Stop query Video Stat by channel and token.
For example:
http://192.168.1.108/cgi-bin/videoStatServer.cgi?action=stopFind&channel=1&token=1
Response OK or Error
Comment Params in URL:
channelNo: video channel index, start from 1
137
tokenValue : get by startFind in above section.

138
17 Traffic

17.1 TrafficSnap

17.1.1 GetParkingSpaceStatus

URL Syntax http://<ip>/cgi-bin/trafficSnap.cgi?action=getParkingSpaceStatus&channel=<channelNo>&<paramName>=<paramValue>[&<


paramName>=<paramValue>...]
Description Get specific parking space(s) status
For example If want to get all parking space status, the url is
http://192.168.1.108/cgi-bin/trafficSnap.cgi?action=getParkingSpaceStatus&condition.Lane[0]=0&condition.Lane[1]=255
Response A list of parking space status
status[0].Lane=0
status[0].PictureId=5
status[0].TrafficCar.CountInGroup=1

status[1].Lane=1
status[1].PictureId=4
status[1].TrafficCar.CountInGroup=1

Comment Params in URL:
channelNo :the index of traffic Snap channel
paramName and paramValue are as below table.
In below table,
index : The index of type array, start from 0

Params in Resp :
TrafficCar : the members refer to TrafficCar

ParamName ParamValue type Description


condition. Lane[index] int The Lane value
condition. ResponseLevel int The Level value , refer to conditon

17.2 TrafficParking

17.2.1 GetAllParkingSpaceStatus

URL Syntax http://<ip>/cgi-bin/trafficParking.cgi?action= getAllParkingSpaceStatus

139
Description Get all valid parking spaces status of one device
For example If want to get all parking space status, the url is
http://192.168.1.108/cgi-bin/trafficParking.cgi?action=getAllParkingSpaceStatus
Response A list of parking space status
status[0].Lane=0
status[0]. CustomParkNo = A2701
status[0].Status = Park

status[1].Lane=1
status[1]. Status = NoPark

Comment Params in Resp :
Status : Park or NoPark

140
18 Radiometry

18.1 RadioMetry Config

18.1.1 GetHeatImagingThermometryConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=HeatImagingThermometry


Description Get HeatImagingThermometry Config
Response table.RelativeHumidity = 50
table.AtmosphericTemperature =20
table.ObjectEmissivity =1
table.ObjectDistance =100
table.ReflectedTemperature=20
table.TemperatureUnit= Centigrade
table.Isotherm.Enable=true
table.Isotherm.MaxValue=50
table.Isotherm.MinValue=0

table.Isotherm.ColorBarDisplay=true

table.HotSpotFollow=true

table.TemperEnable=true

Comment Params in Resp :


TemperatureUnit : the range is {"Centigrade" , "Fahrenheit"}

18.1.2 SetHeatImagingThermometryConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramVal


ue>...]
Description Set the HeatImagingThermometry config
Response OK or Error
Comment Params in URL:
paramName and paramValue are as below table.

Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&HeatImagingThermometry.RelativeHumidity=50&HeatImagin
gThermometry.ObjectDistance=20.3

ParamName ParamValue type Description


HeatImagingThermometry.RelativeHumidity integer The Relative Humidity range and step are get

from interface in getCaps

141
HeatImagingThermometry.AtmosphericTemperature float The Atmospheric Temperature range and step are

get from interface in getCaps


HeatImagingThermometry.ObjectEmissivity float The Object Emissivity range and step are get from

interface in getCaps
HeatImagingThermometry.ObjectDistance float The Object Distance range and step are get from

interface in getCaps
Unit is meter.
HeatImagingThermometry.ReflectedTemperature float The Reflected Temperature range and step are get

from interface in getCaps


HeatImagingThermometry.TemperatureUnit string Range is {Centigrade, Fahrenheit}.
HeatImagingThermometry.Isotherm. Enable bool true or false
HeatImagingThermometry.Isotherm. MaxValue float MaxValue range is get form interface in
getCaps. MaxValue must be bigger than
MinVaue
HeatImagingThermometry.Isotherm. MinValue float MinValue range is get form interface in
getCaps. MinValue must be smaller than
MaxVaue
HeatImagingThermometry.Isotherm. ColorBarDisplay bool true or false
HeatImagingThermometry.HotSpotFollow bool true or false
HeatImagingThermometry.TemperEnable bool true or false

18.1.3 GetThermometryRuleConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=ThermometryRule


Description Get Thermometry Rule.
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=ThermometryRule
Response head.Enable = true
head.PresetId =0
head.RuleId=0
head.Name=SpotName
head.Type =Spot
head.MeterRegion. Coordinates[PointNo] [0]= 0
head.MeterRegion. Coordinates[PointNo] [1]= 0
….

head.T=3
head.Alarm. Id=0
head.Alarm. Enable=true
head.Alarm. Result =Max
head.Alarm. AlarmCondition=Below
head.Alarm. Threshold=20.0
head.Alarm. Hysteresis=0.1

142
head.Alarm. Duration=30
head.LocalParameters.Enable=true
head.LocalParameters. ObjectEmissivity=0.95
head.LocalParameters. ObjectDistance=0.95
head.LocalParameters. RefalectedTemp=0
Comment Params in Resp :
head =table.ThermometryRule[ChannelNo] [RuleNo]
PointNo = point index
ChannelNo = video channel index.
RuleNo =rule index.
Alarm= AlarmSetting[AlarmNo]
AlarmNo = alarm index

18.1.4 SetThermometryRuleConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramVal


ue>...]
Description Set Thermometry Rule config
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&ThermometryRule[0] [0].Name=name1
Response OK or Error
Comment Params in URL:
The paramName and paramValue are as below table.
In below table,
head = ThermometryRule[ChannelNo] [RuleNo]
PointNo = point index
ChannelNo = video channel index.
RuleNo =rule index.
Alarm= AlarmSetting[AlarmNo]
AlarmNo = alarm index

ParamName ParamValue type Description


head. Enable bool Enable/Disable
head. PresetId integer Range [0- PresetMax]
PresetMax is get from interface in
GetCurrentProtocolCaps
head. RuleId integer Range [0- MaxNum]
MaxNum is get from interface in getCaps
head. Name string Radiometry rule name. char[64]
head. Type string Range is {Spot, Line,Area}
head. MeterRegion.Coordinates[PointNo] [0] integer Range [0-8091]
The Xscale of Region/Line point
head. MeterRegion.Coordinates[PointNo] [1] integer Range [0-8091]

143
The Yscale of Region/Line point
head. T integer Temperature Sample period. Unit is Second.
head. Alarm.Id integer Range [0- 65535],unique alarm id
head. Alarm.Enable bool Enable/Disable
head. Alarm.Result string Depend on the vaule of Type
Spot : {Vaule}
Line:{ Max,Min,Aver}

Area:{Max,Min,Aver,Std,Mid,ISO}
head. Alarm. AlarmCondition string Range is {Below, Match , Above }
head. Alarm. Threshold float Alarm threshold
head. Alarm. Hysteresis float Alarm hysteresis
head. Alarm. Duration integer The duration time of alarm.
Unit is second
head. LocalParameters.Enable bool Enable/Disable
head. LocalParameters. ObjectEmissivity float Range [0 -1]
Accuracy is 0.01
head. LocalParameters. ObjectDistance float Object distance
The range get from interface in getCaps
head. LocalParameters. ReflectedTemp float Object Reflected Temperature
The range get from interface in getCaps

18.1.5 GetHeatImagingTemperConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=HeatImagingTemper


Description Get Heat Imaging Temper config
Response head.Enable=false
head.EventHandler. paramName = paramValue
Comment Params in Resp:
head= table.HeatImagingTemper[Channel]
Channel: video channel number

18.1.6 SetHeatImagingTemperConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set HeatImagingTemper config
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&HeatImagingTemper[0].Enable=false&HeatImagingTemper
[0].EventHandler.BeepEnable=false
Response OK or Error
Comment Params in URL:

144
paramName and paramValue are as below table.
In below table,
head= HeatImagingTemper[Channel]
Channel=array index, means video channel number

ParamName ParamValue type Description


head. Enable bool Enable/Disable Heat Imaging Temper feature.

head. EventHandler Setting of EventHandler is described in SetEventHandler

18.2 GetCaps

URL Syntax http://<ip>/cgi-bin/RadiometryManager.cgi?action=getCaps[&channel=<channelNo>]


Description Get the Capabilities of Radiometry Manager.
Example:
http://192.168.1.108/cgi-bin/RadiometryManager.cgi?action=getCaps&channel=1
Response caps.TotalNum.MaxNum=8
caps.TotalNum.Spot.MaxSpots=8
caps.TotalNum.Line.MaxLines=1
caps.TotalNum.Area.MaxAreas=8
caps.TemperPresets.MaxPresets=256
caps.MeterInfo.Type[0u]=Spot
caps.MeterInfo.Type[1u]=Area
caps.MeterInfo.ObjectEmissivity.Max=100
caps.MeterInfo.ObjectEmissivity.Min=0
caps.MeterInfo.ObjectEmissivity.Default=0
caps.MeterInfo.ObjectEmissivity.Step=1
caps.MeterInfo.ObjectDistanceMeter.Max=100
caps.MeterInfo.ObjectDistanceMeter.Min=0
caps.MeterInfo.ObjectDistanceMeter.Default=0
caps.MeterInfo.ObjectDistanceMeter.Step=1
caps.MeterInfo. ReflectedTemperature.Max=100
caps.MeterInfo. ReflectedTemperature.Min=0
caps.MeterInfo. ReflectedTemperature.Default=0
caps.MeterInfo. ReflectedTemperature.Step=1
caps.MeterInfo. RelativeHumidity.Max=100
caps.MeterInfo. RelativeHumidity.Min=0
caps.MeterInfo. RelativeHumidity.Default=0
caps.MeterInfo. RelativeHumidity.Step=1
caps.MeterInfo. AtmosphericTemperature.Max=100
caps.MeterInfo. AtmosphericTemperature.Min=0
caps.MeterInfo. AtmosphericTemperature.Default=0
caps.MeterInfo. AtmosphericTemperature.Step=1
caps.Statistics. MinPeriod=60

145
caps.Isotherm.MaxTemp=327.0
caps.Isotherm.MinTemp=-20.0
Comment Params in URL:
channelNo : the channel index; start from 1
Params in Resp :
Type : the range is { "Spot", "Line", "Area" }
MinPeriod :Unit is Second.

18.3 GetRandomPointTemper

URL Syntax http://<ip>/cgi-bin/RadiometryManager.cgi?action=getRandomPointTemper&channel=<channelNo>&coordinate[0]=x


&coordinate[1]=y
Description Ger temperature values of random point.
For example:
http://192.168.1.108/cgi-bin/RadiometryManager.cgi?action=getRandomPointTemper&channel=1&coordinate[0]=1024&
coordinate[1]=1024

Response TempInfo.Type=Spot

TempInfo.TemperAver=27.5

Comment Params in URL:


channelNo :the index of video channel, start from 1
x : The Xscale of the point
y : The Yscale of the point

18.4 GetTemper

URL Syntax http://<ip>/cgi-bin/RadiometryManager.cgi?action=getTemper&<paramName>=<paramValue>[&<paramName>=<pa


ramValue>...]
Description Ger temperature values from rules which have been set.
For example If want to get temperature values, the url is
http://192.168.1.108/cgi-bin/RadiometryManager.cgi?action=getTemper&condition.PresetId=0&condition.RuleId=0&co
ndition.Type=Spot&condition.Name=Spot1&condition.channel=1
Response TempInfo.Type=Spot
TempInfo.TemperAver=27.5
Comment Params in URL:
paramName and paramValue are as below table

ParamName ParamValue type Description


condition. Channel integer Channel index. Start from 1
condition. PresetId integer Range [0- PresetMax]
PresetMax is get from interface in
GetCurrentProtocolCaps

146
condition. RuleId integer Range [0- MaxNum]
MaxNum is get from interface in getCaps
condition. Type string Range is {Spot, Line,Area}
condition. Name string Name is get from interface in
GetThermometryRuleConfig

19 Thermography

19.1 Thermography Config

19.1.1 GetThermographyOptionsConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=ThermographyOptions


Description Thermography options contain EZoom, Colorization, SmartOptimizer and so on
Response head.EZoom=0
head.Colorization=White Hot
head.SmartOptimizer=10
head.OptimizedRegion. Type=Custom
head.OptimizedRegion. Enable= true
head.OptimizedRegion. Regions[i][0u]=0
head.OptimizedRegion. Regions[i][1u]=0
head.OptimizedRegion. Regions[i][2u]=0
head.OptimizedRegion. Regions[i][3u]=0
head.Agc=10
head.AgcMaxGain=10
head.AgcPlateau=10
head.Mode=”HighTemperature”
head.Auto.LowToHigh=13
head.Auto.LHROI=15
head.Auto.HighToLow=12
head.Auto.HLROI=95
Comment Params in Resp:
head = table.ThermographyOptions [ChannelNo][0]
ChannelNo = video channel index
Regions: the region is a rectangle
i : the array index starts from 0.

147
19.1.2 SetThermographyOptionsConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Description Set thermography options
Example:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&ThermographyOptions[0][0].OptimizedRegion.Type=Gound
Response OK or Error
Comment Params in URL:
paramName and paramValue are as below table.
In the below table.
head = ThermographyOptions[ChannelNo][0]
ChannelNo = video channel index.
i = the array index starts from 0.

ParamName ParamValue Description


type
head. EZoom integer Range is [0~24]
range and step are get from interface in getCaps
head. Colorization String Range is {“White Hot”,“Black Hot”,“Ironbow2”, “IceFire”,…}

range and step are get from interface in getCaps


head. SmartOptimizer integer Range is [0 ~100]
range and step are get from interface in getCaps
head. OptimizedRegion.Type String Range is {“Full Screen”,“Sky”, “Ground”, “Horizontal”,“Center 75%”,

“Center 50%”,“Center 25%”, “Custom”}


head. OptimizedRegion.Enable bool true: enable
false: unenable
head. OptimizedRegion.Regions[i][0u] integer Range is [0~8191].
i the region index.start from 0
head. OptimizedRegion.Regions[i][1u] integer Range is [0~8191].
i the region index.start from 0
head. OptimizedRegion.Regions[i][2u] integer Range is [0~8191].
i the region index.start from 0
head. OptimizedRegion.Regions[i][3u] integer Range is [0~8191].
i the region index.start from 0
head. Agc integer Range is [0-255]
range and step are get from interface in getCaps
head. AgcMaxGain integer Range is [0-255]
range and step are get from interface in getCaps
head. AgcPlateau integer range and step are get from interface in getCaps
head. Mode string Range is{ "HighTemperature","LowTemperature","Auto"}
head. Auto.LowToHigh integer UInt32
head. Auto.LHROI integer UInt32, percentage range is[0-100]

148
head. Auto.HighToLow integer UInt32
head. Auto.HLROI integer UInt32, percentage range is[0-100]

19.2 GetExternSystemInfo

URL Syntax http://<ip>/cgi-bin/ThermographyManager.cgi?action=getExternSystemInfo&channel=<channelNo>


Description Ger Extern System Info.
For example:
http://192.168.1.108/cgi-bin/ThermographyManager.cgi?action=getExternSystemInfo&channel=1
Response sysInfo. SerialNumber = 11111111123
sysInfo. SoftwareVersion = 2222222222222
sysInfo. FirmwareVersion= 3333333333333
sysInfo. LibVersion = 4444444444
Comment Params in URL:
channelNo : the index of video channel, start from 1

Params in Resp:
SerialNumber : string
SoftwareVersion: string
FirmwareVersion: string
LibVersion : string

19.3 GetPresetParam

URL Syntax http://<ip>/cgi-bin/ThermographyManager.cgi?action=getPresetParam&channel=<channelNo>&mode=<modeType>


Description Set the preset mode and return the preset mode info.
For example:
http://192.168.1.108/cgi-bin/ThermographyManager.cgi?action=getPresetParam&channel=1&mode=Default
Response presetInfo.Brightness = 50
presetInfo.Sharpness= 50
presetInfo.EZoom= 12
presetInfo.ThermographyGamma= 0
presetInfo.Colorization= “White Hot”
presetInfo.SmartOptimizer= 10
presetInfo OptimizedRegion. Type= Full Screen
presetInfo.OptimizedRegion. Enable= Full Screen
presetInfo.OptimizedRegion. Regions[i][0u]=0
presetInfo.OptimizedRegion. Regions[i][1u]=0
presetInfo.OptimizedRegion. Regions[i][2u]=0
presetInfo.OptimizedRegion. Regions[i][3u]=0
presetInfo.Agc= 10
presetInfo.AgcMaxGain=10
149
presetInfo.AgcPlateau = 10
Comment Params in URL:
channelNo : the index of video channel, start from 1
modeType : depends on capability , get from interface in getCaps
Params in Resp :
Regions : the region is a rectangle
i : the array index.

19.4 GetCaps

URL Syntax http://<ip>/cgi-bin/ThermographyManager.cgi?action=getCaps&channel=<channelNo>


Description Get thermography capability.
For example:
http://192.168.1.108/cgi-bin/ThermographyManager.cgi?action=getCaps&channel=1
Response caps.PresetModes = Indoor
caps.Brightness.Max = 100
caps.Brightness.Min = 0
caps.Brightness.Step = 1
caps.Sharpness.Max= 100
caps.Sharpness.Min = 0
caps.Sharpness.Step = 5
caps.EZoom.Max= 24
caps.EZoom.Min = 0
caps.EZoom.Step = 1
caps. ThermographyGamma.Max= 8
caps. ThermographyGamma.Min = -8
caps. ThermographyGamma.Step = 1
caps. SmartOptimizer.Max= 100
caps. SmartOptimizer.Min = 0
caps. SmartOptimizer.Step = 5
caps. Agc.Max= 255
caps. Agc.Min = 0
caps. Agc.Step = 5
caps. AgcMaxGain.Max= 255
caps. AgcMaxGain.Min = 0
caps. AgcMaxGain.Step = 5
caps. AgcPlateau.Max= 100
caps. AgcPlateau.Min = 0
caps. AgcPlateau.Step = 5
caps.PresetColorization[i]= Ironbow2
caps.PresetROIModes[j]= Full Screen
Comment Params in URL:
channelNo: the index of video channel, start from 1.

150
Params in Resp:
PresetModes : the preset mode. Range is { "Indoor", "Outdoor", "Default" }

PresetColorization: Preset colorization mode. Range is


{ "WhiteHot","BlackHot","Fusion","Rainbow","Globow","Ironbow1","Ironbow2","Sepia","Co
lor1","Color2","Icefire","Rain","RedHot","GreenHot"}.

PresetROIModes : Preset ROI mode. Range is {"Full Screen”, “Sky", "Ground", "Horizontal",

"Center 75%", "Center 50%","Center 25%", "Custom"}

19.5 GetOptimizedRegion

URL Syntax http://<ip>/cgi-bin/ThermographyManager.cgi?action=getOptimizedRegion&channel=<channelNo>


Description Get optimized region info.
For example:
http://192.168.1.108/cgi-bin/ThermographyManager.cgi?action=getOptimizedRegion&channel=1
Response optimizedRegion.Type= Full Screen
optimizedRegion.Enable= true
optimizedRegion.Regions[i][0u]=0
optimizedRegion.Regions[i][1u]=0
optimizedRegion.Regions[i][2u]=0
optimizedRegion.Regions[i][3u]=0
Comment Params in URL:
channelNo : the index of video channel, start from 1

Params in Resp:
Regions : the region is a rectangle
i: the region index.

19.6 EnableShutter

URL Syntax http://<ip>/cgi-bin/ThermographyManager.cgi?action=enableShutter&channel=<channelNo>&enable=<enable>


Description Shutter control, whether enable shutter.
For example:
http://192.168.1.108/cgi-bin/ThermographyManager.cgi?action=enableShutter&channel=1&enable=true
Response OK or Error
Comment Params in URL:
channelNo: the index of video channel, start from 1
enable: true or false. true enable, false disable.

151
20 HeatMap

20.1 GetPicByTime

URL Syntax http://<ip>/cgi-bin/heatMap.cgi?action=getPicByTime&channel=<channelNo>&StartTime=<start>&EndTime=<end>


Description Get binary data of heat map.
Example:
http://192.168.1.108/cgi-bin/heatMap.cgi?action=getPicByTime&channel=1&StartTime=2015-08-20%2000:00:00&EndTime=2
015-08-21%2023:59:59
Response Content-Type: application/binarytet-stream
Content-Length:<heatMap size>
<HeatMap Data>

Comment Params in URL:


ChannelNo: video channel index, start from 1.
start/end: the start/end time of Heat Map info. 24 hour Format, as: yyyy-mm-dd hh:mm:ss.

Params in Resp:
heatMap size : width*height+16。
HeatMap Data
0 1 2 3 4 … 15 16 17 18 …
Width Height Reserved Data: every byte symbolize a pixel

21 VideoTalkPeer

21.1 attachState

URL Syntax http://<ip>/cgi-bin/VideoTalkPeer.cgi?action=attachState


Description Subscribe the video talk status. When client disconnect, it will unsubscribe.
Comment Param out:
State: in range of {“Ringing“,“Inviting“,“Answer“,“Refuse“,“Cancel“,“Hangup“,
“Busying“ }

Example:
http://172.23.2.108/cgi-bin/VideoTalkPeer.cgi?action=attachState
Response Notify the state:

152
SID=315
state.State=Answer
state.Talkback.Pack=RTP
state.Talkback.Protocol=UDP
state.Talkback.Type=Talk
state.Talkback.Audio.AudioPort=6000
state.Talkback.Audio.Format[0].Compression=PCM
state.Talkback.Audio.Format[0].Frequency=44000
state.Talkback.Audio.Format[0].Depth=16
state.Talkback.Audio.Format[1].Compression=G.711A
state.Talkback.Audio.Format[1].Frequency=44000
state.Talkback.Audio.Format[1].Depth=16
state.Talkback.Video.VideoPort=7000
state.Talkback.Video.Format[0].Compression=H.264
state.Talkback.Video.Format[0].Frequency=90000
state.Talkback.Video.Format[1].Compression=MJPG
……
state.Talkback. MediaAddr=224.10.10.10

21.2 detachState

URL Syntax http://<ip>/cgi-bin/VideoTalkPeer.cgi?action=detachState&SID=<sid>


Description Subscribe the video talk status.
Comment Param in:
sid: the subscribe id, which is the resonpse of attachState
Example:
http://172.23.2.108/cgi-bin/VideoTalkPeer.cgi?action=attachState&SID=101
Response OK/Error

21.3 invite

URL Syntax http://<ip>/cgi-bin/VideoTalkPeer.cgi?action=invite[&Talkback.Protocol=<protocol>&Talkback.Type=<type>&Talkback.Me


diaAddr=<addr>…]
Description Use this method to start the video talk conversation.
Comment Param in:
below are the descriptions of the video talk conversation:
protocol: the transmit protocol
type: video talk type.
153
addr: addr to get stream

For example:
http://<ip>/cgi-bin/VideoTalkPeer.cgi?action=invite&Talkback.Protocol=UDP&Talkback.Type=Talk&Talkback.MediaAddr=2
24.10.10.10
or
http://<ip>/cgi-bin/VideoTalkPeer.cgi?action=invite
Response OK or Error

21.4 cancel

URL Syntax http://<ip>/cgi-bin/VideoTalkPeer.cgi?action=cancel


Description Use this method to cancel video talk conversation.
Comment Param in:

For example:
http://<ip>/cgi-bin/VideoTalkPeer.cgi?action=cancel
Response OK or Error

21.5 answer

URL Syntax http://<ip>/cgi-bin/VideoTalkPeer.cgi?action=answer&Talkback.Protocol=<protocol>&Talkback.Type=<type>&Talkback.Me


diaAddr=<addr>…
Description Use this method to answer the call.
Comment Param in:
below are the descriptions of the video talk conversation:
protocol: the transmit protocol
type: video talk type.
addr: addr to get stream

For example:
http://<ip>/cgi-bin/VideoTalkPeer.cgi?action=answer&Talkback.Protocol=UDP&Talkback.Type=Talk&Talkback.MediaAddr
=224.10.10.10
Response OK or Error

154
21.6 refuse

URL Syntax http://<ip>/cgi-bin/VideoTalkPeer.cgi?action=refuse


Description Use this method to refuse answer the calling .
Comment For example:
http://<ip>/cgi-bin/VideoTalkPeer.cgi?action=refuse
Response OK or Error

21.7 hangup

URL Syntax http://<ip>/cgi-bin/VideoTalkPeer.cgi?action=hangup


Description When the conversation is over, use this method to close it.
Comment For example:
http://<ip>/cgi-bin/VideoTalkPeer.cgi?action=hangup
Response OK or Error

22 Abandoned APIs
This chapter contains unsupported APIS. If is wanted, the API can be supported after redesigned.

22.1 Get Video Detect Caps

URL Syntax http://<ip>/cgi-bin/devVideoDetect.cgi?action=getCaps&channel=<channelNo>


Description Get video detect capabilities. This API comes from IPC but not used.
Example:
http://192.168.1.108/cgi-bin/devVideoDetect.cgi?action=getCaps&channel=1
Response caps.DetectVersion[0]=V1.0
caps.DetectVersion[1]=V3.0
caps.MotionColumns=22
caps.MotionDetectWindow=4
caps.MotionLinkPtzPattern=true
caps.MotionLinkPtzPreset=true
caps.MotionLinkPtzTour=true
caps.MotionResult=1
caps.MotionRows=18
caps.SupportBlind=1
caps.SupportLoss=0
caps.SupportMotion=1

155
Comment Get video detect capabilities, channelNo is video channel No. starts from 1 .
Notice that When your device is using V1.0 V2.0 Motion detection, you cannot get any reply while executing the
command.

22.2 GetChannelInState

URL Syntax http://<ip>/cgi-bin/alarm.cgi?action=getInStates&channel=<channelNo>


Description Get alarm input state for channelNo
Example:
http://192.168.1.108/cgi-bin/alarm.cgi?action=getInStates&channel=1
Response result=1
Comment Params in URL:
channelNo: alarm channel index, starts from 0, and must be less than alarm input channels obtained from GetInSlots.

Result 1 means alarm is present, 0 means alarm is not present.

22.3 GetChannelOutState

URL Syntax http://<ip>/cgi-bin/alarm.cgi?action=getOutStates&channel=<channelNo>


Description Get alarm output state for channelNo
Example:
http://192.168.1.108/cgi-bin/alarm.cgi?action=getOutStates&channel=1
Response result=0
Comment Params in URL:
channelNo: alarm channel index, starts from 0, and must be less than alarm input channels obtained from GetOutSlots.

Result 1 means alarm is present, 0 means alarm is not present.

22.4 GetUUID

URL Syntax http://<ip>/cgi-bin/magicBox.cgi?action=getUUID


Description Get the UUID
Response uuid:7b9da892-7da2-48dd-aae1-3ee0c50b36f0
Comment

22.5 SetStorageDevice

URL Syntax http://<ip>/cgi-bin/storageDevice.cgi?action=setDevice&pointer=xxx&type=xxx


Description Set to storage device

156
Example:
http://192.168.1.108/cgi-bin/storageDevice.cgi?action=setDevice&pointer=27023434&type=Lock
Response OK or Error: No SD Card
Comment Params in URL:
type: Range is {Lock, UnLock, FormatPatition, UnMount }. pointer: The object Id is got from cgi
API(cgi-bin/storageDevice.cgi?action=getDeviceAllInfo).If type is Lock or UnLock, pointer is list[0].Detail[0].Pointer, If If type
is FormatPatition or UnMount, pointer is list[0].Pointer.
*After formation operation, the device would reboot.

23 Appendix

23.1 Stream Format

The Stream format is used by 4.1.9 GetStream By Http and 4.1.10 Playback By Http, describes the format of the data stream.
Stream Header:

Byte
0 1 2 3 4 5 6 7
Order

Key Flag Type reserved packet length

Byte
8 9 10 11 12 13 14 15
Order

Extend header
Key channel Sequence
length

Byte
16 17 18 19 20 21 22 23
Order

Check
Key utc utcms reserved
sum
Flag=”DH”;
Type=0x10 means the audio packet;
Type=0x20 means the video packet;
Packet length means the packet total length, contains the packet header, maybe one or more extend header, and the media data.

157
23.2 Extend Header Format

Byte
0 1 2 3 4 5 6 …
Order

Key Type length reserved data


Extend header length must be multiple of 4 bytes;

23.2.1 Audio extend header

Byte
0 1 2 3 4 5 6 7
Order

Audio Sample
Key 0x11 8 reserved Tracks reserved
Type Freq
A audio packet must contain the audio extend header;
Audio Type: 1 - PCM8; 2 - G729; 3 - IMA_ADPCM; 4 - G711U; 5 - G721; 6 - PCM8_VWIS; 7 - MS_ADPCM; 8 - G711A; 9 - AMR-NB; 10 -
PCM16; 11- G723.1; 12 – AAC; 13 - G726_40; 14 - G726_32; 15 - G726_24; 16 - G726_16
Tracks: Tracks number, support 1 and 2;
Sample Freq: audio sample frequence, 1 - 4000; 2 - 8000; 3 - 11025; 4 - 16000; 5 - 20000; 6 - 22050; 7 - 32000; 8 - 44100; 9 - 48000;

23.2.2 Video Extend Header:

Byte
0 1 2 3 4 5 6 7
Order

Video Frame
Key 0x21 16 reserved Width
Type Type

Byte
8 9 10 11 12 13 14 15
Order

I Frame Frame
Key Height reserved
Interval Rate
A video packet must contain the video extend header; Video Type means the video codec type, 1-MPEG4; 2-H.264; Frame Type: 1-I frame;
2-P frame; 3-B frame; Width and Height describe the frame width and height by pixel;

158
23.2.3 Channel Title Extend Header:

Byte
0 1 2 3 4 5 6 …
Order

Key 0x22 len reserved Title …


When a stream begin, or the device channel title changes, the video packet must contain the channel title extend header; If the channel
title is Chinese, it only support utf8 format.

23.2.4 TimeZone Extend Header:

Byte
0 1 2 3 4 5 6 7
Order

Daylight
Key 0x31 8 reserved Time Zone saving reserved
time
When a stream begin, or the Time Zone changes, the video packet must contain the Time Zone extend header; Time Zone[0]:
[-12,12](west time zone 12 to east time zone 12), Time Zone[1] modify the time by minutes; Daylight saving time: 1/0, yes or not in daylight
saving time;

23.2.5 Event Flag Extend Header:

Byte
0 1 2 3 4 5 6 …
Order

Key 0x23 len reserved Event Flag


If the video frame contain one or more event flags, the video packet should contain the Event Flag Extend Header. The event flag means
what event had happened by set the bit as 1;
Event Flag: bit0-exterior alarm; bit1-move detect; bit2-video lost.

159

You might also like