For the guys who do not want to compile/install/configure things, i've done a complete disk image (for the Kuro-box HG only) that you'll just have to put in your kurobox, you can download it here (it's based on the debian image with some custom modifications explained in this article) :<br />

+

For the guys who do not want to compile/install/configure things, i've done a complete disk image (I've built it for the Kuro-box HG only, people with standard Kuro-box will have to follow the [http://www.kurobox.com/mwiki/index.php/Contest_sekuro-box#The_hard_way hard way] steps to build their own image) that you'll just have to put in your kurobox, you can download it here (it's based on the debian image with some custom modifications explained in this article) :<br />

The Sekuro-box

What is the Sekuro-box ?

What can be that Sekuro-box ?
It's a security center based on the fantastic Kuro-box, it will allow you to :

Remotely watch for a place using a Webcam

Record (in jpg or avi) any activity in front of the webcam (using a motion detection software)

Keep the pictures/videos during a certain time so you'll not have a disk full problem !

Requirements

What do you need for this project ?

A Kuro-box (standard or HG)

A Webcam supported by a Linux driver

Something or someone to watch

Reading this guide

For this project, I bought a Creative Webcam for Notebook (about 50€) as it's a tiny webcam and it is reported as providing a quite good quality picture under linux, but there is cheaper webcams available (you may already have one by the way, i was one of the latest person on earth without a webcam).

Some examples of how it looks like

Here is a sample of what you can get :

That what we call "caught in action" !
As you can see, this allowed me to have the proof that my cat was going on the sofa when we're away, even if he knows that it is totally forbidden ! With that proof, i finally applyied an immediate sanction : no meat for 1 month !
I guess you can think about some applications in your case :D

The easy way

For the guys who do not want to compile/install/configure things, i've done a complete disk image (I've built it for the Kuro-box HG only, people with standard Kuro-box will have to follow the hard way steps to build their own image) that you'll just have to put in your kurobox, you can download it here (it's based on the debian image with some custom modifications explained in this article) :Sekuro-box image v1.0Note that this image is compatible with "standard" boot and with U-boot !

Usage is "simple" :

As with this image, your kuro-box will ask for an IP adress using DHCP, make sure that you have a DHCP server to serve an IP to the kurobox :)

The image is based on Debian, check Install Debian for installation details !

Default user is unchanged from original debian image (tmp-kun/tmp-kun)

First time you run the image, create a /mnt/webcam folder to store all pictures/videos

Plug your webcam in one of the USB connector (webcam support is done through SPCA5xx & PWC drivers, check the links to know if your webcam is supported)

Here you'll have a record of past events, and you'll be able to watch the live stream from you webcam !

The hard way

First of all, you'll need a development environement with gcc & needed stuff !
I suggest you installing a Debian image as it will save a lot of time installing all needed applications ;)
With Debian, install the developement tools this way :

export ARCH=ppc => as it will use kernel sources to compile, we need this line !
make

Install module

make install

now plug your webcam and check that the spca5xx module is loaded :

> lsmod

Others drivers

If you need another driver :
If you found another driver to handle your webcam, then the process to install it should be almost the same (don't forget the "export ARCH=ppc", it is really important if you want your driver to compile correctly.
<to be completed...>

Motion application installation

Now that the webcam driver is installed, we will install the application that will process the output of the webcam !
We will choose motion as it allows to capture pictures/videos when a mouvement is detected in the field of the webcam, and its CPU needs are compatible with the Kuro-box CPU !

Configure capture resolution (320x240 is recommended as 640x480 is too much for the Kuro-box)

width 320
height 240

Set framerate to a value that will not overload the Kuro-box (5 fps seems to be a good value)

framerate 5

If you want motion to create a video from the captured picture, set this : (warning, it's using a lot of CPU and therefore cause motion instability)

ffmpeg_cap_new on

Choose the compression method :

ffmpeg_video_codec mpeg4

or

ffmpeg_video_codec msmpeg4

Set target dir to /mnt/webcam

target_dir /mnt/webcam

Set webcam port to 8000 and allow anyone to connect it :

webcam_port 8000
webcam_localhost off

Video encoding application installation

If you want to be able to record videos, you'll also need to install ffmpeg !

ffmpeg installation :

apt-get install ffmpeg

Web survey pages installation

You'll need to install an http server with php support if you want to be able to check if your webcam have detected something ! For this, you should follow the firsts steps of my Install Torrentflux + Transmission + SQLite guide !
Modify lighttpd to allow .cgi execution :

nano /etc/lighttpd/conf-available/10-cgi.conf

and add the this line in "cgi.assign" section :

".cgi" => "",

I did an updated version of MotionCGI you'll have to install in your server home :

Now you can log to http://kurobox_ip/motion ! The web interface will allow you to check captured images/videos and most impotant thing, it'll allow you to start or stop the motion daemon !

Cron job to clean old files

If you let motion fills your hard disk with pictures/videos, you'll fast have the disk full problem !
To prevent that, we will set up a cron job to clean files older than 30 days (you can change that value for your needs) !
First, install cron :

apt-get install cron

Then add the cron job :

crontab -e

enter this line :

00 20 * * * find /mnt/webcam -mtime +30 -exec rm {} \;

Every days at 20:00 (08:00PM), it'll check for files older than 30 days in /mnt/motion and delete them !