Build your own a Raspberry Pi security camera

Build your own a Raspberry Pi security camera

I see you.
  • by Ash (92)
  • Time to complete: 20 minutes

Home security is no joke! Staying on top of perimeter security can be a rewarding project that guarantees a new line of safety for your household. In this guide, we'll be creating our very own Raspberry Pi security camera system. Our Raspberry Pi security camera will use a special OS designed just for managing camera feeds called motionEye OS.

What is motionEyeOS?

This free Linux based distro provides a platform to host and monitor security camera feeds. It's designed to work with a variety of small computers—including the Raspberry Pi. It comes with so many useful features such as motion detection, a web-based UI, and even email notifications.

1

Install image motioneyeos

To install motionEyeOS, visit the motionEyeOS Github repo and download the most applicable image build for your Pi. I'm using a Raspberry Pi 3 B+, so I'll be using the Raspberry Pi 3 image. The image needs to be written to a micro SD card. Connect the SD card to your computer.

To write the image to the card, I'll be using a program called Etcher. However, there are plenty of image writing programs available. You can choose your favorite or experiment to find one you like.

Once you load up the writing software, point the program to the drive letter of your SD card, write the motionEyeOS to the device, and pop it in the Raspberry Pi.

2

Raspberry Pi security camera

The camera you choose to use will ultimately vary on your project needs. Consider the intended placement of your camera. Will there be any risk of water exposure or serious temperature changes? How many cameras will you need?

MotionEyeOS can use the normal Raspberry Pi camera or detect almost any camera connected via USB. In this guide, I'll connect a simple Logitech webcam to the Raspberry Pi. Plug in your preferred camera to the Pi.

3

The motionEye OS requires a network or internet connection. For the best results, I highly recommend using an ethernet cable. Connect the cable to the Raspberry Pi. It may take a few minutes for the Raspberry Pi to appear on the network.

We will need to find your Raspberry Pi’s IP address. This will be used to access the web interface. It’s also a good idea to change the hostname of your Raspberry Pi to a unique device name.

4

Open the web interface

To access the web interface, open a browser and enter the IP address of the Raspberry Pi. You will be presented with a UI containing currently connected video feeds and room to adjust settings.

5

Customizing the settings is my favorite part! This is your opportunity to make the ultimate spy center.

You can play with the layout to show multiple feeds at once. You can adjust things like framerate, feed resolution, and even create additional accounts to help with surveillance. MotionEyeOS is built upon Motion, designed to detect changes in video feed activity, provide motion detection, and even timelapse functionality.

Commonly used features:

  • Custom scheduling - Settings > Working Schedule
  • Account configuration - Settings > General Settings
  • Advanced settings - Settings > General Settings
6

Be sure to enable Advanced settings under Settings > General Settings.

Then, open the File Storage tab. Using the Storage Device drop down menu, determine the type of file storage system you want to implement.

You can save recorded media directly to the Pi using things like SD cards or USB hard drives. This media can be accessed via FTP.

Network storage allows you to remotely backup the security footage to specific computers, cloud servers, or commercial platforms like Google Drive and Dropbox.

7

Multiple camera support

Adding multiple cameras is possible, but requires a planning and configuration.

Multiple cameras on one Pi

You can connect multiple cameras to a single Raspberry Pi motionEyeOS device. This device can be accessed using the web interface. This setup has less redundancy as each camera will fail if the motionEyeOS device is disabled.

One Pi for each camera

In this configuration, you will need an additional Pi to act as a hub for the camera/Pi devices. For example, a network with 2 camera/Pi devices will have 3 motionEyeOS Pis total including the hub device. A network of 3 cameras would need 4 Pis.

This configuration is more secure as each camera operates independently. Destroying one camera/Pi device will not affect the others. If cost is an issue, you can use the inexpensive $10 Raspberry Pi Zero for this project.

You can also use a centralized server instead of a Raspberry Pi hub. To learn more about this configuration, visit the motionEyeOS Github repository.

8

The final product

I was pretty sure we had a few extra guests in our house. I knew this would be the perfect opportunity to test the Pi Cam. I laid the trap and it didn’t take long for the Pi Cam to reassure us that—yes there is a herd of cats living our house eating all of our catnip.

Congratulations! You’re now the owner of a custom, robust security camera system. For a little extra security, consider adding a Raspberry Pi UPS to keep recording if power is lost.