Home-made CCTV using Raspberry Pi and MotionEyeOS

What we do
What we need
How we do (Hardware)
How we do (Software)
Still shots Outcome
What we do

Have you thought about the simple, tiny and awesome house surveilance camera you can easily make with your Raspberry Pi?

 

We’re just going to do that, so bare with me. ?

How we do (Hardware)

Please insert Pi camera’s the other end into Pi’s camera slot.

 

please note the pin order is important so carefully connect it in right order! ?

 

There are some pictures for raspberry pi B and raspberry pi 2 B.

 

  • Connect with Raspberry Pi Model B

 

  • Connect with Raspberry Pi 2 Model B

How we do (Software)

First of all, you should prepare Raspberry Pi with OS.

 

Please click the following button to look into other posts for prerequisite lessons.

 

Prepare RaspberryPi

 

but please note that we're going to use different OS image this time called 'MotionEyeOS'.

 

Please click here to download the recent MotionEyeOS image for Raspberry Pi.

(At current time, motioneyeos-raspberrypi2-20180627.img.xz if you're using Raspberry Pi 2)

 

so, now we're ready to boot our Raspberry Pi with MotionEyeOS Image. Let's do initial setup then.

 

  1. Log into MotionEyeOS
  2. Initial Set-up

 

1.Log into MotionEyeOS

 

We first need to find the IP address of Raspberry Pi. 

There are a few ways to do it. 

 

  • In your router, you can examine DHCP table for Raspberry Pi
  • You can connect to Monitor via HDMI and see what ID address is being used in wifi connection
  • You can connect to Monitor via HDMI and type 'sudo ifconfig' in terminal window

 

However, if you still can't get it, just google it and see how the people are doing it.

 

2. Initial Set-up

 

  • When you type IP address of Raspberry Pi at browser, you can see the Login page to MotionEyeOS.

 

The username is admin, and there is no password

 

  • You should see a live image from the camera at this point like the following.

 

 

  • Now, Let's configure other settings for MotionEyeOS.

 

 

  • General Settings

 

I'd recommend to change password for Admin for security reason.

 

Turn ON 'Advanced Settings' and see what options we can change. 

 

You can input 'Surveillance Username and Password' as well.

 

Set the Time Zone and Hostname if you want. It's totally up to you!

 

 

  • Network

 

In this case(Raspberry Pi zero), IP address was automatically picked up as you know. 

 

so you can see what IP address the Raspberry Pi is using from this page.

 

 

  • The other options

 

You can explore the other options such as 'Services', 'Expert Settings', etc..

 

but  this is pretty much initial setup for MotioneyeOS.

 

Thanks for reading! 🙂 

Still shots Outcome

 

 

Simple house guard using Raspberry Pi



What we do
What we need
How we do (Hardware)
How we do (Software)
Still shots Outcome
What we do

Have you thought about the simple, tiny and awesome house protector you can easily make with your Raspberry Pi?

We're just going to do that, so bare with me. 🙂

How we do (Hardware)

How we do (Software)

Please note that if you buy the kit, the included micro SD card has already pre-made image in it.
so you don't need to do anything. just insert it and play.

 

However, if not or you want to follow steps and learn how software parts works,
please find the enclosed documents or instruction for further details.

 


  • Sneak peek on Software Part

First of all, you should prepare Raspberry Pi.

Please click these buttons to look into other posts for prerequisite learnings.

 

Prepare RaspberryPi

 

Once Raspberry's prepared, we need to install pygame and git packages.

 

1. pygame install
2. git install
3. clone the repository.
4. Run python script

 

Now, our RaspberryPi is ready to detect any movement with PIR sensor! 🙂

 

The full details are explained in the enclosed docs. (HouseGuard_HowWeDo_SW.txt)

Still shots Outcome

There can be other projects by using this.

For example, you can use similar things as your security system by putting this at your house doors or something. 🙂 It's all up to you!

 

 

How to use Raspberry Pi Camera via Python

What we do
What we need
How we do (Hardware)
How we do (Software)
Still shots Outcome
What we do

There are lots of ways to install and use Pi camera, but at this post we're going to handle this with Python!

How we do (Hardware)

Please insert Pi camera's the other end into Pi's camera slot.

 

please note the pin order is important so carefully connect it in right order! 🙂

 

There are some pictures for raspberry pi B and raspberry pi 2 B.

 

  • Connect with Raspberry Pi Model B

 

  • Connect with Raspberry Pi 2 Model B

 

How we do (Software)
  1. Enable Pi camera via Raspberry Pi Configuration
  2. Testing taking still image and recording working
  3. Install Python drivers for Pi cam (http://picamera.readthedocs.io/en/release-1.9)
  4. Sample Python script to test Pi cam

  • Enable Pi camera via Raspberry Pi Configuration

 

sudo raspi-config

and choose 'Enable Camera', enter and finish.

 


  • Testing taking still image and recording working

 

To test capturing still image,

raspistill -o testpicture.jpg

To test video capturing,

raspivid -o testvideo.h264



  • Install Python drivers for Pi cam (http://picamera.readthedocs.io/en/release-1.9)

 

Now, we're ready to install Python drivers

sudo apt-get install python-picamera

if you're working on Python3,

sudo apt-get install python3-picamera

More information and options are available at   PICAMERA

 


  • Sample Python script to test Pi cam

 

You can write and test Python script with Raspberry Pi Camera from now on.

 

Start a preview for 10 secs

import time import picamera 
camera = picamera.PiCamera()

try:
camera.start_preview()
time.sleep(10)
camera.stop_preview()
finally:
camera.close()

Capturing to a file

import time 
import picamera

with picamera.PiCamera() as camera:
camera.resolution = (1024, 768)
camera.start_preview()
# Camera warm-up time
time.sleep(2)
camera.capture('sampleImage.jpg')

Recoding video to a file

import picamera 

with picamera.PiCamera() as camera:
camera.resolution = (640, 480)
camera.start_recording('testing_video.h264')
camera.wait_recording(60)
camera.stop_recording()

There are tons of useful examples here at    PICAMERA

 

please look into it!

Still shots Outcome

We've just installed and learned how to use Pi camera basically.

 

so now fully ready to extend your projects with this raspberry pi with awesome camera!