0

Raspberry pi security camera

 2 years ago
source link: https://4rkal.medium.com/raspberry-pi-security-camera-f128cf71190c
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Raspberry pi security camera

In this article i will show you how to setup a raspberry pi security camera using motion. In the end of this article you will have a fully functioning security camera with a live feed and motion detection.

Requirements

  1. Raspberry pi (almost any model will work)
  2. Web cam
  3. Any kind of debian distro (with apt) installed on the raspberry pi.

Setup

In this article we will be using the motion package (https://motion-project.github.io/)

To get started power on your raspberry pi and ssh into the machine or just connect it to a monitor and a keyboard. Also connect your web cam to the raspberry pi usb port.

The first thing we will have to do is install motion, for that type the following command:

sudo apt install motion

Now start motion with:

sudo service motion start

Now we are going to change some of the default settings.To do that type:

sudo nano /etc/motion/motion.conf

The first thing that we are going to change is

webcontrol_localhost on

We are going to change it to

webcontrol_localhost off

This will enable us to access the stream from other computers.

To view the stream run:

motion

If you get a permission denied error try running

sudo motion

If you go to http://your_ip:8080 you should see a live feed of the web cam

You can change the port under webcontrol_port eg.

webcontrol_port 1234

If you only want the live stream port you can go to http://your_ip:8081

Again you can change that under stream_port eg.

stream_port 2222

Now everything should be working fine. All motion detection files will be saved in /var/lib/motion

You can also change loads of other settings. Here are my settings:https://pastebin.com/WGn0NfcW

Read the documentation here: https://motion-project.github.io/motion_guide.html

If this article helped you out a follow would be greatly appreciated.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK