Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
1.2 Installing the Alarm System
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
|This starts the Raspberry Pi configuration utility. Select the following...
sudo apt-get update
|Download package lists for software repositories and update them with the newest versions of packages and dependencies.|
sudo apt-get -y install git
|Downloads from the GitHub will be stored in this directory.|
|Move into the download directory|
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).|
chmod +x alarm-system/Scripts/install.sh
|Make install script executable.|
|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.
- Logon = admin
- Password = qwerty
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.