While it is not possible to always keep an eye on your home or business while you are away we can make a world webcam to watch only important incidents, with a lower-cost solution. Presented here is a Raspberry pi server that can monitor and transfer data for you to access anywhere around the globe.
Traditional wireless CCTV cameras are inexpensive but anyone with a wireless receiver can view your signal and video feeds. On the other hand, IP cameras are secure but can be quite expensive, and usually the video quality is poor, unless you go for a very expensive model.
Raspberry Pi (or Raspi) is a credit card size computer that has the capability to become a camera security system along with an inexpensive webcam (Logitech in this case), a wireless Wi-Fi module and an optional battery pack. With these you can make a remote, motion activated camera costing lesser than those available in the market.
The raspberry pi server is based on motion software, which enables the webcam to detect motion and start recording images as well as videos. A script written in Python then directs the mail component running on Raspi to send email notifications with attached images and videos to the pre-defined email address. This email is sent every time any motion is detected by the camera.
Raspi is perfectly equipped to turn your USB based webcam into a functional IP webcam that can be accessed from anywhere with an Internet connection.
In this project, the webcam is hidden inside a door so it can be used to see people as they come and go. When motion is detected, a notification email is sent to you with attached images and videos. Thus, you can track any movement and get the information in a pre-defined email address anywhere in the world.
Functional diagram of Raspi as the world webcam is shown in Fig. 1.
Get the software ready. To start, you need Raspi with an Internet connection. Next, update it to ensure that it has all the latest software and drivers. Run the command given below, in the terminal, to update the operating system (OS) installed on Raspi:[stextbox id=”info”]$ sudo apt-get update
$ sudo apt-get upgrade[/stextbox]
Install software Motion. This is a program that monitors video signals from cameras and can recognise any changes in the videos or images being captured by the camera.
The program is written in C language and is made for nix based OSes. Motion is a command line based tool whose output can be image files or mpeg video sequences. It is ideal for keeping an eye on your possessions, keeping only those images that are important and useful.
In this project, we report the following motion features:
1. Detect motion defined by the number of changed pixels
2. Take pictures and video recordings, store these and send by email
3. Make video recordings and store them sending by email
4. Run the following command to install Motion:
$ sudo apt-get install motion
Run the following command to find out if the camera attached to Raspi has been detected by the OS or not:
[stextbox id=”info”]$ lsusb[/stextbox]
Your camera must be listed as a USB device. If not, get it to work properly before proceeding further. Next, configure Motion.