I have a really old android phone sitting in my drawer. Its high time my Galaxy Spica got a new job and so can your old device.
Start with the easy part. Install SSH Server on your device, its totally free. This app will help you remotely reboot your device, so you do not have to touch the device, after you set it up. Make sure you enable auto start of the app on boot. When creating a new server for SSH make sure you enable auto boot as well and memorize the connection port. On users tab, add a user with the password. Try to connect to the device with putty if on Windows. Type in the IP of the device (set a static IP), port and user name. Now you should be able to issue commands such as restart for restarting or restart -p for powering off. In order to do this, you have to be superuser, so type in su first.
The important app for streaming video is IP Webcam, free again. Just like SSH server, make sure you enable the setting that runs this app on boot. You can play around with other settings to fit your needs (such as lowering FPS, which helps with your device not overheating). Otherwise this app is ready to go from the start. Check out the stream by visiting 192.168.X.XXX:8080 (IP of the device along with :8080). Click on Flash tabs so you can see the video and audio stream. Really nice! Now you need to read this stream and get email notifications when a change is detected.
Last part is a bit longer, because you need to find the right settings for your camera, so you do not get too many false notifications. Install a nice application named Motion with apt-get install motion. You need to modify a few things in the configuration file with nano /etc/motion/motion.conf. Change daemon off to daemon on, which will start motion on startup. Now search for netcam_url and add http://192.168.X.XXX:8080/video. This setting tells motion where the video source is. The last of the mandatory settings is on_picture_save, which sets the action that occurs after motion is detected. Change it to something like on_picture_save echo ‘Webcam alert’ | mail -a %f -s “Webcam Alert” [email protected]EMAIL.ADDRESS. Save the file, move your hand in front of the phone and hope for the best. You should get an email that has a picture attached. These pictures are saved locally, you can change the path by altering the setting target_dir.
This should be all there is to it. You can now fine tune the settings – which parts of the screen can trigger the motion detection, how many changed pixels trigger motion detection, video recording and much much more. Have fun!