lnanshw lP wv : default  

gsbNF  HTTP API

The HTTP API

 

The HTTP API (Application Programming Interface) is a software interface to the camera and allows to conveniently integrate the camera into a centralized management system. The interface consists of two CGI scripts that can be called with parameters and values using HTTP commands. By means of these scripts, you can modify the settings of the Setup submenus and execute certain camera functions.

Modifying the Settings of the Setup Menu

Using the HTTP command http://10.x.x.x/control/control, you can modify the settings of the Setup menu.

Note: Replace 10.x.x.x with the current IP address of your camera.

Executing Camera Functions

Using the HTTP command http://10.x.x.x/control/rcontrol, you can execute certain camera functions.

Important: Certain functions for Saving and Restoring the configuration can only be performed by a user of the admin access level. In this case, you need another HTTP command for calling the rcontrol script, namely:
http://10.x.x.x/admin/rcontrol

Command Conventions:

In order to execute a script with parameters, the link to the script needs to be separated from the parameters by a question mark ?:

   http://10.x.x.x/control/rcontrol?action=ledson

If you would like to use multiple parameters, separate them using an ampersand &.

    http://10.x.x.x/control/rcontrol?action=ledson&time=5


The control Command

First of all, you need to tell the script which instructions are to be performed.

Instructions for the control Command

Instruction Description
set Write access to the image settings. Use this instruction to modify the image settings.
http://10.x.x.x/control/control?set
read Read access to the image settings. Use this instruction to query information about the image settings.
http://10.x.x.x/control/control?read
list The list instruction returns a list of the configuration file sections that can be modified.
http://10.x.x.x/control/control?list
To retrieve the parameters of one particular section, add section=sectionname at the end of the call.
http://10.x.x.x/control/control?list&section=sectionname
factory The factory instruction allows you to reset the parameters of a section to the factory default settings. This call requires the section name section=sectionname as additional parameter.
http://10.x.x.x/control/control?factory&section=sectionname
restore The restore instruction allows you to reset the parameters of a section to the values stored in the flash memory. This call requires the section name section=sectionname as additional parameter.
http://10.x.x.x/control/control?restore&section=sectionname

Notes:

Parameters for the general Section

Parameters Description Value Range single/dual
camera Sensor selection right, left, both, RiL, LiR single
size Image size 160x120, 320x240, 640x480 single
framerate Refresh rate in Hz 12, 6, 4, 3, 2, 1 single
sharpen Image sharpness 0 .. 10 dual
mirror Mirror image no, vertical, horizontal, both single
rotate Image rotation 0, 180 single
nightlevel Trigger level for night camera level in %
0 = disabled
0, 2, 5, 7, 10, 12, 15, 17, 20, 25, 30, 35, 40 single
nightcamera Selection of night lens (usually the left one) right, left, both, RiL, LiR single
darknoisesuppress Background noise suppression off, medium, high single
coverimage Obscure image areas enable, disable, time single
coverimage_wakeup Start of obscuring an image area in milliseconds 0 .. 86400000 single
coverimage_sleep End of obscuring an image area in milliseconds 0 .. 86400000 single
coverimage_area Definition of the image area to be obscured.

The value to be returned is the definition of the image area as described in the General Image Settings help topic. In order to return on multiple definitions, separate them by entering a %0A:
coverimage_area=0,270,190,100,100,
    1%0A1,270,190,100,100,1

string dual

Parameters for the exposure Section

Parameters Description Value Range single/dual
automatic Automatic contrast off, auto dual
brightness Image brightness -10 .. 0 .. 10 dual
backlight Backlight correction -10 .. 0 .. 10 dual
ca_night_improve Night Improvement off, on dual
ca_exp_window_type Exposure zone type all, center, spot, top, middle, bottom, right, vertical, left, right_left, extra dual
ca_exp_window_weight Weight of exposure zone in % -1, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 dual
ca_wbal_window_weight White balance weight in % -1, 0, 10, 20, 30, 40, 50, 60, 70, 80 90 100 dual
ca_avg_intensity Average brightness within the exposure zone 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800 dual
ca_exp_window_draw Display the exposure zone in the image on, off dual
ca_exp_max Maximum exposure time in seconds 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800 single
ca_exp_min Minimum exposure time 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800 single
ca_linefreq Frequency of the power supply 50, 60 single

Parameters for the action Section

Parameters Description Value Range single/dual
outputaction Activates the signal output for the defined period of time. 0, 1, 2, 5, 10, 30, 60, 300  
ftpaction Activate/deactivate the first FTP transfer. To activate this action, specify one of the profiles created in the FTP Profiles dialog. off, or a valid profile name single
ftpaction2 Activate/deactivate the second FTP transfer. To activate this action, specify one of the profiles created in the FTP Profiles dialog. off, or a valid profile name single
visualalarm Visual alarm enable, disable single
visualalarm_format Display of the visual alarm in the image bar1, bar2, box1, box2, sign1, sign2 single
visualalarm_color Color of the visual alarm
 0x000000
 0x800000
 0x008000
 0x808000
 0x000080
 0x800080
 0x008080
 0x808080
 0xC0C0C0
 0xFF0000
 0x00FF00
 0xFFFF00
 0x0000FF
 0xFF00FF
 0x00FFFF
 0xFFFFFF
single
visualalarm_erase Maximum period of time that the visual alarm is displayed 0, 1, 5, 10, 30 single
visualalarm_acknowledge Alarm acknowledgement enable, disable single
ringbuffer Activate/deactivate the ring buffer on, off single
histcount Pre-alarm images 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 single
futcount Post-alarm images 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 single
storyinterval Recording interval between the images of an image series in milliseconds 0 .. 600000 single

Parameters for the color Section

Parameters Description Value Range single/dual
colorprofile Color profile for white balance auto, Neontube, Cloudy, Sunny single
color Color saturation -10 .. 0 .. 10 dual
blue Blue balance -10 .. 0 .. 10 dual
red Red balance -10 .. 0 .. 10 dual

Parameters for the jpeg Section

Parameters Description Value Range single/dual
motionjpeg MxPEG video codec enable, disable single
jpegmode Quality mode for creating images quality, maxsize single
quality JPEG quality in % 10, 20, 30, 40, 50, 60, 70, 80, 90 single
jpegmaxsize Maximum JPEG size in kB 20 .. 2048 single

Parameters for the text Section

Parameters Description Value Range single/dual
textdisplay Text display disable, enable, datetime single
textbgcolor Text background color
 0x000000
 0x800000
 0x008000
 0x808000
 0x000080
 0x800080
 0x008080
 0x808080
 0xC0C0C0
 0xFF0000
 0x00FF00
 0xFFFF00
 0x0000FF
 0xFF00FF
 0x00FFFF
 0xFFFFFF
single
textbgtrans Transparency of the background color in %. 0, 25, 50, 75, 100 single
errortext Activate/deactivate error messages in the image 0, 1 single
date Select a time format 0, 1, 2, 3, 4, 5, 6 single
print Display a comment String single
imageinfo Display symbols for events and actions 0, 1, 2 single
chartdrawmode Level meter off, bar, scrollchart single
chartdatasource Source for level meter PI, MI, IL, SI, EC, TP single
objecttracing Object tracing disable, enable single
objectcamera Select the image sensor you would like to use for object tracing. right, left single

Parameters for the eventcontrol Section

Parameters Description Value Range single/dual
pircheck Activate/deactivate Passive Infrared Sensor event detection on, off single
pir Trigger level for activating the passive infrared sensor 0 .. 100 single
motioncheck Activate/deactivate Motion Detection Window event detection on, off single
motion Define the motion detection window Separate multiple definitions using %0A:
motion=0,270,190,100,100,
    1%0A1,270,190,100,100,1
string  
motionwintype Representation of the motion detection window frame off, on, highlight single
motiondarksuppress Deactivate motion detection at night 0, 2, 5, 7, 10, 12, 15, 17, 20, 25, 30, 35, 40 dual
miccheck Activate/deactivate Microphone event detection on, off single
mic Trigger level for an event 0 .. 100 single
micwidth Minimum duration of noises louder than the trigger level in milliseconds 50, 100, 150, 200, 250, 300, 400, 500, 750, 1000, 2000 single
inputswitch Signal Out Action event detection off, close, open single
buttoncheck Button Event event detection on, off single
button The key combination that triggers an event right, left, rightORleft, rightANDleft single
ircheck Activate/deactivate IR Remote Control event detection on, off single
timercheck Activate/deactivate Periodic Event event detection on, off single
timerunit Measurement unit for the interval between periodic events sec, ms, Hz single
timer Value for the interval between periodic events 0 .. 86400 single
timetaskclick Activate/deactivate Time-controlled Events event detection 0, 1 single
userclick Activate/deactivate User Click event detection 0, 1 single
ipreceivecheck Activate/deactivate IP Notify event detection 0, 1 single
ipreceiveport The port where the camera expects IP notifications 1 .. 65536 single
ipreceivematch Comparison type for IP notifications strcmp = text comparison
regex = regular expression
single
ipreceivemessage The expected notification text for text comparison or the regular expression string single
randomcheck Activate/deactivate Random Event event detection on, off single
randomrange Number of random events per hour, e.g. 1,000 or 10 string single
eventdurationmode Activate/deactivate the event filter on, off single
eventduration Period of time in seconds during which a defined number of events is expected 1 .. 3600 single
eventdurationevent Number of expected events during the defined period of time 1 .. 3600 single
eventdurationcondition Condition for the event counter to trigger an event more, less single
eventdurationaction The number of times that an action is to be executed when an event occurs
first Only once when the condition becomes true
every Every second as long as the condition is true
single
outputaction Switching time in seconds 0, 1, 2, 5, 10, 30, 60, 300 single

Parameters for the settings Section

Parameters Description Value Range single/dual
edactiv Activate/deactivate event arming enable, disable, close, open, time single
edwakeup Start of event arming in milliseconds 0 .. 86400000 single
edfallasleep End of event arming in milliseconds 0 .. 86400000 single
freezeactiv Activate/deactivate the Stop Action on, off single
freezecondition Event that triggers the Stop Action PI, VM, MI, SI, BT, IR, PE, TT, UC, RC, RD, EC single
freezedelay Delay time in seconds until the actions are stopped 0 .. 86400 single
actiondelay Actions delay in seconds 0 .. 3600 single
notifydelay Messaging dead time in seconds 0 .. 3600 single
eventdelay Event dead time in seconds 0 .. 3600 single

Parameters for the message Section

Parameters Description Value Range single/dual
playsound Play back an audio file when an event occurs No Sound, Boing, Camera, Cow, Default, Ding, Explode, Glass, Notify, Pain, Sheep, Tada, Standard single
emailaction Activate E-mail Action off, or
Every profile created in E-Mail Profiles.
single
emailaction_attachment Set an attachment for the email. If no value is defined, the information from E-Mail Profiles is used. off, img, story, comment single
emailaction2 Activate Second E-mail action off, or
Every profile created in E-Mail Profiles.
single
emailaction2_attachment Set an attachment for the email. If no value is defined, the information from E-Mail Profiles is used. off, img, story, comment single
callaction ISDN Call Action off, or
Every profile created in Profiles for ISDN Call-Out.
single
ipnotifycheck Activate/deactivate IP Notify action on, off single
ipnotifyaddress Address and port to which the IP notification is to be sent You need to separate the address from the port using a colon.
Example: 10.x.x.x:8000
string single
ipnotifymessage Text that is sent with the IP notification string, or
System information that you can access using special Variables
single

Parameters for the signalout Section

Parameters Description Value Range single/dual
so_activ Activate/deactivate Signal Out Action enable, disable, time single
so_wakeup Activation time in seconds 0 .. 86400000 single
so_sleep Deactivation time in milliseconds 0 .. 86400000 single
so_time Duration of the signal out action in seconds 0 .. 86400 single
so_deadtime Dead time of the signal out action in seconds 0 .. 3600 single
so_imageinfo Display event symbols in the image on, off single
so_illicheck Activate/deactivate the illumination filter on, off single
so_illi Trigger level for the illumination filter 0 .. 100 single
so_pircheck Activate/deactivate the passive infrared sensor on, off single
so_pir Trigger level for activating the passive infrared sensor 0 .. 100 single
so_motioncheck Activate/deactivate the motion detection window on, off single
so_miccheck on, off Activate/deactivate microphone event detection single
so_inputswitch Activate/deactivate signal input off, close, open single
so_buttoncheck Activate/deactivate the keys on the front of the camera on, off single
so_button Key combination right, left, rightORleft, rightANDleft single
so_ircheck Activate/deactivate IR remote control event detection on, off single
so_timercheck Activate/deactivate Periodic Event detection on, off single
so_timer Value for the interval between periodic events in seconds 0 .. 86400 single
so_timetaskclick Activate/deactivate Time Task Event detection on, off single
so_userclick Activate/deactivate User Click event detection on, off single
so_ipreceivecheck Activate/deactivate IP Receive event detection on, off single
so_randomcheck Activate/deactivate Random Event detection on, off single
so_randomrange Number of random events per hour, Example: 1.000 or 10 string single

The rcontrol Command

The first value expected by the script is always the name of the action that is to be performed. Depending on the action, you may have to provide additional parameters. For the additional parameters mandatory and optional parameters are used.

Parameters of rcontrol

Action Description Mandatory parameter Optional parameter
sigouthigh The signal output is closed. The optional parameter time reopens the signal output after the defined period of time has passed. none
time
Period of time in seconds
sigoutlow The signal output is opened. The optional parameter time closes the signal output again after the defined period of time has passed. none
time
Period of time in seconds
sound Plays the boing audio file. Using the optional parameter soundfile, you can specify an audio file. You can either use one of the audio files provided in the software or any audio file that you have recorded in the Manage Voice Messages dialog. none
soundfile
Name of the audio file
ledson Switches all LEDs on. The optional parameter time resets the LEDs to the factory default setting after the defined period of time has gone by. none
time
Period of time in seconds
ledsoff Switches all LEDs off. The optional parameter time resets the LEDs to the factory default setting after the defined period of time has gone by. none
time
Period of time in seconds
ledsdefault Resets all LEDs to the factory defaults. none none
ledsstring You can explicitly change the state of every single LED. You only need the leds parameter. This parameter expects a string consisting of six characters, with each character defining the state of one LED. The characters are allocated clockwise with the first character allocated to the LED at 12 o'clock.
Example: http://10.x.x.x/
    control/rcontrol?
    action=ledsstring
    &leds=01BD11

leds

0=LED off
1=LED on
B=LED blinking
D=Factory default
time
Period of time in seconds
putrs232 Send text via the serial interface When you do not set the rs232outtext parameter, all that is transferred are the words "hello world". none
rs232outtext
string
getrs232 Read text from the serial interface. When you do not use any other parameters, only the last 2048 bytes are read from the buffer. none
nrofbytes
0 .. 102400 bytes
rs232delafterread
Delete buffer after reading
0=do not delete
1=delete
getrs232hex Similar to the getrs232 function, the only difference being that the characters are returned in hex code. none same as getrs232
userclick Performs the User Click function. none none
gettemp Returns the internal temperature of the camera.
Note:
This command is not available for Basic cameras.
none none
rs232sigin Returns the state of pin 9 of the serial interface none none
setrs232sig Sets the pins of the serial interface. Make sure that the serial interface has been configured correctly in the Serial Interface and Modem Setup dialog.
24V 0, 1
RTS 0, 1
TXD 0, 1
DTR 0, 1
none
ftplastevent Transfers the last stored alarm image via FTP. Expects the name of an FTP profile as additional information. The profile must have been defined in the FTP Profiles dialog.
profile
Profile name
none
ftpcurrent Transfers the current image via FTP. Expects the name of an FTP profile as additional information. The profile must have been defined in the FTP Profiles dialog.
profile
Profile name
none
emaillastevent Transfers the last stored alarm image via email. Expects the name of an email profile as additional information. The profile must have been defined in the E-Mail Profiles dialog.
profile
Profile name
none
emailcurrent Transfers the current image via email. Expects the name of an email profile as additional information. The profile must have been defined in the E-Mail Profiles dialog.
profile
Profile name
none
sendmessage Sends an IP notification to the defined address
Note:
This command is not available for Basic cameras.
message string
addr ip-address:port
none
actionactivityon Activates all actions none none
actionactivityoff Deactivates all actions none none
actionactivitytime Activates all actions for the period of time defined in the General Event Settings dialog. none none
eventack Acknowledges an alarm none none
isdnphone Triggers a camera voice message via telephone. Expects the name of profile defined in the ISDN Dial-Out Profiles dialog as additional information.
profile
Profile name
none
speakip Plays back the current IP address via the loudspeaker.
Note:
This command is not available for Basic cameras.
none none

Saving and Restoring the Configuration

Functions for saving and restoring the configuration can only be performed by a user of the admin access level.

Example: http://10.x.x.x/admin/rcontrol?action=storeconfig
Note:
These commands are not available for Basic cameras.

Functions for Users of the admin level

Function Description Mandatory parameter Optional parameter
storeconfig Stores the current configuration in the camera's permanent storage. none none
restoreconfig Restores the last saved configuration from the camera's permanent storage. none none
resetconfig Reads the camera's factory default settings. none none
reboot Reboots the camera. none none


©2003 MOBOTIX AG, hCc · http://www.mobotix.com/ · d[: info@mobotix.com