Web application for interfacing with the AlarmDecoder family of devices.
JavaScript Python CSS HTML Other
Clone or download
f34rdotcom Merge pull request #40 from nutechsoftware/dev
Add support for CHIME and fix BYPASS status. Bump Version.
Latest commit 0664184 May 29, 2018

README.md

AlarmDecoder Webapp

Summary

This is the home of the official webapp for the AlarmDecoder family of home security devices.

Keypad Screenshot

Features

  • Supports all of the AlarmDecoder devices: AD2USB, AD2SERIAL and AD2PI.
  • Web-based keypad for your alarm system
  • Notifications on alarm events
  • Multiple user accounts and per-user notifications and certificates (if configured)

Installation

Requirements

  • nginx >= 1.6
  • gunicorn

NOTE: Other web and WSGI servers will likely work but will require configuration.

Pre-installed Image

If you're running on a Raspberry Pi the easiest way to get started is to download our pre-configured Raspbian image. The image can be found at here.

Manual Installation

If you'd rather do it by hand you can follow these steps:

  1. sudo apt-get install gunicorn sendmail libffi-dev python-dev build-essential libssl-dev curl libpcre3-dev libpcre++-dev zlib1g-dev libcurl4-openssl-dev minicom telnet python2.7 autoconf automake avahi-daemon screen locales dosfstools vim python2.7-dev sendmail sqlite3
  2. wget https://bootstrap.pypa.io/get-pip.py
  3. sudo python get-pip.py
  4. VERSION=1.7.4
  5. curl http://nginx.org/download/nginx-$VERSION.tar.gz | tar zxvf -
  6. cd nginx-$VERSION
  7. ./configure --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --pid-path=/var/run/nginx.pid --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --with-http_ssl_module --with-ipv6
  8. make
  9. sudo make install
  10. sudo mkdir -p /var/www
  11. sudo mkdir -p /etc/nginx/ssl
  12. sudo cp html/* /var/www
  13. sudo cp /opt/alarmdecoder-webapp/contrib/nginx/nginx.service /lib/systemd/system/nginx.service
  14. sudo systemctl daemon-reload
  15. sudo service nginx start
  16. sudo pip install gunicorn --upgrade
  17. sudo ln -s /usr/local/bin/gunicorn /usr/bin/gunicorn
  18. cd /opt/
  19. sudo git clone http://github.com/nutechsoftware/alarmdecoder-webapp.git
  20. cd alarmdecoder-webapp
  21. sudo pip install -r requirements.txt
  22. sudo python manage.py initdb
  23. sudo cp contrib/nginx/alarmdecoder /etc/nginx/sites-available/
  24. sudo ln -s /etc/nginx/sites-available/alarmdecoder /etc/nginx/sites-enabled/
  25. sudo rm /etc/nginx/sites-enabled/default
  26. sudo cp contrib/gunicorn.d/alarmdecoder /etc/gunicorn.d/
  27. cd contrib/opencv/
  28. ./opencv.sh
  29. Edit /etc/gunicorn.d/alarmdecoder and change the user/group you'd like it to run as.
  30. Change permissions on /opt/alarmdecoder-webapp to grant permissions for your chosen user.
  31. Optionally install and set permissions for ser2sock
  32. Create self-signed SSL certificate for HTTPS - sudo openssl req -x509 -nodes -sha256 -days 365 -newkey rsa:4096 -keyout /etc/nginx/ssl/alarmdecoder.key -out /etc/nginx/ssl/alarmdecoder.crt
  33. Set your device locale: sudo dpkg-reconfigure locales
  34. Set your keyboard mapping: sudo dpkg-reconfigure keyboard-configuration
  35. Set your timezone: sudo dpkg-reconfigure tzdata
  36. sudo service nginx restart
  37. sudo service gunicorn restart

Raspberry Pi 3 GPIO Serial Port for AD2Pi, turn bluetooth into software uart

  1. Copy the pi3-miniuart-bt-overlay.dtb from contrib/pi3_overlay to your root directory (/)
  2. sudo vi /boot/config.txt
  3. add the following to the end of the file: 2. dtoverlay=pi3-miniuart-bt-overlay
    1. force_turbo=1
  4. sudo vi /lib/systemd/system/hciuart.service
    1. Replace ttyAMA0 with ttyS0

Support

Please visit our forums.

Contributing

We love the open-source community and welcome any contributions! Just submit a pull request through Github.