Monthly Archives: January 2013

Using a Raspberry Pi as a CCTV

I’m using a Raspberry Pi to control a webcam running a CCTV with motion. The hardware setup is the following:

  • Raspberry Pi Model B
  • “Old PC” running motion
  • Logitech C270 HD connected to “Old PC”
  • An “old” Nexus S with IP Webcam used as a network camera
  • LEDs for visual info on whether motion detection is active or not

The software setup is the following:

  • Raspian “Wheezy”
  • Tightvnc for headless control
  • motion
  • Home made bash scripts to communicate with the Pi GPIO ports and monitor the door lock, control the LEDs and motion

Files are automatically uploaded to my Dropbox account so that I can check the video in the event of activity detected, but also should the worst happen, I have access to the videos showing who stole my Pi ! So that the motion detection only works when needed, I’ve connected my RPi to the lock in my door: When the door is locked, motion detection is active. Otherwise the detection bit is “dormant”.

11 Sept 2015: I’ve moved house and decided to go away from the “poor” quality of the webcam and smartphone (no night vision, when it rains on the window it blurs the pictures and triggers “false” motion due to the falling water drops) and plan on buying “real” CCTV cameras in the near future

RPi Web Control

I have made progress and based on an instructables guide (see my previous article) I completed the design of my Web RPi control panel.
See below screenshots.
RPi_Web_Control_1

RPi_Web_Control_2

And here is the code for those who want:

GPIOServer.sh:

 

control.php: