AlarmDecoder WebApp

Revision as of 11:21, 24 August 2015 by 204.10.16.29 (Talk)

Contents


AlarmDecoder WebApp

Overview

The official AlarmDecoder WebApp. Control your alarm system from your web browser on nearly any device. Supports all of the AlarmDecoder devices including the AD2USB, AD2SERIAL, and AD2PI.

Features

  • Multiple User Accounts
  • Web-based keypad for your alarm system
  • Notifications on alarm events
  • Per-user notifications
  • IP Camera integration
  • Supports all functionality of AlarmDecoder devices
  • Configure your AlarmDecoder device
  • Configure network sharing of your AlarmDecoder device
  • Support for PC/Mac/Linux as well as Mobile and Tablet browsers


Keypad Interface

The AlarmDecoder WebApp Keypad Interface

Installation

The easiest way to install the WebApp is by downloading our pre-built Raspbian image here. However, you can follow the manual installation instructions provided on our github repository here

Initial Setup

Once the AlarmDecoder WebApp is started (it can take some time to initially start) you may connect to the Application via a web browser and pointing the URL to http://alarmdecoder.local - if this name resolution fails and you are on a Windows System, please download Bonjour For Windows and try again. This will take you to our first setup screens which will be detailed below. The device is initially configured for DHCP.

IF YOU BOUGHT A BUNDLE FROM US, IT IS ALREADY SET UP. YOU ONLY NEED TO GO THROUGH SETUP IF YOU NEED TO CHANGE DEFAULT ADDRESS OF DEVICE OTHERWISE CHECK HERE FOR DEFAULT PASSWORDS AND CHANGE THEM ACCORDINGLY


Setup Process Detail

This is your first setup screen when you first visit via your browser

First Setup Screen

Click "Start!" to continue


Next we will be taken to the device selection screen

Device Type Screen

Here you are able to select what type of device (AD2USB, AD2SERIAL, AD2PI) as well as the device's location.
  • #Local Device means the device is connected to the same computer running the WebApp
  • #Network Device means you have already exposed an AlarmDecoder via ser2sock


Local Device

If you choose Local Device, this next screen is what you are presented with

Local Device Settings

Here you will choose your device path and baud rate, usually defaults are fine for the device you chose
If you choose "Share AlarmDecoder on your network?" you will be taken to configure ser2sock shown below

Setup Ser2sock

On this screen you are able to specify the path to your ser2sock configuration file, your hostname or IP address to listen on, as well as the ser2sock port to listen on. Defaults will work fine. SSL will force ser2sock into SSL mode - this is typically not needed for your internal network.
  • ser2sock Port is different from the HTTP/WSGI ports - do not choose 80, 443, or 5000.

Skip to #Configure Device



Network Device

If you chose network device instead of local device, you are presented with this screen instead

Network Device Setup

If you have an AlarmDecoder device shared on your network already via ser2sock, here you can specify the hostname and port for the WebApp to connect to the shared device.

Configure Device

Once you have told the WebApp what kind of device you have and where it is, you will be presented with a page to configure the AlarmDecoder device itself

AlarmDecoder Device Settings

Make sure to set your address correctly! 31 for SE Panels, and for 20P Panels you will have to program an address spot into your panel and assign the AlarmDecoder the newly enabled address. See [Panel Configuration]



After you have completed all of the above steps, you will be taken to a Device Testing screen

Device Testing

If any of these tests fail, please make sure your device is configured properly and installed properly.
Here is an example of a successful device test

Device Testing Success


Once the device is communicating properly, you will be redirected to a page to create an initial user to log in to the WebApp

Initial User Creation

After you have created your user, feel free to login and use the WebApp!

Configure Notifications

Once you are logged in, go to Settings and click on Notifications. From there, you can edit already configured notifications or click "New Notification" to create a new notification.

Main Notification Interface

This is the main interface for creating and listing notifications. Here you can choose to create new or edit existing notifications.


List of Notification Types

Here is a list of all current supported notification types.


List of Items to be Notified On

Here is a list of all of the events that can trigger a notification. You are able to select which ones you would like to see. You can also have different notification types alert you for different kinds of notifications. This interface is common to all notification types.



Email

Email Notification Example using gmail settings

Here is an example email notification form using gmail settings for example
  • Source Address - Emails appear "From" this address
  • Destination Address - Emails will go "To" this address
  • Email Subject - Emails will contain this subject line
  • Email Server - The server to connect to when sending emails
  • Server Port - The port of the email server to connect to
  • Use TLS? - Enable Transport Layer Security for the session
  • Authenticate with email server? - If a username and password is required by the email server to send, supply them
  • Username - Your email username
  • Password - Your email password

SMS via Twilio

Example of Twilio Notification Configuration

Here is an example of a Twilio Notification configuration
  • Account SID - Your Twilio Account SID
  • Auth Token - Your Twilio User Auth Token
  • To - Number to Send SMS to
  • From - Your valid Twilio Phone Number

Google Talk

Example of Google Talk Notification Configuration

Here is an example of a Google Talk Notification configuration
  • Source Address - Messages will come FROM this address
  • Password - The password for the SOURCE account
  • Destination Address - Messages will go to this address

Pushover.net

Example of Pushover.net Notification Configuration

Here is the configuration for a Pushover.net notification
  • API Token - The API Token provided by Pushover for your User
  • User/Group Key - The User or Group Key for your account at Pushover
  • Message Priority - In what priority do you want alarm panel notifications
  • Title of Message - Messages sent to Pushover are titled with this text

Prowl

Example of Prowl Notification Configuration

Here is an example of a Prowl notification configuration
  • API Key - Your Prowl API Key
  • Application Name - Application to Show in Notifications
  • Message Priority - What priority do you want alarm panel notifications to come through as

NotifyMyAndroid

Example of NotifyMyAndroid configuration

Here is an example of a NotifyMyAndroid notification configuration
  • API Key - Your NotifyMyAndroid API Key
  • Application Name - Application Name to show in notifications
  • Message Priority - What priority do you want Alarm Panel notifications to come through?

Growl

Example of a Growl Notification

An example of a Growl Notification configuration
  • Hostname - The Growl server to send notification to
  • Port - The Growl Server Port
  • Password - The password for the Growl server
  • Title - Notification Title
  • Message Priority - What priority do you want these messages to come through as?

Custom URL POST

Example of a Custom POST notification

Here is an example configuration for a Custom POST notification
  • POST URL - URL of server to POST data to
  • POST Path - Location on server from URL to post to
  • SSL? - Is the URL SSL or Not
  • POST Type - urlencoded, JSON, or XML POST types supported
  • Custom Values - Here you are able to create your own key/value pairs to send with your notification

Configure IP Cameras

If you are not using our image, or an older version of the image, you must perform a few steps to enable Camera Support
  • in the contrib directory of the webapp there is an opencv directory
  • in the opencv directory execute
    • sudo sh opencv.sh
  • Once this is done and installed, you can then configure and view a camera.


Example of Camera Listings

Here you see the interface where it lists current cameras as well as a button for creating a new camera.


Example of Creating Camera

Here we are creating a camera for view in the system
  • Name - The name of the camera for display purposes
  • Snapshot URL - The full URL of the motion jpeg stream for your IP camera
  • Username - The username for authenticating to the camera
  • Password - The password for authenticating to the camera

Host Settings

Found under settings->Host

Example of Host Settings Page

Here you are able to configure your device's hostname, networking, as well as reboot and shutdown the device.

Reboot Device

Found under settings->Host
Click Reboot button

Shutdown Device

Found under settings->Host
Click Shutdown button

Add Users

Under Settings, click on Users - you will be presented with this screen

User List

Here you are able to edit current users, or create new users.
By clicking New User, you are then taken to this screen

New User Screen

Here you fill out the user's details and save. The user can now login to the webapp.

Configuring SSL

This is now enabled by default as of the 05-22-2015 software release.

SSH into your raspberry pi
First you must create your SSL certificates and put them in the correct location

sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/ssl/alarmdecoder.key -out /etc/nginx/ssl/alarmdecoder.crt

Just make sure to fill in the values correctly for your certificate when prompted.
Next you must edit your nginx alarmdecoder config under /etc/nginx/sites-enabled/alarmdecoder

server {

  listen 80;
  return 301 https://$host$request_uri;

}

server {

   error_page 502 /502.html;
   listen 443 default_server ssl;
   ssl_certificate /etc/nginx/ssl/alarmdecoder.crt;
   ssl_certificate_key /etc/nginx/ssl/alarmdecoder.key;
   #ssl on;
   ssl_session_cache builtin:1000 shared:SSL:10m;
   ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
   #ssl_ciphers HIGH:MEDIUM:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
   ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
   ssl_prefer_server_ciphers on;
   #error_page 497 https://$host:$server_port$request_uri;
   gzip on;
   gzip_disable "msie6";
   gzip_vary on;
   gzip_proxied any;
   gzip_comp_level 6;
   gzip_buffers 16 4k;
   gzip_http_version 1.1;
   gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
   location / { 
       try_files $uri @alarmdecoder; 
   }
   location @alarmdecoder {
       proxy_pass http://127.0.0.1:5000;
       include uwsgi_params;
       uwsgi_param UWSGI_SCHEME $scheme;
       uwsgi_param SERVER_SOFTWARE nginx/$nginx_version;
       proxy_redirect off;
       proxy_http_version 1.1;
       proxy_set_header Upgrade $http_upgrade;
       proxy_set_header Connection "upgrade";
       proxy_set_header Host $http_host;
       proxy_set_header X-Real-IP $remote_addr;
       proxy_set_header X-Forwarded-Proto $scheme;
       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
       proxy_set_header X-Forwarded-Host $server_name;
       proxy_set_header X-Scheme $scheme;
       proxy_redirect http://localhost:5000 https://$host;
   }
   location /502.html {
       root /opt/alarmdecoder-webapp/ad2web/static;
   }
   location ~ \.(jpg|jpeg|png|css|js)$ {
       root /opt/alarmdecoder-webapp/ad2web;
   }

}

After this, restart the nginx service and you will have forced SSL.

Port Forwarding

To access your WebApplication outside of your network, first you must do a "port forwarding" operation on your networking router/firewall - a NAT.
Some ISPs filter standard server ports, so sometimes you will have to choose an external port that is not filtered. (Not 80, 25, 443).
As an example, you may want to forward port 4443 on the outside network to port 443 of your Network Appliance. You then would hit your external IP Address on port 4443 from your web browser. https://public_ip_address:4443 which would then forward to port 443 of the network appliance - in SSL mode for security.

Diagnostics

A Diagnostics Screen is provided under settings->Diagnostics
This screen will allow you to test the functionality of the AlarmDecoder device as well as showing information about required modules.

Diagnostics screen.png

Disclaimers

All other trademarks are the property of their respective owners.