Tuesday, May 31, 2005

Roll Your Own Home Survelliance

In light of recent events, we thought it might be a good idea to show you how to whip up a low-cost home surveillance system. Not only is this system useful for nabbing burglars, but it can also be used to check in on your pets (warm-blooded or robotic), or merely to provide some added piece of mind that house and home are still standing.

With almost any generic webcam and some relatively cheap software, you can set up a motion-detecting security camera, a periodically refreshed image of your home interior/exterior, or even a live video feed direct from the excitement of your empty living room. You never know who you might catch in there someday.

Ingredients
This is what you’ll need to launch your own personal branch of the Department of Homestead Security:

Mac or PC. We’re using a laptop for our setup but you can really use anything. Once you’ve set it up, it can run headlessly and save some space. Computers with small form factors would work beautifully in this regard (hint, hint).
Webcam. On the Mac side, any Quicktime-compatible camera will do. On the Windows side, it’s also hard to go wrong. If you’ve got an old webcam lying around, it should be fine. Let’s dive in!

Home security camera: PC
If you haven’t already installed the drivers for your webcam, you’ll need to do that first. Then, download TinCam and install the software. You have 30 days to try it out and see if you want to fork over the $19.

Launch TinCam, and it will start walking you through a setup wizard. Because the wizard isn’t quite as bright as we are, you can just hit Cancel and we’ll handle making our settings manually.

Choose “Setup…” from the Setup menu. Click the “Video Devices” option in the menu at left, and check the box beside the webcam you’re using to select it:

Next, click the Auto Capture item:

Choose the “Motion detection” radio button, and in the Actions pane check the “Save picture to log directory” and “Send an e-mail” boxes. This will both save a local copy and email to you an image of the intruder, or perhaps a lovely shot of your intruding Great Dane. You can optionally have TinCam play a sound to scare off those pesky burglars; just check the “Play a sound” checkbox and Browse to find an audio file to launch upon sensor trigger. We highly recommend System of a Down for maximum impact, but it’s up to you. Just don’t choose Brahms.

Next, click on the File Names menu selection.

Here you define where you want your images to be stored. You can base the file naming on sequential number of on the time they’re snapped; the timestamp option will come in handy for our security setup. Click the Browse button beside the Log Directory text field and select where your webcam images will get stored.

Next, click E-mail in the Auto Capture submenu:

Enter the email address you wish to send to; the from address doesn’t really matter as long as it’s a valid address. Name it anything you want, just be creative. Don’t disappoint us.

Check “Attach picture to email.” You can also turn on flood control to make sure you don’t get 187 images of your cat sitting on your keyboard delivered to your inbox. Just pick whatever number seems reasonable to you. In the SMTP section at the bottom of the pane, enter the details for your mail server. If it requires authentication, check the box and enter your username and password.

Next, let’s define our motion sensor. Click on the Motion Detection option in the Auto Capture submenu. Click the define area button to call up the view from your webcam and define the area you wish to monitor (you can also use the entire viewable area by checking the “Use entire image” checkbox).

Just click and drag to create a red square that defines the sensor area.

From the Motion Detection pane you can also calibrate the sensitivity of the sensor. If you find your trigger is too trigger-happy and gets set off by your houseplants, just adjust the sensitivity by unchecking the Auto-calibrate box and using the slider.

You could also configure TinCam to upload images via FTP, if you have access to a web server and wish to have your images automagically uploaded and made viewable via a web browser. There is also a built-in image server, so you can host and serve the images locally. They’ll be accessible via browser from elsewhere in the house without much fuss, but if you want to log in to your home cam from work or elsewhere you’ll have to deal with converting what is likely a dynamic IP address (if you’re on a broadband connection) to a static IP address that a DNS server can find. TinCam offers a bit of a workaround in this regard so that you can upload a small text file that contains your dynamic IP, which you can use to create a dynamic link to your images from behind your home firewall. This is beyond the scope of this how-to, but with some fiddling you could make this a killer dorky addition to your web site. ;) You can also accomplish this by taking advantage of the excellent and free Dyndns.org service.

TinCam also technically offers a live video streaming option, but in practice it’s pretty much crap. The developers of TinCam are pretty up front about this and go out of their way to warn you that you’ll more than likely only have luck getting it to work when viewed from a Windows machine running Internet Explorer, and even then, only if the wind is coming up from the south and the moon is just shy of full. But go nuts with it - YMMV. You can simulate a video stream by uploading to your FTP server at a very high refresh rate. You won’t get an audio feed, but you’ll get something that approximates a live video feed, and it will actually be viewable in a browser that is not Evil.

Without further ado, we’re ready to test our system. Click the OK button to exit the setup window. All you need do to arm your cam is choose Auto Capture from the Capture menu. Then, quietly steal from the room and burgle your way back in to test out your cam. Make sure to trigger the area you’ve defined as your sensor area, then check your email to make sure your settings are all correct. We’re extremely embarassed to have caught ourselves in the act of stealing our own monitor:

Lucky thing we had our trusty webcam security system in place, as we were able to settle out of court and win enough in damages to get a nice, flat-panel LCD. W00t!

Wrap up
So here we’ve been introduced to the basic ingredients required to set up a home security system. Both Evocam and TinCam include multi-camera functionality, so you could use them to monitor multiple locations in and around your abode. You could extend the system in other ways as well; use a live home network video feed as a baby monitor, or perhaps do something a bit more humanitarian like taking your system mobile and keeping an eye on Paris Hilton’s Sidekick. Somebody’s got to do it.

OR, alternatively, you can just get a good monitored alarm security system from a reputable vendor, like ADT, Brinks or Protect America.