Giter Site home page Giter Site logo

doorpi's Introduction

A newer version of this project is available here

DoorPi

Overview:

The aim of this project is to create a low-cost, customizable security system using a Raspberry Pi. This particular version uses motion and door sensors to detect entry, but in theory other sensors could be used as well. An NFC card or key fob is used to arm/disarm the system. Alarm status is indicated by sounds and addressable LED animations. When an entry is detected, the Pi's camera records video and send email notifications.

Required Parts:

Required Software:

  • mpg321 for playing sounds
  • libnfc with nfc-eventd for running scripts when NFC cards are scanned
  • RPi.GPIO python library

Summary of Operation:

  1. Scan NFC.
  2. Sec/arm-disarm.sh toggles /var/lib/misc/alarm between ARMED and DISARMED, run countdown and run python sensor script to continuously check sensors.
  3. If sensors are triggered, take video, play sounds/LED animations, and countdown before sending email notification.
  4. Scan NFC to kill the sensor script and return alarm status to DISARMED.

Here is a video of the system in action.

Description of Included Files:

The arm-disarm.sh script is triggered by the nfc-eventd daemon whenever an NFC card is scanned. This script verifies the NFC card, plays sounds, sends LED animation commands to the teensy microcontroller and starts/stops the sensor script.

The sensor.py script is the core of the alarm system. It checks the sensors every half second, and if they're triggered, it plays LED animations and warning sounds, starts/stops the camera recording, and sends email notifications.

The reset-alarm.sh script will restart the sensor script if the pi was shut down while the alarm was armed. It is run at startup by appending it to the rc.local file.

The nfc-eventd.conf file is the configuration file for nfc-eventd. It contains information about the NFC driver and controls which scripts are run and when.

The ring-send.py script sends commands over UART to the teensy that controls the LED ring.

The ring.ino file contains all the LED animations. This is compiled and loaded onto the teensy using teensyduino.

The sensor-test.py script helps calibrate your sensors.

The picrontab will move all recorded video to a remote server once a day.

Additional Resources:

This tutorial provides a good explanation on how to connect and read sensors with a Raspberry Pi. https://learn.adafruit.com/adafruits-raspberry-pi-lesson-12-sensing-movement

Licensed under GNU GPLv3

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.