1.2 Installing the Alarm System

Tony edited this page May 18, 2018 · 42 revisions

Install on a Raspberry Pi

The alarm system is intended for use on a Raspberry Pi 2 model B , running Raspbian Stretch Lite. The Raspbian Sretch Lite image (dated September 2017) can be downloaded from the [Raspberry Pi Downloads] (https://www.raspberrypi.org/downloads/raspbian/) web site.

At first boot, the Raspbian Stretch Lite image has SSH disabled, so you will need to attach a keyboard and monitor to run the first stage of the build.

Logon using the pi account – you should be in the /home/pi directory by default

Stage Linux command Notes
1
sudo raspi-config
This starts the Raspberry Pi configuration utility. Select the following...
  • Localisation Options | Change Timezone
  • Localisation Options | Change Locale ( default is en_GB, you may need to change it )
  • Intefacing options | SSH enable
  • Hostname
  • Finish and Reboot
2
sudo apt-get update
Download package lists for software repositories and update them with the newest versions of packages and dependencies.
3
sudo apt-get -y install git
Install Git.
4
mkdir Downloads
Downloads from the GitHub will be stored in this directory.
5
cd Downloads
Move into the download directory
6
git clone git://github.com/oddwires/alarm-system.git
Download the alarm web app (copies all files from the Git Hub to the Download directory).
7
chmod +x alarm-system/Scripts/install.sh
Make install script executable.
8
sudo ./alarm-system/Scripts/install.sh
Run the install script.

Stage 8 starts the installer which will...

  • Install Operating System updates
  • Install Operating System upgrades
  • Install Heirloom Mail Transfer Agent
  • Install I2C utilities
  • Install Apache and PHP
  • Install Samba (Optional)
  • Install Oddwires web application
  • Install Oddwires Alarm daemon
  • Create self signed certificate and configure for HTTPS operation.
  • Install and configure Fail2Ban.
  • Install and configure HomeKit Bridge (HAP-nodeJS).

Each stage gives you the options 'I' to install, 'S' to skip or 'Ctrl-C' to quit. The final stage of the installer reboots the Raspberry Pi to ensure the I2C bus initialises at the correct speed.

And thats the build finished.

Following the reboot, the alarm daemon (BASH script) will be running on the Raspberry Pi in the background, so there is no need to log on to the RasPi console. However, there is an option to control the script manually from the Linux command line:

  • sudo service alarm stop - stops the alarm service.
  • sudo service alarm start - starts the alarm service and grabs the screen output allowing commands being passed from the web pages to be viewed on the console.
  • sudo service alarm restart - restarts the alarm service.
From your iPhone you should be able to browse to the system. The default user account is...
  • Logon = admin
  • Password = qwerty
If no hardware is connected, all alarm zones will show as 'open'.

By loging in to the system, you can use your iPhone to...

  • Adminster user accounts - create, delete, change.
  • Configure Alarm Zones - create, delete, change.
  • Configure Radio Control circuits - create, delete, change.
  • Configure Schedule tasks - switch remote devices on/off, check router for IP changes, enable/disable the alarm.
  • Configure email credentials - allowing the system to send email alerts.
  • Set names and configuration details for alarm zones and radio control channels.
  • Store and load user defaults.
  • Restore factory defaults
  • View log files.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.