Braggtown dot com

A Tangled Web

Motion Cameras in Linux

I recently had occasion to wonder what goes on in my yard while I’m not home. I’ve got a couple of Logitech QuickCam Messenger cameras that I’ve been pointing out the windows and use Motion to monitor the cameras, detect motion, capture images, notify me of motion events, and transfer the images to a remote server. Motion provides some handy facilities for the last two objectives. I use the Motion on_event_start to trigger a bash script that connects to various other computers, including my work desktop, and notifies me that Motion has detected movement in the camera’s field of vision. Both computers are configured to use SSH public key authentication. The bash script triggers a Zenity alert box shown below.

Zenity Alert Box

Clicking OK on the alert box opens a Firefox browser window to a Qdig Quick Digital Image Gallery. The gallery is populated via the on_picture_save option. When a picture is saved a bash script is triggered that copies the picture to the Qdig gallery directory. When the browser opens the gallery, thumbnails are dynamically generated for the contents of the directory. I can’t yet testify to the effectiveness of the system as I haven’t caught any motion yet, but I’m hopeful.  Motion also provides a mini-HTTP server that can be configured to listen to a remote port so that one could watch streaming video in real time.  In fact, motion is extremely flexible and, due the inclusion of the ability to trigger external scripts, is highly extensible.

Tags: , , ,

Leave a Reply

Spam protection by WP Captcha-Free

Bad Behavior has blocked 48 access attempts in the last 7 days.