Zoneminder - A Homemade Security System

Home security is important more and more. And if your a geeky type with a few webcams kicking around you can turn your linux box into a home security system.

Below I will give you a rough go by to setting up a security system which includes a webcam thats attched to the linux box, an ip camera, and a camera attched to a windows box.


Install Required Packages


The libnet-sftp-foreign-perl package is only needed if you want to upload events to a server via sftp, regular ftp uploading will work without it


As part of the install it will ask you for a password for mysqlserver, this can be whatever you wish but make sure you remember it. As well it will set up a mailname and ask you to configure a nullmailer. Follow the prompts unti finished.


Configure Apache


Add Web Data User Into The Video Group


Add Permissions To Your Webcam


Replace /dev/video0 with whatever device you have for input. /dev/video0 is the default for the first video device but if you have several plugged in you will have to look and see what one pertains to your webcam.


Restart Apache


Access The ZoneMinder Web Interface

Open a browser and point it to http://127.0.0.1/zm


Add A Monitor

A monitor is a input, be it a webcam, ip cam or video input device.


Add A Local Webcam

  • *) On the main site click "add a monitor"
  • *) In the pop up window on the general tab, enter a name
  • *) Set source type to "local"
  • *) Go to the Source tab and under device path enter "/dev/video0" (replace with your webcam device)
  • *) For the capture method, device format, capture palate as well as capture width and height you will have to play around with or look online to see what settings are best suited for that perticular camera. I found the program "guvcview" helpfull in pinpointing what I needed, you just have to play around with it


Add A IP Camera

  • *) On the main site click "add a monitor"
  • *) In the pop up window on the general tab, enter a name
  • *) Set source type to "remote"
  • *) Go to the Source tab and under remote protocol select http, select remote method to simple, under remote host input the ip address or hostname of the camera, select the port it is running on, under the remote host path enter the full path to the video stream, and finally set the color bitrate as well as capture size in pixels
Generally the only hickup you will receive is the remote host path setting which you may get from googling or playing around with the web interface of the camera.


Stream a Webcam

If you have a usb connected webcam and cant get zoneminder to talk to it I covered how to set up a streaming server for linux and windows in a previous post. Linux users can go to http://linuxwolfpack.com/webcam-streamer.php to view how and windows users can follow my guide at http://linuxwolfpack.com/win-cam-streamer.php to get a streaming server on their computer.


Set Up Motion Detection

On the main zoneminder webpage click the monitor you wish to set to motion detect and select from the drop down box ""MoDetect"" and select save. From that point onward any motion detected by that camera will be saved and alerted.


There are other options such as filters and uploading. These are easy enough to follow just from the site. I didnt feel the need to do a how to on this. If you have issues with it follow the manual on the zoneminder wiki or drop me an email and I will help you out as much as I can