Giter Site home page Giter Site logo

doorpi2's Introduction

DoorPi

Overview:

The aim of this project is to create a low-cost, customizable security system using a Raspberry Pi and Python3. The Pi uses sensors to detect if a door has been opened and a camera to record the entry. The alarm can be armed or disarmed using an NFC card or via the web interface. The alarm status is indicated by sounds and addressable LED animations. The alarm will send an email notification if not disarmed within a set amount of time. Here is a video of the system in action.

Spec:

  • If an NFC card is scanned and the NFC ID is valid:
    • If the alarm is armed:
      • The alarm status changes to disarmed.
      • The remaining tasks in the entry routine are canceled.
      • The sensors stop scanning and the camera is turned off.
      • The disarm routine is started:
        • The disarmed LED animation is displayed.
        • The disarmed sound is played.
    • If the alarm is disarmed:
      • The alarm status changes to armed and the arm routine is started:
        • The countup LED animation is displayed.
        • The arming sound is played.
        • After 18 seconds, the alarm LED animation is displayed and the armed sound is played.
      • After 20 seconds, the sensors start scanning and the camera is initialized.
  • If the alarm is armed and any of the sensors are tripped:
    • The alarm is triggered.
    • The camera records for 7 seconds and continues to record 7 second clips whenever the sensors are tripped.
    • The entry routine is started:
      • The countdown LED animation is displayed.
      • The entry sound is played and then played again after 7 and 14 seconds.
      • The alarm LED animation is displayed.
      • The notification sound is played.
      • A notification email is sent.
  • If the alarm is armed via the web interface:
    • The sensors immediately start scanning and the camera is initialized.
  • If the alarm is disarmed via the web interface:
    • The sensors immediately stop scanning and the camera is turned off.
    • The remaining tasks in the entry routine are canceled.

Dependencies:

  • sqlite3
    • Contains NFC IDs and user info for web interface login.
    • NFC IDs and user passwords are hashed and salted using passlib.
  • celery
    • Celery workers execute all tasks in routines, including playing sounds, displaying LED animations and sending emails.
  • rabbitmq
    • Message queue for celery.
  • libnfc and nfc-eventd
    • Reads NFC cards and sends the NFC ID the alarm system.
  • pygame-mixer for python3
    • Plays sound files.

Config

  • Systemd service files are included for nfc, celery, and the alarm.
  • The included nfc-eventd.conf file is configured to run bin/nfc_script.sh whenever an NFC card is scanned.

Parts:

Licensed under GNU GPLv2

doorpi2's People

Contributors

brettmcintosh avatar

Stargazers

 avatar David MiZak avatar Sven Gächter avatar  avatar ArchGalileu avatar Thomas Meissner avatar Aiden Nairne avatar  avatar  avatar Jay Hull avatar

Watchers

James Cloos avatar Benji avatar  avatar Buzz Piersol avatar

Forkers

bbbenji

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.