IPCAM CGI SDK 2.1

 


This page was constructed directly from a PDF I found on the web I apologise for any Engrish in it – I have mostly left it unchanged to avoid imposing my own interpretation on the meaning. I can’t guarantee that everything here is correct or will work with your webcam but certainly what I tried with mine pretty much did.

The CGI APIs is based on http protocol.

Different CGI with different Permissions:visitor、operator and Administrator.

In this article cgi only support get and post method.

Upgrade_firmware.cgi and upgrade_htmls.cgi only support post method,others cgi only support get method.

next_url: an   option   param.   If   you   don’t   want   only   return   a   simple   “OK”   when   set succeed, you can add a param in the end next_url. The param is the next file it jump to

when set succeed. The param must be a Relative path.

Get: (Example)

<form action=”/set_mail.cgi”>

<input name=”svr”>

<input name=”user”>

<input name=”pwd”>

<input name=”sender”>

<input name=”receiver1”>

<input name=”receiver2”>

<input name=”receiver3”>

<input name=”receiver4”>

<input type=hidden name=”next_url” value=”index.htm”>

<input type=submit value=”ok”>

</form>

Post : (Example)

<form    action=”upgrade_firmware.cgi?next_url=index.htm”    method=”post”

enctype=”multipart/form-data”>

<input type=”file” name=”file” size=”20”>

</form>


Probably the most useful commands are these for capturing video and stills and some camera controls.

snap
shot.cgi

Description To obtain the snapshot
Permission visitor

Syntax /snapshot.cgi[?user=&pwd=&next_url=]

Parameters:
user:username
pwd:password
next_url:the name of snapshot

Notes
1 If the parameter “next_url” is not used, the snapshot name is:deviceid(Alias)_ Current time.jpg
2 Use “next_url” (for example:next_url=1 the name of photo:1.jpg)
3 Supports two Authentication Methods: http Basic64 encode and use of username/password in the param directly.


videostream.cgi

Description Use server push mode to send videostream to Client APP
Permission visitor

Syntax /videostream.cgi[?user=&pwd=]

Parameters
user:username
pwd:password

Note supports two Authentication Methods: http Basic64 encode and use of username/password in the param directly.


decoder_control.cgi

Description Decoder control (DigitalHam addition – LED
on)
Permission operator

Syntax /decoder_control.cgi?command=[&next_url=]

Parameters
0 up
1 Stop up
2 down
3 Stop down
4 left
5 Stop left
6 right
7 Stop right
… Reserved
25 center
26 Vertical patrol
27 Stop vertical patrol
28 Horizontal patrol
29 Stop horizontal patrol


These commands were not in the SDK but were explained to me by Dave Maddlone who got them from the source code of his camera control pages. They are not present in my control pages but the Android app I use does support goto preset.

30, 32, 34 (and probably more up to 44 as my Andoid app shows 8 presets) Set preset 1, 2, 3 etc. to current camera position.
31, 33, 35 (probably to 45) Move camera to preset 1, 2, 3 etc.

I have tested these commands for presets 1 2 and 3


… Reserved
94 IO output high (DigitalHam addition – LED on)
95 IO output low (DigitalHam addition – LED off)


camera_control.cgi

Description To control camera sensor Parameters
Permission operator

Syntax /camera_control.cgi?param=&value=[&next_url=]

Parameters

0 Resolution
8: QVGA
32:VGA

1 Brightness 0~255

2 Contrast 0~6

3 mode
0: 50Hz
1: 60Hz
2: Outdoor

5 Flip&mirror
0: default
1: flip
2: mirror
3: flip + mirror


These administrator SET commands

    • set_alarm.cgi
    • set_alias.cgi

set_datetime.cgi

  • set_ddns.cgi
  • set_devices.cgi
  • set_ftp.cgi
  • set_mail.cgi
  • set_network.cgi
  • set_pppoe.cgi
  • set_upnp.cgi
  • set_users.cgi
  • set_wifi.cgi

 

are documented here


These miscellaneous commands..

  • get_params.cgi
  • get_status.cgi
  • reboot.cgi
  • restore_factory.cgi
  • upgrade_firmware.cgi
  • upgrade_htmls.cgi

are documented here



  One Response to “IPCAM CGI SDK 2.1”

  1. Hi
    Very nice article!
    I try to find a way to take shnapshots if motion detect and save to a folder .
    I only now a bit java so i need a guide to do it.
    Thanks for help
    spyros