Tuesday, April 04, 2006

An Inexpensive Home Surveillance System

I have been remotely monitoring my home for about a year now. I started with a small setup covering a single room and now have a complete system that covers all the main spaces in my home. Both my wife and I have access to the images when we are at work and this gives us a great sence of security. Also, all images from the system are archived on the home computer's hard disk for later viewing. Knowing what is happening at home with your kids and the maid while you are away at work is worth the money and effort invested in putting up a surveillance system. This post describes how I setup my system. It is fairly straight forward. But I did have my share of teething trouble :-)

My setup is fairly inexpensive and does not require high end surveillance gear. You can have a system up and running for a few thousand rupees.

Home Surveillance from Work
Images from my Home Surveillance System



Components:
  • Webcams: I have three cams running
  • USB Cables: I use a mix of passive and active extension cables. More about this latter.
  • A PC with a broadband Internet Connection: I use Iqara's "Unlimited" plan. It is useful is you have a static IP.
  • Software on the Home PC: You need a Web Server & Web Cam software. I use Apache
    Tomcat
    for the server and VisionGS.

How much does it cost?
  • Webcams: About Rs. 1000/- per cam.
  • USB Cables: Passive cables (5 meters) come for about Rs. 150/-. Active cables cost about Rs. 1300/- each.
  • Webcam Software: About $ 30/-. Credit card payments in Indian Rupees will typically attract a 3% fee.
  • Internet Connection: Rs. 880/- per month for Iqara's Unlimited plan.
Setup:

The first thing to do is setup your webcam(s). Most cams come with a driver CD. The drivers for the cheaper cams are not so good and are liable to crash at times. So the better cams like the ones from Frontech (Rs 1000/-), Logitech (Rs. 2000/- and more), though more expensive, are a better deal. The high end cams will need active USB extension cables because their power requirements are higher and a passive cable just doesn't work. Okay, back to the process; connect your cam(s), install the drivers and test the cam. You should be able to view full motion video from the cam. Now disconnect the cam and connect it back via the extension cable. Check that everything is working fine.

The next thing to do is to install the VisionGS software. VisionGS is the capture & upload part of the system. This is the piece that connects to your cam, captures an image periodically and uploads it ti whereever you specify (locall hard disk or FTP server). Installation is fairly straightforward. The application is easy to use and you can default most of the settings. After installing VisionGS, create a WebCam in it and set it to use your newly installed cam. Leave all settings alone for the time being. Just make sure you can see the full motion video from the cam.

Now comes the tricky part. If you have a static IP address then you can choose to run a web server on your home PC. Otherwise you will have to upload your cam images to a remote web server via FTP. If you have your own web site this is fairly easy to do. However if you don't then you will have to hunt around for a service that allows FTP upload.

Let us assume that you have a static IP. In this case download and install Tomcat. You can also use Apache Web Server, IIS or any other system you like. I use Tomcat because I like it; it is easy to use; it is free; it is stable; and I use Tomcat for other programming tasks too. Once you have your web server running, create a context to host your cam images.

Go back to VisionGS and open the settings dialog for your Cam. This has a long list of settings but the ones we are interested in are:
  • Capture/Upload: Here you specify the duration between captures
  • Archive: You need this only if you decide to archive images on your hard disk or a FTP server.
  • Location: Here you specify where you want VisionGS to put the captured images. Locally on your hard disk (web server's folder) or via FTP to a remote web server.
  • FTP Server & FTP Account: You need these only if you are sending images to a FTP server.
VisionGS Settings Dialog
The VisionGS Device Settings Dialog

VisionGS has a whole host of other neat features that you can use but for the sake of this article we will restrict ourselves to only the basic ones as described above.

Now that you have your webcam, the capture software and the web server installed, you are ready to test the system.

Fire up your browser and point it at your web server. If everything is working fine then you should see the image from your cam. Note that you will have to keep refreshing the page manually to see the updates.

In order to have the images refresh automatically we need to do a little more work. The first screen shot above shows a small Java viewer program that I wrote for my own use. However you can also achieve the same result using plain vanilla HTML & JavaScript. I use two HTML files to view the cam images: A "Launcher" page and a "Viewer" page. This is what the HTMl
Viewer looks like:

HTML Cam Viewer

HTML Cam Viewer

I have uploaded a couple of sample files that you can use to get started. They are available here. You will need to unzip the file to get at the launcher and viewer code. The HTML code is fairly straightforward and you can edit the required parts to point at your cam image. Note the meta tag to refresh the cam viewer. It looks like this:

<META HTTP-EQUIV="REFRESH" CONTENT="20"
Note that this code will refresh the page every 20 seconds.

These HTML files do not need to be on your web server. You can run them off your local hard disk at work. Putting them on the server does mean that you can access them from any Internet enabled PC.

Thats all there is to it!

I hope this post will help you setup an inexpensive home surveillance system of your own.

(Posted via Thinga Web)



3 comments:

Anonymous said...

Here is application you will be intrested (www.yoics.com)

You can share anything and every thing.

~
pradeep.buddaraju@gmail.com

Anonymous said...

Yes with yoics you can remote access it easy.

Marco

alarms said...

One very important element of having an alarm system in the house is those stickers and little signs on houses already equipped with one. More often than not, these signs have a psychological effect on potential home invaders that may help you even you ward them off even when you have forgotten to turn the system on.