Thursday, April 14, 2011

DreamPlug: motion activated webcam

The webcam tool 'motion' is pretty nice, but it needs some tweaks to the base Ubuntu/Jaunty running the DreamPlug.

Do this:

  • Enable the motion daemon. sudo emacs /etc/default/motion and set start_motion_daemon=yes

  • Allow for non-localhost access to the web interfaces. sudo emacs /etc/motion/motion.conf and change the lines to match: webcam_localhost off and control_localhost off

  • Create the default directory to hold the jpg and swf files. sudo mkdir /tmp/motion && sudo chown motion.motion /tmp/motion

  • Restart the motion daemon. sudo /etc/init.d/motion restart

  • Fire up a browser and point it to the DreamPlug's port 8080 (say http://morpheus.local:8080) and then follow the link to config then list. From there you'll probably need to set auto_brightness to on.

  • Now look at the video on port 8081 (say http://morpheus.local:8081)

After a while of it running, you don't need the browser to be on the page, take a look in /tmp/motion to find all the JPG images and SWF 'movie' files. Eventually I'll probably change the directory to live on one of the USB disks...