This DIY project of mine is a bit on the geek side, but fairly easy to do now that the bugs are out and the code is written.
Over the years I've looked high and low for a video surveillance system for my home. Many that fit the bill were in the $1,000+ category for starters.
One fateful day at Best Buy I ran across a display of Panasonic cameras. Wired for about $179, wireless for $279. Not being a fan of WhyFi,
or spending an extra $200, two of the wired model BL-C11A's were purchased.

Cool. Setup one of them wired to a switch that was already in place, and the other one wired to an Apple AirPort Express that was laying around disused.
Pretty cool with the remote pan/tilt and audio but this webpage they put up on my home network was lacking a lot.

Now to scour the web for recording software. $400? You've got to be kidding me. Hrmmm, there is already a Linux 'server' with Apache running on my network.
OK, now this was getting exciting. Turns out the motion and piezoelectric sensors buffer frames to be viewed later. Voila! There is a way to save the data too.
After fiddling with the settings a little, now the cameras ftp those pictures to my web server.
Now what? A bunch of pictures. Aha - lets use the Unix utility convert to turn them into an animated GIF file and use the camera setting to trigger Apache to run a script.

The script simply looks for jpg files in a landing space, converts them, and moves them off to an archive.
#!/bin/bash
#---------------------------------------------------------------
# Loop.cgi
# Script to capture surveillance camer input and convert
# it to animated GIF, cleanup transferred frames.
# $1 is the camera number
#---------------------------------------------------------------
Eye=$1
Dir="/storage/storage/Fedora/Eye${Eye}"
Out="/storage/storage/Fedora/Eyes"
Now=$(/bin/date +%Y_%m_%d_%H%M%S)
Num=$(ps -ef | grep "var/www/cgi-bin/Loop.cgi ${Eye}" | grep -v grep | wc -l)
if [ ${Num} -gt 2 ]
then
/bin/sleep 1
else
# Sleep if another Loop is running for this camera so we don't step on each other
/bin/sleep 60
if [ ! -z "$(ls ${Dir}/*.jpg 2>/dev/null)" ]
then
/usr/bin/convert -delay 50 -loop 0 ${Dir}/*.jpg ${Out}/Eye${Eye}_${Now}_Loop.gif
/bin/mv ${Dir}/*.jpg ${Dir}/archive/
fi
fi
So now I can watch loops of the captures that are triggered by motion or body heat in front of the camera. Also wrote a cron job to delete files older than a month.
Taking this to the next logical step, I wrote a script that generates an html file on the server with other useful data such as weather forecast, my weather stations data, camera displays, and other goodies. This runs in a browser on my laptop and gives me a live streaming view of the cameras in my office or anywhere else.
The html for the live cameras is super simple
<img src="http://192.168.0.210/nphMotionJpeg?Resolution=320x240&Quality=Standard" align="left">With very low wattage lights on a timer they even work well at night. Noise in the living room after bedtime? Just pull up a browser and the apropos home defense item


I started this setup about 2 years ago and fine tuned it ever since. The next step is setting up an away mode. When I'm out of the house working or on vacation, the system could easily email a copy of the loop to my cell and text me when it is triggered.
Hopefully someone else here may be able to make use of a setup like this. I'm into it for under $400 and a little coding, and am sure many of you could do the same. Feel free to use the code samples provided.
The camera's are still around on Amazon for about $150 and there are newer versions available for about the same price.
It may not be the best or cheapest way to do this, but it was a fun project and works well. The number of cameras can be easily expanded and outdoor models are available.
The first thing I do after getting home from a business trip, after opening a beer, is to review the video to see what's been going on while I was away.
If you have any questions, or ideas let me know.