There’s nothing higher than Guys’ Night time, a night of gaming or motion pictures in my basement media room. The one bother is once we (invariably) order pizza, as a result of I can’t hear the doorbell from there. The answer: a reasonable DIY digital surveillance system tied to Twitter.
We began with Linux, which might be custom-made to incorporate simply the elements wanted to run the digital camera. Then we put in a camera-management app, ZoneMinder, that may report video frames and examine them to detect movement. Throw in an previous video-capture card and a $50 digital camera, and we’ve bought a pro-quality video surveillance rig. Higher nonetheless, when the system detects movement on the door, the software program posts messages to Twitter, texting my cellphone (free of charge!) that the pizza has arrived.
Make a Pizza Cam
Time: 14 Hours
Rescue an previous PC
It’d be straightforward to arrange any variety of trendy providers to perform some type of fundamental monitoring – assuming you’ve got the spare case for a contemporary PC and associated gear. However for one thing this frivolous and enjoyable we sought to assemble it as a lot as potential from low-buck rescued gear. So we discovered a nine-year-old 1 GHz PIII with 256 meg of RAM mendacity across the closet. Earlier than it was deserted, it was an workplace desktop.
Set up Your Favourite Taste of Linux
The important thing to the low-buck program: choosing an working system that doesn’t hog a lot of the PC’s assets that it may’t nonetheless run the digital camera. Although there are tons of choices available-–verify Wikipedia for an ideal comparability of what’s obtainable–-we selected Gentoo.
Better of all, Gentoo is free. You possibly can obtain an ISO file of Gentoo’s “rescuecd” – a boot disc that permits you to check out the working system and set up it in your rescued PC.
Some Linux geeks dislike Gentoo as a result of its set up bundle forces you to incorporate or exclude each single driver and little bit of performance. However this works to our benefit, as we are able to take away just about all the things. The choices you choose will rely in your PC, however simply bear in mind to maintain it as slim as potential.
Set up ZoneMinder
Zoneminder is a free, open supply digital camera management software which can help you view your digital camera’s output through an internet browser – plus report and carry out different duties upon movement detection. And since Zoneminder detects movement by evaluating every body to the subsequent, you received’t want any particular tools.
Zoneminder requires the Apache net server in addition to the MySQL database server. These are additionally free and simply obtained from their respective homesites – or higher but instantly through the Gentoo emerge command.
Purchase and set up a digital camera and (if wanted) seize card
We scored a small infrared digital camera at CompUSA full with mounting bracket and 100′ of wire for $50. It may possibly’t see very far with simply its tiny infrared LED lights, so it’s no night-vision wiz. Nevertheless it handles twilight very effectively, and my porch mild gives loads of mild to ship an ideal image at night time.
Since our digital camera terminated in a typical composite video connection, I additionally picked up a reasonable seize board. Virtually any seize board will work, however once you’ve discovered deal on a board it by no means hurts to do a Google search or two to see if anybody else has run into points with it. You’ll additionally save your self money by shopping for an older seize board; you don’t want the performance of recent ones, and also you’re extra prone to discover Gentoo drivers for boards that’ve been round for some time.
Zoneminder can even work with quite a few webcams, together with some wi-fi fashions. So in case you have an previous one sitting round, you would possibly think about using it as a substitute.
Regardless, you’ll wish to plug within the digital camera and check it earlier than you pull a number of wire. I ended up utilizing nearly all the offered 100′ to run the wire out from an upstairs workplace tools closet into the attic, out a vent below the sting of the roof, down a gutter, and throughout to the entrance of the home.
Write a script (or use ours)
Inside Zoneminder you’ve got the choice to create “occasion filters.” Whereas you should utilize this function to archive previous video recordsdata, you can too use it to run a script. Simply outline your occasion and add the situation and filename of your script within the “Execute command on all matches” discipline.
Be aware that you would be able to’t cross parameters on this discipline, which implies that your script received’t know lots in regards to the particular occasion.
To maintain us from restarting the server again and again, we wrote a single script referred to as zm-walkway-event.sh that calls others (obtain all of them right here).
You possibly can then create secondary scripts to take no matter motion you’d like on movement detect. We began with a easy tweet utilizing this script:
As you may see within the code, you may select to both Tweet publicly or to ship a direct message. If you wish to Tweet to a standard stream privately, simply create an account for your own home and set it to guard its updates. Then ship observe requests out of your regular account and any others you’d prefer to see the updates.