DM&P WebCamera Firmware

WebCamera Home Page: http://www.dmp.com.tw/app/webcamera/ 2001/11/05

Index:

(This document is for WebCamera version 1.20 or later.)

Read Camera Image From WebCamera

The way to read image from WebCamera is easy. You can type http://(WebCamera URL)/xyz.ws0 to get image of camera 1. The key point is that *.ws0 tells WebCamera to send image camera 1 and *.ws1 for camera 2, etc. The file name "xyz" is any name you want. We name file name to combine date and time in WebCamera home page. You can name the file accord with your need. For example, you can send a HTTP request:

http://x.x.x.x/camera1-2001-10-05-08-30-00.ws0
http://x.x.x.x/camera2-2001-10-05-08-30-00.ws1
http://x.x.x.x/camera3-2001-10-05-08-30-00.ws2
http://x.x.x.x/camera4-2001-10-05-08-30-00.ws3
Those four requests will read images of camera 1, 2, 3 and 4. The file name will help you to manage images.

The Script in WebCamera Home Page

The script in WebCamera home page is written with Java script. It sends request to get camera image every time interval and maintain 1/4/16 views. For example, this page will refresh image of camera 1 on 210.242.175.22 every 500ms:
<HTML>
<HEAD>
<TITLE>WebCamera Example</TITLE>
</HEAD>
<SCRIPT>
var i=1;
function Init()
{
  setInterval("Refresh()",500);
}
function Refresh()
{
  document.Camera.src="http://210.242.175.22/"+i+".ws1";
  i++;
}
</SCRIPT>
<BODY onLoad="Init()">
<IMG NAME=Camera WIDTH=352 HEIGHT=240>
</bODY>
</HTML>

There are some examples can be ran in Netscape Navigator and Microsoft Internet Explorer:

ex-1-1.htm Refresh one camera every 500ms.
ex-1-2.htm Refresh one camera with full speed.
ex-2-1.htm Refresh four cameras every one second.
ex-1-2.htm Refresh four cameras with full speed.
ex-3.htm Demo example for special image layout.

Screen of ex-3.htm

Localize Web Pages Inside WebCamera

You can find all web pages in the directory "www" when you use FTP to connect to WebCamera. Download all *.jgi and relpace the English string in the files to your local characters. For example (this line is from permit.jgi):
<td bgcolor="#99ccff" align=right>User Name</td><td><input type=text name=id size=12></td>
You can replace "User Name" with "Account" or local characters. There are JGI files:

main.jgi The home page of WebCamera
permit.jgi Login page
config.jgi System configuration page
security.jgi Security setup page
tunning.jgi Fine-tunning page
recevent.jgi View record page
datetime.jgi Set date and time page

And you can modify any JGI files to add your links and pages.

Control Strings in JGI Files

All control string in JGI files will start with the "~", and WebCamera will interpret the control string. For example, the "~hour" will be reaplced with the current time when WebCamera read it. The control string should be placed in single line. This line "Cuttent time is ~hour and..." should be written like this:

Current time is
~hour
and...

Thete are control string that WebCamera will replace them with tags for table and form.

The "value" are the value of parameters.
Name Description
~year <input type="text" size=4 maxlength=4 value="2001" name="year" size="7">
~month <input type="text" size=4 maxlength=4 value="10" name="month" size="7">
~day <input type="text" size=4 maxlength=4 value="24" name="day" size="7">
~hour <input type="text" size=4 maxlength=4 value="13" name="hour" size="7">
~min <input type="text" size=4 maxlength=4 value="30" name="min" size="7">
~sec <input type="text" size=4 maxlength=4 value="00" name="sec" size="7">
~quality ImgQlt <input type="text" value="1" name="ImgQlt" size="7">
~lum ImgLum <input type="text" value="90" name="ImgLum" size="7">
~contrast ImgCtr <input type="text" value="80" name="ImgCtr" size="7">
~prerectime <input type="text" size=8 maxlength=8 value="10000" name="prt" size="7">
~aftrectime <input type="text" size=8 maxlength=8 value="10000" name="art" size="7">
~alarmperiod <input type="text" size=8 maxlength=8 value="0" name="ap" size="7">
~mailserver <input type="text" size=64 maxlength=128 value="210.242.175.10" name="msa" size="7">
~mailserver <input type="text" size=64 maxlength=128 value="webcamera@dmp.com.tw" name="mta" size="7">

If the options are actived, "checked" attribute will be added.
Name Description
~imagesizef <input type="radio" value="f" name="ImgSize">
~imagesizes <input type="radio" value="s" name="ImgSize">
~imagesizeq <input type="radio" value="q" name="ImgSize">
~securityy <input type="radio" value="on" name="security">
~securityn <input type="radio" value="off" name= "security">
~viewlimit <input type="checkbox" name="viewlimit">
~ch2enable <input type="checkbox" name="ch2en">
~ch3enable <input type="checkbox" name="ch3en">
~ch4enable <input type="checkbox" name="ch4en">
~ch4enable <input type="checkbox" name="ch4en">
~sensor1 <input type="checkbox" name="sensor1">
~sensor2 <input type="checkbox" name="sensor2">
~sensor3 <input type="checkbox" name="sensor3">
~sensor4 <input type="checkbox" name="sensor4">
~onalarmr1 <input type="checkbox" name="record1">
~onalarmr2 <input type="checkbox" name="record2">
~onalarmr3 <input type="checkbox" name="record3">
~onalarmr4 <input type="checkbox" name="record4">
~onalarmm1 <input type="checkbox" name="mail1">
~onalarma1 <input type="checkbox" name="alarm1">

Name Description
~eventlist WebCamera will generate a table for event list.

Use URL Request to Setup WebCamera

User can use URL requests to setup WebCamera. It is helpful for programmer who want to use their program to setup WebCamera.

Login

Before you want to send requests to setup WebCamera, you should pass the password check with this URL request:
permit?id=root&pwd=password&login&login

Commands for login are:
Name Description Value
id User name ---
pwd Password ---

Fine-Tunning

If you want to set fine-tunning parameters, you can send this URL request:
config?ImgQlt=1&ImgLum=90&ImgCtr=80&ImgSize=q

Commands for fine-tunning are:
Name Description Value
ImgQlt Quality 1(Hight)-31(Low)
ImgLum Luminance 0(Dark)-255(Bright)
ImgCtr Contrast 1(Min)-127(Max)
ImgSize Image Size f=Full screen, s=SIF, q=QSIF

Date & Time

You can send this URL request to set date and time:
config?year=2001&month=10&day=6&hour=12&min=30&sec=0&chdt=on

Commands for date and time are:
Name Description Value
year Year >2000
month Month 1-12
day Day 1-31
hour Hour 0-24
min Minute 0-60
sec Second 0-60
chdt Enable date and time setup ON/OFF

Security

There are a lot of commands for security. For example, if you want to turn security and browse limit on, sensor 1 detect enable and send mail, sensor 2 detect enable and set alarm output, alarm record (ahead) to 1 second.... Send this URLrequest:
security?security=on&viewlimit=on&ch2en=on&sensor1=on&mail1=on&ch3en=on&sensor2=on&alarm2=on& prt=10000&art=10000&ap=0&msa=210.242.175.10&mta=webcamera@dmp.com.tw

Commands for security are:
Name Description Value
security Security System ON/OFF
viewlimit Browse limit ON/OFF
prt Alarm Record Ahead Any Value
art Alarm Record Time Any Value
ap Alarm Output Period Any Value
msa Mail Server IP Address Ex: msa=210.242.175.10
mta Receiver list Ex: mta=webcamera@dmp.com.tw;dsock@dmp.com.tw
ch2en Channel Enable ON/OFF
ch3en Channe2 Enable ON/OFF
ch4en Channe3 Enable ON/OFF
ch4en Channe4 Enable ON/OFF
sensor1 Sensor1 Detect Enable ON/OFF
sensor2 Sensor2 Detect Enable ON/OFF
sensor3 Sensor3 Detect Enable ON/OFF
sensor4 Sensor4 Detect Enable ON/OFF
record1 Sensor1 Save Image ON/OFF
record2 Sensor2 Save Image ON/OFF
record3 Sensor3 Save Image ON/OFF
record4 Sensor4 Save Image ON/OFF
mail1 Sensor1 Send Mail ON/OFF
mail2 Sensor2 Send Mail ON/OFF
mail3 Sensor3 Send Mail ON/OFF
mail4 Sensor4 Send Mail ON/OFF
alarm1 Sensor1 Set Alarm Output ON/OFF
alarm2 Sensor2 Set Alarm Output ON/OFF
alarm3 Sensor3 Set Alarm Output ON/OFF
alarm4 Sensor4 Set Alarm Output ON/OFF

Reboot

You can send this command "config?reboot=on" to reboot WebCamera. Before sending this command, you should login first. This command is supported on version 1.21 or later.
Name Description Value
reboot Reboot WebCamera ON

Support

If you have any problem with the WebCamera, mail to webcamera@dmp.com.tw please.


Jan Yin Chan Electronics Co., LTD. All rights reserved. Email us: info@dmp.com.tw