NVSCGI API

Jul 20, 2009 - For example, admin=admin. It will display all user names line by line. If request parameter is name. Name. Value. Description password.
272KB taille 4 téléchargements 353 vues
Network Video Server CGI Application Programming Interface (NVSCGI API) Ver. 1.0

Document History Version

Date

Comment

0.1

2008/10/8

Initial the document for NVSCGI API

0.2

2008/10/21

Modify

0.3

2008/11/6

1. Add configuration for Digital Input Event, see 'get digital input '. 2. Add configuration for Video Loss Event, see 'get video loss time' 3. Add parameters for Multicast RTP stream in Video configuration

0.4

2008/11/12

1. Add feature 'delete an event handler' for deleting exists events, see 'delete an event handler' 2. Add configuration for 'Network Security', see 'Network Security' 3. Feature for get/set digital/output is available. See 'get digital input/output'

0.5

2008/11/27

1. Feature of get/set upnp is available. See 'get upnp information'

0.6

2009/1/10

1. Add Auto Pan, Patrol and Patrol Settings. See 'Auto Pan'.

0.7

2009/3/3

1. Add command for SD Card. See '6 SD Card Operation'

0.8

2009/6/11

1. Modify description of parameters 'picture', 'video' in 6.1.1 2. Add parameter 'date' in 6.1.2 3. Modify request and response in 6.1.3 4. Add parameter 'hour' in 6.1.4

0.9

2009/7/17

1. Add notify event: reboot

0.10

2009/7/20

1. Add 'group' features in users and groups

1.0

2009/9/2

1. Parameters date and hour are removed from SD Card and new parameter 'path' is added.

1

Contents 1

2

3

Overview ............................................................................................................................................ 5 1.1 Support Platform ................................................................................................................ 5 1.2 API versions ....................................................................................................................... 5 1.3 Valid values ........................................................................................................................ 5 HTTP Interface .................................................................................................................................. 6 2.1 Request messages............................................................................................................... 6 2.2 Response messages ............................................................................................................ 7 2.3 Response status codes ........................................................................................................ 7 Configuration API .............................................................................................................................. 8 3.1 device information ............................................................................................................. 8 3.1.1 get basic information.................................................................................................. 8 3.1.2 get extended information............................................................................................ 8 3.1.3 quickly verify user ..................................................................................................... 8 3.1.4 get camera info ........................................................................................................... 9 3.1.5 set camera info ........................................................................................................... 9 3.1.6 get system date and time ............................................................................................ 9 3.1.7 set system date and time............................................................................................. 9 3.2 users and groups................................................................................................................. 9 3.2.1 get users ................................................................................................................... 10 3.2.2 add or modify a user ................................................................................................. 10 3.2.3 delete users ............................................................................................................... 10 3.2.4 get groups ................................................................................................................. 10 3.2.5 query supported privileges ....................................................................................... 11 3.3 video, sensor, audio.......................................................................................................... 12 3.3.1 query stream information ......................................................................................... 12 3.3.2 get video config ........................................................................................................ 12 3.3.3 set video config ........................................................................................................ 13 3.3.4 sensors information .................................................................................................. 13 3.3.5 get sensors config ..................................................................................................... 13 3.3.6 set sensors config ..................................................................................................... 14 3.3.7 get audio config ........................................................................................................ 14 3.3.8 get microphone ......................................................................................................... 14 3.3.9 get speaker................................................................................................................ 14 3.3.10 reset sensor to default configuration (not ready) ..................................................... 14 3.4 network ............................................................................................................................ 15 3.4.1 get network config ................................................................................................... 15 3.4.2 set network config .................................................................................................... 15 3.4.3 get PPPoE................................................................................................................. 15 3.4.4 set PPPoE ................................................................................................................. 15 3.4.5 get DDNS providers ................................................................................................. 16 3.4.6 get DDNS settings .................................................................................................... 16 3.4.7 set DDNS ................................................................................................................. 16 3.4.8 get upnp information ................................................................................................ 16 3.4.9 set upnp information ................................................................................................ 16 3.4.10 get TCP port number for HTTP ................................................................................ 17 3.4.11 set TCP port number for HTTP ................................................................................ 17 2

3.5

Network Security ............................................................................................................. 18 get security status ..................................................................................................... 18 set security status ..................................................................................................... 18 get security level ...................................................................................................... 18 set security level ....................................................................................................... 18 get security rule ........................................................................................................ 18 add security rule ....................................................................................................... 19 modify security rule ................................................................................................. 19 move security rule .................................................................................................... 20 delete security rule ................................................................................................... 20 3.6 event handling .................................................................................................................. 21 3.6.1 get motion detection ................................................................................................. 21 3.6.2 set motion detection ................................................................................................. 21 3.6.3 get digital input ......................................................................................................... 21 3.6.4 set digital input ......................................................................................................... 21 3.6.5 get video loss time .................................................................................................... 21 3.6.6 set video loss time ..................................................................................................... 22 3.6.7 query event handlers information............................................................................. 22 3.6.8 get an event handler ................................................................................................. 22 3.6.9 set event handler....................................................................................................... 23 3.6.10 delete an event handler ............................................................................................. 23 3.6.11 get FTP action .......................................................................................................... 23 3.6.12 set FTP action ........................................................................................................... 23 3.6.13 get mail action .......................................................................................................... 24 3.6.14 set mail action .......................................................................................................... 24 3.6.15 get Pre/Post setting ................................................................................................... 24 3.6.16 set Pre/Post setting ................................................................................................... 24 3.7 system tools...................................................................................................................... 25 3.7.1 get digital input/output ............................................................................................. 25 3.7.2 set digital output ....................................................................................................... 25 3.7.3 get LED – Could not get status of LED ................................................................... 25 3.7.4 set LED .................................................................................................................... 25 3.7.5 firmware upgrade ..................................................................................................... 26 3.7.6 reboot the camera ..................................................................................................... 26 3.7.7 reset all configurations to the factory default ........................................................... 26 3.7.8 get RS-485 settings .................................................................................................. 27 3.7.9 set RS-485 settings ................................................................................................... 27 Camera Control API......................................................................................................................... 28 4.1 motor control.................................................................................................................... 28 4.1.1 add, delete or goto a PTZ preset ............................................................................... 28 4.1.2 move PTZ continuously ............................................................................................ 28 4.1.3 Focus continuously .................................................................................................... 28 SD Card Operation ........................................................................................................................... 30 5.1.1 get information of SD card ...................................................................................... 30 5.1.2 get detail information of SD card............................................................................. 30 5.1.3 Format SD card ........................................................................................................ 30 5.1.4 List files of SD card ................................................................................................. 30 5.1.5 Download file in SD card ........................................................................................ 31 5.1.6 Delete files in SD card ............................................................................................. 32 Notification API ............................................................................................................................... 33 6.1.1 get the notification stream ........................................................................................ 33 3.5.1 3.5.2 3.5.3 3.5.4 3.5.5 3.5.6 3.5.7 3.5.8 3.5.9

4

5

6

3

7

Appendix .......................................................................................................................................... 34 7.1 Time zone......................................................................................................................... 34

4

1 Overview Network Video Server CGI Application Programming Interface (NVSCGI-API) is a HTTP-based API for the networks Video Server and IP Camera products. Users can write program easily by calling this API to access all functionalities provided by our IP cameras including: configuration and the control facilities. The API use the same format in transporting HTTP-based message. We will describe the command HTTP request format in the next chapter. We also provide the RTSP interface for our IP camera.

1.1 Support Platform Our CGI API only supports EVxx5x Series Video Camera/IP Camera and the firmware version should be >= 1.5.6.

1.2 API versions Though we provide a common API for all IP camera models, it may not apply to some old models which were produced before the first version of this API being published. We may also publish the further version of this API in the future. So there may be some difference between different versions of API. However, all our products shall provide the API version information with every firmware version of each model.

1.3 Valid values The following valid values are used in this document: Values

Description

An integer

Any number between -2147483647 (-231-1) and 2147483647 (231-1).

m ... n

Any number between number m and number n.

#

A number equals or greater than 0

A string

Any string encoded by UTF-8

An IP address

A string limited to contain an IP address of the format xxx.xxx.xxx.xxx, where xxx is a number between 0 to 255. Example: 192.168.0.90

A MAC Address

A string limited to contain a MAC address of the format xx:xx:xx:xx:xx:xx, where xx is a hexadecimal value. Example: 00:40:8c:cd:00:00

A time

A string limited to contain a time of the format hh:mm:ss. Example: 23:01:14

A date

A string limited to contain a date of the format yyyy-mm-dd. Example: 2004-02-16

, , , ...

Enumeration, only the given values are valid.



Every italic strings inside brackets including the brackets should be replaced by proper values.

5

2 HTTP Interface An HTTP-based protocol always includes two kinds of message, request and response. IP camera prepares a service to wait and accept TCP connection request with a specified port and to process the requests message from a user defined application. In this chapter, we will describe the common format of comprising all the different request and response messages. You may also refer to the RFC 1945 HTTP/1.0.

2.1 Request messages To query information of IP camera, use the syntax GET http:///?= HTTP/1.0 Authorization: Basic where, is a URL of a CGI. For example, get basic information is “/common/info.cgi”. Authorization is optional for some CGIs. is the base64 encoding of userid:password. is Carriage Return and Line Feed

(\r\n).

To set values in the IP camera, you may use HTTP GET method, the syntax is GET http:/// ?=[&=...] HTTP/1.0 Authorization: Basic

or HTTP method POST, the syntax is POST http:/// HTTP/1.0 Authorization: Basic Content-Type: application/x-www-form-urlencoded Content-Length: =[&=]

where, is the length of

the entity body.

will be described in the following chapters. Valid characters only include alphabets([A-Za-z]), digits([0-9]) and underline(_). There is no such restriction for . The content part of the post message should be encoded with “url- encoding” function.

6

2.2 Response messages While IP Camera receives request message from user, it will do the related action then output result as response message: HTTP/1.0 Content-Type: text/plain Content-Length: = ... If you put /json after the , it will do the related action then output result as response message in json format: HTTP/1.0 Content-Type: text/json Content-Length: ...

2.3 Response status codes The API status codes are defined here.

Table 1: HTTP status codes HTTP code 200

OK

HTTP text

400

Bad Request

401

Unauthorized

404 500

Not Found Internal Error

503

Service Unavailable

Description The request has succeeded, but an application error may occur, please refer to each CGI response. You used invalid or unsupported parameters or values for this IP camera. The request requires user authentication or the authorization was refused. This API is not supported for this IP camera. The IP camera encountered an internal error or the API can not get the correct status. The IP camera is unable to handle the request due to temporary overload.

7

3 Configuration API The CGIs under /config can only be accessed by users who have 'config' privilege.

3.1 device information 3.1.1

get basic information

request: GET /common/info.cgi No authentication required. response: Name Value model A string version A string build A string name A string location A string macaddr A MAC address ipaddr An IP address netmask An IP address gateway An IP address wireless ptz

yes P, T, Z

inputs outputs speaker

# # yes, no

3.1.2

Description model name version number firmware build number camera name camera location the MAC address IP address Subnet mask Default router/gateway used for connecting devices attached to different networks and networks segment. Only displayed if has wireless Only show supported Pan or Tilt or Zoom. For example, ptz=P,T The number of inputs The number of outputs Only displayed if the IP camera has speaker.

get extended information

To identify each different camera model. Request: GET /config/info_ex.cgi response: Name exid oemid boardid

3.1.3

Value

Description

A string A string A string

extended RDID OEMID Board ID

quickly verify user

request: GET /users/verify.cgi response: Name privilege

Value

Description the permission of the specified user in the HTTP Authorization header field.

A string

8

When the authorization fails, it will return HTTP/1.0 401 Unauthorized

3.1.4

get camera info

request: GET /config/camera_info.cgi response: Name

Value

name location

Description

A string A string

3.1.5

camera name camera location

set camera info

request: GET/POST /config/camera_info.cgi parameters: see the above table. Response: see the above table.

3.1.6

get system date and time

request: GET /config/datetime.cgi response: Name

Value

method

0, 1

timeserver timezone date time

A host or IP address # A date A time

3.1.7

Description 0: disable ntpd 1: enable ntpd NTP time server host name or IP address. time zone ID, see Time zone yyyy-mm-dd hh:mm:ss

set system date and time

request: GET/POST /config/datetime.cgi parameters: Name

Value

method

0, 1, 2

Timeserver Timezone date time

A host or IP address 1 … 83 A date A time

Description 0: disable ntpd 1: enable ntpd 2: manual setting, requires date and time. NTP time server host name or IP address. time zone ID, see Time zone yyyy-mm-dd hh:mm:ss

response: see the 3.1.6 table.

3.2 users and groups 9

3.2.1

get users

request: GET /config/user_list.cgi parameters: none or name= response: if no request parameter Name users …

Value # …

Description The total number of users. For example, admin=admin It will display all user names line by line.

If request parameter is name Name

Value

password group privilege

A string A string A string

3.2.2

Description base64 encoded password group name (optional) the permissions of this user

add or modify a user

request: GET/POST /config/user_mod.cgi parameters: Name name password group privilege

Value A string A string A string A string

Description user name base64 encoded password group name (optional) the permissions of this user If this parameter is used, group will be omitted.

response: see the above table.

3.2.3

delete users

request: GET/POST /config/user_del.cgi parameters: name =,, … You can delete many users at once. Response: name=,, …

3.2.4

get groups

request: GET/POST /config/group_list.cgi parameters:

10

none or name= response: if no request parameter: Name groups An integer

Value

Description The total number of groups. for example: admin=admin,root

,…

response: if request parameter is name: Name

Value

Description

user

,…

the user names

Privilege

ptz, outputs, video, config

the permission list which this group has

3.2.5

query supported privileges

request: GET/POST /config/privilege_info.cgi response: Name privilege

Value ptz, outputs, video, config

Description available permissions.

11

3.3 video, sensor, audio 3.3.1

query stream information

You can get supported parameter values for your IP camera. Some parameters are optional and not displayed if not supported in your IP camera. Request: GET /config/stream_info.cgi response: Name videos

Value MPEG4, MJPEG, H264

Description available video codecs list. For example, videos=MPEG4,MJPEG

audios

ADPCM_MS,PCM_MULAW

available audio codecs list. For example, audios=ADPCM_MS

resolutions

x,…

vbitrates

b1, b2, b3, …

goplengths

1,2

framerates qualities asamplerates

8000

abitrates

32

vprofilenum vprofile# aprofilenum aprofile#

# #

available video resolutions list. For example, resolutions=640x480,320x240 available bitrates (kbps) list for example, vbitrates=600,800,1000 (optional) available GOP lengths list This value means times of framerate available frame rates list available MJPEG qualities list, only used if has MJPEG. audio sample rates (kHz) list fixed to 8000 audio bitrates (kbps) list fixed to 32 The total number of available video streams. video profile # (# is a number) The total number of available audio streams. audio profile #

3.3.2

get video config

request: GET /config/video.cgi parameters: profileid= response: Name profileid resolution bitrate codec goplength framerate quality

Value # x An integer MPEG4,MJPEG,H264 0,1,2 1 ... 30 1,2,3,4,5

Description video profile number resolution in kbit/s a video codec the MPEG GOP length which means times of framerate. 0 for I-Only. a frame rate in fps only used when the codec is MJPEG

format

VSM,RTP

Streaming protocol

port

1…65535

Port for streaming service

multicast

off,on

Enable multicast

multicast_addr

ip address

Multicast group ip (Optional, but must have when 'multicast' is set to 'on')

12

multicast_port

3.3.3

1…65535

Multicast port (Optional, but must have when 'multicast' is set to 'on')

set video config

request: GET/POST /config/video.cgi parameters: see the above table. response: see the above table.

3.3.4

sensors information

request: GET /config/sensor_info.cgi response: (only supported parameters are displayed) Name brightness contrast saturation

3.3.5

Value b1 ... b2 c1 ... c2 s1 ... s2

Description available brightness range available contrast range available saturation range

get sensors config

request: GET /config/sensor.cgi response: (only supported parameters are displayed.) Name Value brightness An integer contrast An integer saturation An integer

Description the brightness the contrast the saturation

13

3.3.6

set sensors config

request: GET/POST /config/sensor.cgi parameters: see the above 2 tables to set the valid values. response: see the above table.

3.3.7

get audio config

request: GET /config/audio.cgi parameters: profileid= response: Name profileid codec

Value # ADPCM_MS, PCM_MULAW

audio profile number the audio codec

samplerate

An integer

The clock rate for the audio sampling. (in kHz)

channel bitrate

An integer An integer

the audio channel number. The output bitrate. (in kbit/s)

3.3.8

Description

get microphone

request: GET /config/mic.cgi response: Name enable

3.3.9

Value no, yes

Description microphone disable/enable

get speaker

request: GET /config/speaker.cgi response: Name enable

Value no, yes

Description speaker disable/enable

3.3.10 reset sensor to default configuration (not ready) request: GET /config/sensor_reset.cgi parameters: reset=go response: Name

Value

Description

14

reset

yes, fail

the result of sensor reset

3.4 network 3.4.1

get network config

request: GET /config/network.cgi response: Name dhcp ip netmask gateway dns1 pppoe pppoeuser pppoepass ddns ddnsprovider ddnshost ddnsuser ddnspass upnp httpport

3.4.2

Value off, on An IP address An IP address An IP address An IP address off, on A string A string off, on A string A string A string off, on 1 ... 65535

Description disable/Enable dynamic IP address assignment IP address subnet mask default gateway primary DNS server use PPPoE PPPoE user name PPPoE password disable/enable dynamic ddns service ID of the provider ddns host name ddns user name ddns password disable/enable UPnP TCP port number for HTTP

set network config

request: GET/POST /config/network.cgi parameters: see the above table. response: see the above table.

3.4.3

get PPPoE

request: GET /config/pppoe.cgi response: Name pppoe user pass

3.4.4

Value

Description

off, on

disable/enable PPPoE PPPoE user name PPPoE password

set PPPoE 15

request: GET/POST /config/pppoe.cgi parameters: see the above table. response: see the above table.

3.4.5

get DDNS providers

request: GET /config/ddnsproviders.cgi response: Name num providers

3.4.6

Value

Description The number of dynamic dns service providers. available providers ID list

Value

Description disable/enable dynamic DNS service ID of the provider DDNS host name DDNS user name DDNS password

#

get DDNS settings

request: GET /config/ddns.cgi response: Name ddns provider host user pass

3.4.7

off, on

set DDNS

request: GET/POST /config/ddns.cgi parameters: see the above table. response: see the above table.

3.4.8

get upnp information

request: GET /config/upnp.cgi response: Name upnpav

3.4.9

Value off, on

Description disable/enable UPnP AV server.

set upnp information

request: GET /config/upnp.cgi parameters:

16

see the above table. response: see the above table.

3.4.10 get TCP port number for HTTP request: GET /config/httpport.cgi response: Name httpport

Value

Description TCP port number for HTTP

1 ... 65535

3.4.11 set TCP port number for HTTP request: GET/POST /config/httpport.cgi see the above table. response: see the above table.

17

3.5 Network Security 3.5.1

get security status

request: GET /config/security.cgi response: Name

Value

Description

type

level,rule

Type for network security. level: use predefined security level rule: use rule security

level

l,m,h

Current security level. Definition of l, m and h are meant to be low, medium and high

def_rule

Deny,Accept

For rule security, it’s a default permission for incoming traffic.

3.5.2

set security status

request: GET/POST /config/security.cgi parameters: see the above table. response: see the above table.

3.5.3

get security level

request: GET /config/security_level.cgi response: Name level

3.5.4

Value l,m,h

Description Current security level. Definition of l, m and h are meant to be low, medium and high

set security level

request: GET/POST /config/security.cgi parameters: see the above table. response: see the above table.

3.5.5

get security rule

request:

18

GET /config/security_rule.cgi parameters: id= response: if parameter 'id' is not given Name num # rule_#

Value

Description Total number of rules

string

The format of rule is ::: For more information, see next response table

if parameter 'id' is given, only shows the rule of referred id Name Value ip an ip address

Source IP of incoming traffic

mask

an ip address

Mask for ip

svc

Stream1,Stream2,Web

Destination service of incoming traffic

perm

Deny, Accept

Permission of incoming traffic

3.5.6

Description

add security rule

request: GET/POST /config/security_rule_add.cgi parameters:

id

Name #

Value

Description (Optional) Used to insert new rule before this rule

ip

an ip address

Source IP of incoming traffic

mask

an ip address

Mask for ip

svc

Stream1,Stream2,Web

Destination service of incoming traffic

perm

Deny, Accept

Permission of incoming traffic

response: see the above table.

3.5.7

modify security rule

request: GET/POST /config/security_rule_mod.cgi parameters: Name

Value

Description

id

#

Rule id for modified

ip

an ip address

Source IP of incoming traffic

mask

an ip address

Mask for ip

svc

Stream1,Stream2,Web

Destination service of incoming traffic

perm

Deny, Accept

Permission of incoming traffic

response: see the above table.

19

3.5.8

move security rule

request: GET/POST /config/security_rule_move.cgi parameters:

id

Name #

Value

Description Source rule which would be moved before another rule

dstId

#

Source rule would be moved before this rule

response: see the above table.

3.5.9

delete security rule

request: GET/POST /config/security_rule_del.cgi parameters: Name id

Value #,all

Description Rule id for delete. If the id is 'all', delete all rules.

response: see the above table.

20

3.6 event handling 3.6.1

get motion detection

request: GET /config/motion.cgi response: Name enable totalnum sensitivity enable# mdw#

3.6.2

Value no, yes # 0 ... 100 no, yes A string

Description disable/enable motion detecting total motion detection window numbers. read-only. sensitivity disable/enable motion detection window # motion detection window # in the format x,y,w,h x,y is the coordinate. the 0,0 means the left top position. w,h is the width and height of the window.

set motion detection

request: GET/POST /config/motion.cgi parameters: see the above table. response: see the above table.

3.6.3

get digital input

request: GET /config/event_input.cgi response: Name type

3.6.4

Value NO NC

Description Normal Open Normal Close

set digital input

request: GET/POST /config/event_input.cgi parameters: see the above table. response: see the above table.

3.6.5

get video loss time 21

request: GET /config/event_vloss.cgi response: Name

Value

losetime

3.6.6

An integer

Description Time in seconds

set video loss time

request: GET/POST /config/event_vloss.cgi parameters: see the above table. response: see the above table.

3.6.7

query event handlers information

request: GET /config/event_info.cgi response: Name num name events actions

3.6.8

Value # , ... md#, input#, vloss

Description Total number of event handlers The names of available event handlers available event types list

mail,ptz,output#,record

available actions list

get an event handler

request: GET /config/event.cgi parameters: name= response: Name

Value

Description

name event

1…12 md#, input#, vloss, none

The name of the event handler. md# is motion detection 1 input# is digital input 1, 2 video loss not set

action

mail, ptz, output#, record none

to a SMTP Server to a PTZ preset number output# is digital output 1 to a record storage (SD Card or FTP) see Pre/Post setting not set

22

param

#

If action is 'ptz', this value means the ptz number If action is 'output#', this value means the duration for digital output in seconds For other actions, this parameter can be omitted

schedule

always, never

the schedule of the event handler

3.6.9

set event handler

request: GET/POST /config/event.cgi parameters: see the above table. response: see the above table.

3.6.10 delete an event handler request: GET /config/event_del.cgi parameters: Name name

Value 1…12

Description The name for deleting.

response: see the above table.

3.6.11 get FTP action request: GET /config/action_ftp.cgi response: Name host port path user pass passive prefix

Value 1 ... 65535

no, yes

Description FTP server host name or IP address FTP server port number FTP initial path FTP login user name FTP login password active mode or passive mode Prefix name for uploaded file

3.6.12 set FTP action request: GET/POST /config/action_ftp.cgi parameters: see the above table. response: see the above table.

23

3.6.13 get mail action request: GET /config/action_mail.cgi response: Name sender to host port user pass auth attach

Value An email address An email address

yes,no yes,no

Description the sender email addresses separated by comma (,) SMTP server host name or IP address TCP port number user name Password Enable SMTP authentication Attach files

3.6.14 set mail action request: GET/POST /config/action_mail.cgi parameters: see the above table. response: see the above table.

3.6.15 get Pre/Post setting request: GET /config/record_prepost.cgi response: Name

Value

Description

pretime posttime format

5~10 5~10 mjpeg,mpeg4

Pre-record time in seconds Post-record time in seconds Record format

output

ftp, sd

Output to FTP Server Output to SD Card

3.6.16 set Pre/Post setting request: GET/POST /config/record_prepost.cgi parameters: see the above table. response: see the above table.

24

3.7 system tools 3.7.1

get digital input/output

request: GET /config/io.cgi response: (only supported inputs and outputs are displayed) Name in1 in2

Value

Description

off, on off, on

3.7.2

Digital input set 1 Digital input set 2

set digital output

You can only set the available digital outputs, inputs are read-only. request: GET/POST /config/io.cgi parameters: out1

off, on

Digital output set 1

response: see the above table.

3.7.3

get LED – Could not get status of LED

request: GET /config/led.cgi response: Name led

Value

Description enable or disable the special purpose LED.

on, off

3.7.4

set LED

request: GET/POST /config/led.cgi parameters: see the above table. response: see the above table.

25

3.7.5

firmware upgrade

request: POST /config/firmwareupgrade.cgi The file content is provided in the HTTP body according to the format given in RFC 1867. The body is created automatically by the browser if using HTML form with input type "file". Example: POST /config/firmwareupgrade.cgi HTTP/1.0\r\n Content-Type: multipart/form-data; boundary=--AsCg5y\r\n Content-Length: \r\n \r\n --AsCg5y\r\n Content-Disposition: form-data; name="update.bin"; filename="update.bin"\r\n Content-Type: application/octet-stream\r\n \r\n \r\n --AsCg5y--\r\n

response: Name upgrade

3.7.6

Value

Description the upgrade was successful or fail

Value

Description the reboot was successful or fail

ok, fail

reboot the camera

request: GET/POST /config/system_reboot.cgi parameters: reboot=go response: Name reboot

3.7.7

yes, fail

reset all configurations to the factory default

request: GET/POST /config/system_reset.cgi parameters: reset=go response: Name reset

Value

Description the reset was successful or fail

yes, fail

26

3.7.8

get RS-485 settings

request: GET /config/rs485.cgi response: Name enable proto devid

baudrate databits parity stopbits

3.7.9

Value

description

no, yes

disable/enable RS-485 protocol type

Dynacolor, Merit_Lilin, PelcoD, PelcoP, Visca, Transparent An integer

device ID of the RS-485 slave device. Dynacolor: 1 ... 223 Merit_Lilin: 1 ... 64 PelcoD: 1 ... 255 PelcoP: 1 ... 32

1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200 7, 8 None, Even, Odd 1, 2

set RS-485 settings

request: GET/POST /config/rs485.cgi see the above table. response: see the above table.

27

custom baud rate custom data bits custom parity custom stop bits

4 Camera Control API 4.1 motor control 4.1.1

add, delete or goto a PTZ preset

request: GET/POST /config/ptz_preset.cgi parameters: Name name act

Value add, del, go

Description preset name add the current position to the preset delete the preset go to the preset

response: see the above table.

4.1.2

move PTZ continuously

request: GET/POST /config/ptz_move_cont.cgi parameters: Name

Value

Description

p

-60…60

Pans the device continuously. 0: stop >0: pan right 0: tilt up 0: zoom in 0: focus in