The Pitcam
The Camera
The camera is a Connectix QuickCam, model unknown. Every thirty seconds a picture is snapped and has its orientation corrected. Every minute a thumbnail is generated for display on the HomePage.
Maintainance
Project Files
- /proj/pitcam (also in Subversion in the general repo)
- asciicam/
- footer.html – The bottom of the ASCII Cam Web page.
- header-bottom.html – The bottom of the top of the ASCII Cam Web page.
- header-top.html – The very top of the page.
- bin/
- postimage – executed after an image is taken; creates a thumbnail, and updates an RSS feed with the last time motion was detected.
- motion – A locally compiled version of motion because, as of this writing, the version in Debian unstable doesn't have on-the-fly image rotation support.
- conf/
- motion.conf – The configuration file for motion.
- htdocs/
- archive/ – archived images.
- currentpic/
- lastsnap.jpg – The last snapshot taken every 30 seconds.
- thumbnail.jpg – The thumbnail image.
- ascii.html – The ASCII Cam Web page.
- index.html – The PitCam Web page.
- robots.txt – Make sure Web crawlers don't find us.
- /priv/pitcam/
- archive/ – The old archived files, by year, month, day.
OS Stuff
To make this work on GNU/Linux, first you need to sacrifice a virgin. Then, you need to bury a chicken in the backyard of ...
Okay, it's a little easier than that.
- Install hotplug.
- Install PWC into hotplug. This black art requires knowledge from the PWC support page and the PWC hints page.
- Make sure /dev/video0 is readable/writable by pitcam, the user/group that will run motion.
- Install motion and run it using the configuration file in /proj/pitcam/conf/motion.conf.
Running It (currently from pitcam's crontab on @reboot)
$ cd /proj/pitcam/conf && sudo -u pitcam /proj/pitcam/bin/motion -D
Cleaning up after archives
Put the following into the pitcam user's crontab:
@daily find /proj/pitcam/htdocs/archive -type d -name '20*' -mtime +32 -exec rm -rf {} \;
Errors
<7>pwc pwc_isoc_handler() called with status -84 [CRC/Timeout].
The system must be rebooted.
Miscellaneous
When working on the pitcam, make sure you're using our cool new Under Construction picture!
(
)