Introduction: Raspberry Pi Home CCTV System
Hello,
In this instructable, I will be showing you how to make a small CCTV system using the raspberry pi. I have wanting to do this for a while and have now got round to doing it! For this build, you will need the following:
1. A raspberry pi (Model B or later)
2.A webcam (Anyone will do)
3.An ethernet cable or wifi dongle (to connect to the internet)
4. An SSH client to connect remotely to the Pi. PuTTY, for windows or vSSH for mac. (You can also use vSSH lite)
5. A power cable
6. An HDMI or composite cable
7. A monitor ot TV
Follow along carefully and enjoy the build!
Step 1: Step 1: Seting Up Your Pi
1. The first step is to make sure you pi is connected to the internet. Click here on instructions on how to set up a wifi dongle. If you have already install ed your dongle or ethernet cable, then type into the command line, hostname -I. If you see a valid IP address like this eg. 192.168.1.14, then you are connected to the internet!
2. Next open up your SSH client ie. putty or vSSH. In the space that says 'Host' or 'Hostname', type the IP address you saw earlier on your raspberry pi. ie 192.168.1.14. Once this done, click 'connect'. It may ask if you want to connect, click 'yes permanently'. Next, if it asks you, type your login username and password, pi and raspberry by default.
3. After this you need to do is update your raspberry pi. To do this type, sudo apt-get update.
Step 2: Step 2: Installing the Software
One of the most important parts of the project is installing the camera software. The software is called 'Motion'.
1.First, install Motion by typing, sudo apt-get install motion. When it asks if you want to continue, press y and then enter
2. Now attach your webcam to one of the USB ports.
3. To make sure it is connected type, lsusb. If you see the name of your webcam, then it is connected.
Step 3: Step 3: Configuring Motion and Starting the Software
This will configure motion to start and begin to stream.
1. To enter the configuration file type,sudo nano /etc/motion/motion.conf.
2. The two things you need to change are, Daemon from OFF to ON and webcam_localhost from ON to OFF. If you want to search the file, press CTRL and C.
3. Exit the file by pressing CTRL and X then Y and enter.
4. To allow motion to start, type sudo nano /etc/default/motion. Once in the file, change start_motion_daemon=no to start_motion_daemon=yes.
5. Finally to start the program type, sudo service motion start.
Step 4: Step 4: Viewing the Data
To view the stream from the camera, you will need to do the following.
1. In your web browser, type http://"your IP address":8081. (PS. Don't use Chrome. It doesn't work well!)
And THAT IS IT!!!
You will now see the live stream!!
Congratulations!
If you have any problems, please leave them in the comments bellow.
Many thanks
Cameron