How to control PTZ BC820H1 (PTZ.cgi)

Apply to: BC820H1

Pan Tilt Zoom and Focus control of BC820H1  

To control the PTZ of the BC820H1 use the following ptz.cgi commands.

Ptz.cgi

Method: GET/POST 

Syntax:  http://<servername>/cgi-bin/com/ptz.cgi?<parameter>=<value>[&<parameter>=<value>...]

Parameter and values

continuouspantiltmove -100 to 100
Continuous pan/tilt motion: positive values mean right (pan) and up (tilt), negative values mean left (pan) and down (tilt). "0,0" means stop. 

Continuouszoommove -100 to 100
Continuous zoom motion: Positive values mean zoom in and negative values mean zoom out. Higher value gives higher speed. "0" means stop. 

Continuousfocusmove -100 to 100
Continuous focus motion: Positive values mean focus near and negative values mean focus far. Higher value gives higher speed. "0" means stop.  Manual focus control only works if autofocus is off. 

Autofocus on, off, pushaf or zoomtrigger 
on: autofocus of.
off: autofocus off.
pushaf: focus now (when autofocus is off).
zoomtrigger: zoom action will trigger autofocus. 

Gotoserverpresetno presetnumber
Move to the position associated with the specified preset position number.   

Setserverpresetno presetnumber
Set the actual position as the preset with the specified number.
 
Examples
http://172.30.32.185/cgi-bin/com/ptz.cgi?setserverpresetno=3
http://172.30.32.185/cgi-bin/com/ptz.cgi?continuouspantiltmove=100,100
http://172.30.32.185/cgi-bin/com/ptz.cgi?continuouspantiltmove=0,0
 
Note:
The camera keeps an internal table for the used preset numbers. It will renumber the preset numbers for use on the serial bus. The first number to be used is 1. The second to be used is 2. For example if you send via the API the commands set preset 10, set preset 5, set preset 95 will create the following table: 

  RS485 Pelco D  PTZ.cgi
              1      10
              2       5
              3      95

This means that a goto preset 95 on the API will be send as a goto preset 3 on the serial bus. 

Note
The URL must follow the standard way of writing a URL, (RFC 2396: Uniform Resource Identifiers (URI)  Generic Syntax); that is, spaces and other reserved characters (";", "/", "?", ":", "@", "&", "=", "+", ","  and "$") within a <parameter> or a <value> must be replaced with %<ASCII hex>. For example, in the  string “My camera”, the space will have to be replaced with %20, “My%20camera”.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments