Code Monkey home page Code Monkey logo

dvralarm's Introduction

Overview
---------
dvralarm is a Raspberry Pi project to send an email alert with the CCTV footage recorded a few seconds prior to an alarm triggered to the Raspberry Pi GPIO. The goal is to enable the recipient to easily and quickly determine the cause of the sounding alarm, and is designed to integrate a common CCTV DVR systems with an Alarm system. 


Pre-Requisites
---------------
# ffmpeg: Used to transcode h264 stream into mp4 file
# Exim: Local SMTP server to relay notification emails using SMTP
# Alarm with Programmable output: This can be any device capable of triggering the Raspberry Pi GPIO, a breadboard with a pushbutton can be used in the development environment.
# zmodopipe compatible DVR: zmodopipe is currently used to stream video footage over ip. More detail can be found on the following links. 
https://plus.google.com/107530140244685710056/about
http://www.zoneminder.com/forums/viewtopic.php?f=9&t=18137 
I have included a modified version which will compile on the Raspberry Pi, also added support for two additional DVR models.

zmodopipe support the following DVR models, the list below should also be used to reference the DVR model during configuration.
    		1 - Use mobile port (safest, default)
    		2 - Use media port (Works for some models, ie. Zmodo 9104)
    		3 - Use media port w/header (Other models, please test)
    		4 - Use QT5 family (ie. QT504, QT528)
    		5 - Zmodo DVR-8104UV compatible (also DVR-8114HV)
    		6 - CnM Classic 4 Cam DVR
    		7 - Visionari 4/8 Channel DVR
    		8 - Swann DM-70D and compatible
    		9 - Swann DVR8-4000 and compatible
    		10 - mEye compatible


Installation
-------------

Download using wget or curl from Raspberry Pi cli and extract dvralarm source code to a temporary directory. 

$ wget https://github.com/pbeyl/dvralarm/archive/master.tar.gz
$ tar zxvf dvralarm-master.tar.gz

Alternatively use git to download source
$ git clone https://github.com/pbeyl/dvralarm

To install dvralarm run the following commands from directory where the source has been copied/extracted to.

$ cd dvralarm
$ make
$ sudo make install

ensure that the script is properly configured before starting the daemon. In particular ensure the zmodopipe configuration with DVR IP, username, password, DVR Model[1-10] and SMTP variables is properly setup. The installation process will run an initial configuration wizard. Thereafter configuration can be changed directly in the config file using
$ sudo vim /etc/dvralarm/config.json

Once installed, dvralarm will be run as a system service and can be controlled using
$ sudo /etc/init.d/dvralarm.sh start|stop|status

in daemon mode dvralarm will output log data to the logfile by default located at /var/log/dvralarm.log

to trigger an alarm event GPIO PIN 23 (Header PIN 16) must be connected to pull up resistor and triggered on falling edge by bridging to Ground ie. Header PIN 14

Reference the development board schematic included in this package for a GPIO wiring example with pull-up resistors. 

Uninstall
----------

To uninstall dvralarm simply run the following command from the root of the extracted source code.

$ sudo make uninstall

dvralarm's People

Contributors

pbeyl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.