gabrielpoca / home_alarm

Home Alarm with an IR motion sensor, Raspberry Pi and Nerves

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Home Alarm with an IR motion sensor, Raspberry Pi and Nerves

This repository contains the software running on a raspberry pi working as a home made alarm.

The raspberry pi has an WiFi antenna and an IR motion sensor. It uses the motion sensor to detect movement and the antenna to know what devices are connected. If there is movement and none of the authorized devices are connected, it makes a POST request to an IFTTT endpoint, creating a push notification on a mobile device. If the device is not connected to the internet, it will retry the notification until it works. This is a standalone application, it doesn't require any central server.

In this repository there is a nerves project, a phoenix ui and custom firmware. The custom firmware is necessary because the application uses arp-scan.

How to deploy

The setup and organisation is similar to this example. To setup and run you should follow the instructions on nerve's documentation. For this application in particular, you need the following environment variables.

export NERVES_NETWORK_SSID="..."
export NERVES_NETWORK_PSK="..."
export SECRET_KEY_BASE="..."
export MIX_TARGET=custom_rpi
export MIX_ENV=prod
export PORT=4000

About

Home Alarm with an IR motion sensor, Raspberry Pi and Nerves


Languages

Language:Elixir 54.4%Language:JavaScript 40.0%Language:HTML 3.5%Language:CSS 1.9%Language:Shell 0.2%