What is the Cat Cam ?

This was one of the original objectives for my home-server system. Since I'm leaving a computer running full time with a 5/30Mb internet connection, I might as well make it pay for itself.

Take a $29 webcam, add Zoneminder open source software (on top of a LAMP) and you have an in-home security and monitoring system.

When I travel I leave Volvo the cat to fend for himself, so I continually post an image to my frontpage with a date and timestamp of his latest entry/exit. I can also login and watch a realtime video feed or motion capture from any IP camera in the house.

Zoneminder has the ability to send an email alert when it senses preprogrammed movement within camera areas that've been defined. This makes for a cheap home or business security solution.

I know the image isn't very sharp, it's a $29 logitech webcam for fsck sake. It's dark in that corner so the camera speed is slow and Volvo is usually hauling ass when he comes in, something about the neighbour's cat kicking the ever lovin' crap out of him.

And here's the Bash script I cobbled-up to scour the cat capture for just the right image of Volvos action. Sometimes it works sometimes not, depends on how fast he's moving. And sometimes I get false alarms, like when I turn the lights on in the morn.

EDIT: 12/17/11

The bash script has been redone to utilize imagemagick manipulation to create an animated GIF available to all browsers.

#!/bin/bash
previousevent="$(cat /home/user/lastone.txt)"
ls -t /usr/share/zoneminder/events/9 >/home/user/lsdump.txt
lastone=`head -1 /home/user/lsdump.txt`
if [ "$lastone" -ne "$previousevent" ]; then
cp /usr/share/zoneminder/events/9/$lastone/*analyse.jpg /home/user/temp
cd /home/user/temp/
mogrify -resize 160x120 *analyse.jpg
convert -delay 20 -loop 0 +map *analyse.jpg /home/user/anim.gif
scp /home/user/anim.gif {remotehostuser}@{remotehostIP}:/home/user/
rm /home/user/temp/*
echo $lastone > /home/user/lastone.txt
exit 0
else
exit 0
fi


It catches racoons too

teaserpic: 
James Horvath Gooey Website
James Horvath Gooey Oooey