Time-lapse camera details

The packages in openwrt-nslu2-uvc-webcam2 are:

base-files-ixp4xx - 12-r10861 -
busybox - 1.8.2-1 -
dosfstools - 2.11-1 -
dropbear - 0.50-3 -
e2fsprogs - 1.39-1 -
fdisk - 2.13.0.1-1 -
hotplug2 - 0.9+r102-2 -
ixp4xx-microcode - 2.4-1 -
kernel - 2.6.24.2-ixp4xx-1 -
kmod-fs-ext2 - 2.6.24.2-ixp4xx-1 -
kmod-fs-ext3 - 2.6.24.2-ixp4xx-1 -
kmod-fs-hfsplus - 2.6.24.2-ixp4xx-1 -
kmod-fs-vfat - 2.6.24.2-ixp4xx-1 -
kmod-ipt-nathelper - 2.6.24.2-ixp4xx-1 -
kmod-leds-gpio - 2.6.24.2-ixp4xx-1 -
kmod-nls-base - 2.6.24.2-ixp4xx-1 -
kmod-nls-cp1250 - 2.6.24.2-ixp4xx-1 -
kmod-nls-cp437 - 2.6.24.2-ixp4xx-1 -
kmod-nls-cp850 - 2.6.24.2-ixp4xx-1 -
kmod-nls-iso8859-1 - 2.6.24.2-ixp4xx-1 -
kmod-nls-iso8859-15 - 2.6.24.2-ixp4xx-1 -
kmod-nls-iso8859-2 - 2.6.24.2-ixp4xx-1 -
kmod-nls-koi8r - 2.6.24.2-ixp4xx-1 -
kmod-nls-utf8 - 2.6.24.2-ixp4xx-1 -
kmod-scsi-core - 2.6.24.2-ixp4xx-1 -
kmod-usb-core - 2.6.24.2-ixp4xx-1 -
kmod-usb-ohci - 2.6.24.2-ixp4xx-1 -
kmod-usb-storage - 2.6.24.2-ixp4xx-1 -
kmod-usb2 - 2.6.24.2-ixp4xx-1 -
kmod-video-core - 2.6.24.2-ixp4xx-1 -
kmod-video-uvc - 2.6.24.2+r151-ixp4xx-1 -
libblkid - 1.39-1 -
libgcc - 4.1.2-12 -
libjpeg - 6b-1 -
libpthread - 0.9.29-12 -
libuci - 0.3.3-1 -
libuuid - 1.39-1 -
mjpg-streamer - r56-1 -
mtd - 6 -
ntpclient - 2003_194-6 -
uci - 0.3.3-1 -
uclibc - 0.9.29-12 -
udevtrigger - 106-1 -
vsftpd - 2.0.6-2 -

/etc/init.d/done is:

START=95
boot() {
 [ -d /tmp/root ] && {
 lock /tmp/.switch2jffs
 firstboot switch2jffs
 lock -u /tmp/.switch2jffs
 }
 if [ -e /dev/video0 ]; then
 echo 1 > /sys/class/leds/ready/brightness
 sleep 3
 if [ -e /dev/sda1 ]; then
 # Camera and USB drive ; record to drive and run cron job to flush old files
 echo 1 > /sys/class/leds/disk-1/brightness
 /sbin/mjpg_streamer  -i "input_uvc.so -y -r 1600x1200"\
 -o "output_file.so -f /mnt/usbdrive -d 9500"\
 -b
 if [ ! -e /etc/crontabs/root ]; then
 echo "*/3 * * * * /root/stopwhenfull" > /etc/crontabs/root
 /etc/init.d/cron start
 fi
 elif [ -e /dev/video1 ]; then
 # Two cameras; run two web pages
 echo 1 > /sys/class/leds/disk-2/brightness
 echo 1 > /sys/class/leds/disk-1/brightness
 /sbin/mjpg_streamer  -i "input_uvc.so -d /dev/video0 -f 15 -r 960x720"\
 -o "output_http.so -p 80 -w  /webcam_www"\
 -b
 /sbin/mjpg_streamer  -i "input_uvc.so -d /dev/video1 -f 15 -r 960x720"\
 -o "output_http.so -p 8080 -w  /webcam_www"\
 -b
 else
 # One camera; run one web page
 echo 1 > /sys/class/leds/disk-2/brightness
 /sbin/mjpg_streamer  -i "input_uvc.so -f 15 -r 960x720"\
 -o "output_http.so -p 80 -w  /webcam_www"\
 -b
 fi
 else
 # No camera!
 echo 1 > /sys/class/leds/status/brightness
 fi
 # set leds to normal state
 . /etc/diag.sh
 set_state done
}

/root/stopwhenfull is:

#!/bin/sh
# Script that stops imaging when the disk is nearly full
space=`df /mnt/usbdrive | tail -1 | awk '{print $4}'`
if [ "$space" -le 15000 ]; then
 # To leave powered on, uncomment the following and comment out poweroff
 #killall mjpg_streamer
 #echo 1 > /sys/class/leds/status/brightness
 #umount /mnt/usbdrive
 poweroff
fi
  1. A Megapixel Time-lapse Camera System « The Machine in Shaft Ten

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: