Home Blog Archive Hardware Raspberry Pi as a security camera - how to

Raspberry Pi as a security camera - how to

  • Oct 31, 2025
  • 595
  • 0

With the Raspberry Pi and a surveillance camera, you can build a surveillance system that automatically records power. For example, this works with the Software "Motion".

The right camera for the Raspberry Pi-surveillance system

A prerequisite is, of course, a Raspbery Pi with the installed operating system Raspbian. You will also need a camera.
  • In the choice of camera, there are a few prerequisites. You should, however, be with the V4L driver (Video for Linux) compatible and also the Raspbian devices as "/dev/video0" to show up.
  • Meet this requirement, almost all of the commercially available Webcams. However, you will find on elinux.org a list of compatible Webcams.
  • Via a USB Hub, you should supply the camera with external power. In case of doubt, it may be that the Raspberry Pi provide enough current.
  • The extra for the Raspberry developed camera module is not necessarily recommended, since it is only with considerable additional effort is compatible to the Linux drivers.
  • With the command "dmesg | tail" to check if the camera works.
Surveillance camera for Raspberry Pi

Raspberry Pi as a surveillance camera: install Motion

Together with the Software "Motion" to make it out of the camera and the Raspberry a functioning monitoring system.
  • Motion is an Open Source Software that addresses the device "/dev/videoX", and the Video streams.
  • Type in the console the following two lines to install Motion "sudo apt-get update" and "sudo apt-get install motion".
  • If Motion is always to be with the system start running, edit the file "/etc/default/motion". Behind "start_motion_ daemon", substitute "no" with "yes".
Raspberry Pi as a Monitoring

Surveillance system with Motion and the Raspberry Pi to test and configure

After Installation, you can try the ready-made surveillance system, and finally configure.
  • You can test the System directly by you start Motion with "sudo motion" manually.
  • In the last line of the following output you will find the Port where you will find the Stream. "[1] Started stream webcam server in port 8081"
  • So you know that your Hardware works, and on the other, where you will find the Stream. If you move the camera, starts to make automatically pictures and stores them under "/tmp/motion".
  • Via "localhost:8081", you come on the Raspberry to the current Stream.
Monitoring via the Raspberry Pi
In the next practical tip can you find the 5 best extensions for the Raspberry Pi.

YOU MAY ALSO LIKE

0 COMMENTS

LEAVE A COMMENT

Human?
1 + 3 =