This is the home of the official webapp for the AlarmDecoder family of home security devices.
- 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)
- nginx >= 1.6
- gunicorn
NOTE: Other web and WSGI servers will likely work but will require configuration.
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.
If you'd rather do it by hand you can follow these steps:
- 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
- wget https://bootstrap.pypa.io/get-pip.py
- sudo python get-pip.py
- VERSION=1.7.4
- curl http://nginx.org/download/nginx-$VERSION.tar.gz | tar zxvf -
- cd nginx-$VERSION
- ./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
- make
- sudo make install
- sudo mkdir -p /var/www
- sudo mkdir -p /etc/nginx/ssl
- sudo cp html/* /var/www
- sudo cp /opt/alarmdecoder-webapp/contrib/nginx/nginx.service /lib/systemd/system/nginx.service
- sudo systemctl daemon-reload
- sudo service nginx start
- sudo pip install gunicorn --upgrade
- sudo ln -s /usr/local/bin/gunicorn /usr/bin/gunicorn
- cd /opt/
- sudo git clone http://github.com/nutechsoftware/alarmdecoder-webapp.git
- cd alarmdecoder-webapp
- sudo pip install -r requirements.txt
- sudo python manage.py initdb
- sudo cp contrib/nginx/alarmdecoder /etc/nginx/sites-available/
- sudo ln -s /etc/nginx/sites-available/alarmdecoder /etc/nginx/sites-enabled/
- sudo rm /etc/nginx/sites-enabled/default
- sudo cp contrib/gunicorn.d/alarmdecoder /etc/gunicorn.d/
- cd contrib/opencv/
- ./opencv.sh
- Edit /etc/gunicorn.d/alarmdecoder and change the user/group you'd like it to run as.
- Change permissions on /opt/alarmdecoder-webapp to grant permissions for your chosen user.
- Optionally install and set permissions for ser2sock
- 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
- Set your device locale: sudo dpkg-reconfigure locales
- Set your keyboard mapping: sudo dpkg-reconfigure keyboard-configuration
- Set your timezone: sudo dpkg-reconfigure tzdata
- sudo service nginx restart
- sudo service gunicorn restart
- Copy the pi3-miniuart-bt-overlay.dtb from contrib/pi3_overlay to your root directory (/)
- sudo vi /boot/config.txt
- add the following to the end of the file:
2. dtoverlay=pi3-miniuart-bt-overlay
- force_turbo=1
- sudo vi /lib/systemd/system/hciuart.service
- Replace ttyAMA0 with ttyS0
Please visit our forums.
We love the open-source community and welcome any contributions! Just submit a pull request through Github.