In this tutorial we will learn, how to make your own webcam as a motion detection camera, which will not only stream live video but also send you motion captured video and images on Google drive as well as alert on gmail. If you want, it can also record video/ Images to local drive. So lets get started.

This project can be used in,

  1. Home Security System,
  2. Burglar Alert System,
  3. CCTV Monitoring System,

Thanks to motioneyeos, with the help of motioneyeos you can make complete home security system with raspberry pi by no time.

Components Required:
  1. Raspberry pi 4,
  2. Pi Cam V2.1,
  3. WebCam, (any webcam, I am using my old webcam),
  4. Lan Cable.

We can connect two cameras or more if you want.

Required Software:
  1. SD Card Formatter,
  2. Etcher,
  3. Angry IP Scanner,
  4. OpenJDK (optional).
Download Motioneyeos:

Select motioneyeos raspberry pi version, In my case I am using raspberry pi 4. Download motioneyeos.

Formatting SD Card:

We will need to format our SD card with the help of SD card formatter.

SD card formatter


Select Image, Select SD card and click on Flash. Etcher will Flash motioneyeos image into SD card. After flashing complete, remove SD card and insert it in the raspberry pi.

Etcher Flashing raspberry pi sd card

Setup Camera:

Connect Camera either webcam or picam or Both. In this tutorial I am connecting both the camera & plug the power.

Connecting Raspberry pi with LAN Cable:

First time setup, you will need LAN cable for connecting raspberry pi and your router. After first time setup we will change connection type to wifi, so next time you don’t need LAN cable.

Waiting for motioneyeos boot:

Wait for at least two minutes this is very important step.

Angry IP Scanner:

After powering raspberry pi wait for two mintues then open Angry IP scanner, For finding IP address we will need IP scanner, but you can also see IP address on your router admin page. Click on Test. It will show you all the IP addresses which are connected to your router, search for MEYE-XXXX, copy IP address.

IP Scanner

OpenJDK (Optional):

If Angry IP scanner shows you error while opening or give you a message download OpenJDK. Then you will need to download and install this software.

Streaming Live Video & Setup:

Paste that IP address you copied earlier in angry IP scanner or router admin page. Now you will be able to see one camera on screen.

Below image is final output.

multiple camera with raspberry pi

Add Camera:

Click on add camera and select camera type and camera. Click on apply.

motioneyeos adding multiple camera


Turn on Wireless network and enter your WiFi Credential and Click on Apply and wait for it to restart.

motioneyeos network

After it restart, go to power click on shutdown.

motioneyeos shutdown

Now you can remove your LAN cable, plug the raspberry pi power again, search for IP address with IP scanner. If you don’t to find IP address every time you can set static IP address.

Admin Login:

If you are unable to see options in menu, click on profile icon and USERNAME: admin and leave blank for password, click Login.

motioneyeos login


You can change text & text size which is appearing left and right bottom side of camera.

motioneyeos Text overlay

Video Device:

In video device, enable automatic brightness. Change resolution, camera angle & frame rate according to your need.

motioneyeos video device

Video Streaming:

Enable video streaming, Set streaming frame rate and streaming quality. Streaming URL for this camera is available at IP_address:8081 eg., Similarly you can take snapshot using snapshot URL.

motioneyeos video stream

Still Images:

If you want to capture motion detected images, Enable Still Images. In capture mode select motion trigger.

motioneyeos still images


we want to record video when motion detection happen, so enable movies.

motioneyeos Movies

Motion Detection:

Increase value of “frame change threshold” to anywhere between 2 to 20%. 0 is for more sensitive, which is also lead to false detection.

motioneyeos motion detection

Motion Notification:

If you want to receive notification via email when motion detected, you can enable motion notification. Also fill the information for sending an email.

motioneyeos motion detection notification

File Storage:

If you want to store motion detected videos/Images on google drive or drop box, Enable “upload media files”. Select google drive in upload service. In location create folder name. Click on obtain key, give permission to motioneyeos and you will get Authorization Key. Paste here in Authorization Key. Click on Test Service, if nothing happen just wait for few minutes and click on apply.

motioneyeos File storage

Working Schedule:

You can also set schedule for motion detection.

Access Motion Detected Videos / Images:

There are two ways you can access video and images

1) You can play or watch images on camera itself, just move cursor to the camera, click on play icon button for video and image icon for images.

Access video

2) If you enable google drive upload, you can get directly access to the videos and images there.