Skip to content
🚨 Home Security Intrusion Detection for Raspberry PI or any other linux OS
Python HTML JavaScript CSS C Shell Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows removed travis building system Nov 15, 2019
alarmcode added authentication through get argument Jan 13, 2020
autostart installation script fix Oct 16, 2019
config settings for trim logs Oct 28, 2019
tests fixed auto scripts Oct 16, 2019
voip make voip calls using pjsua library in C Dec 1, 2016
web Merge branch 'master' of Nov 12, 2019
.gitignore autocreate settings file Oct 14, 2019
LICENSE Update Nov 18, 2019 installation script fix Oct 16, 2019
play_template.wav make voip calls using pjsua library in C Dec 1, 2016
requirements.txt fixed conflict Sep 5, 2019 bump version Oct 16, 2019

AlarmPI Build Status GitHub release (latest by date)

AlarmPI is a home security system based on Raspberry PI. It supports wired sensors (PIR, Magnetic etc.) and wireless through MQTT or Hikvision. It is controlled with a Web UI, a Android Application, or through HTTP & MQTT messages. When the alarm detects movement, it supports the following events:

  • Enables the Serene
  • Send Mail
  • VoIP Calls
  • Send MQTT message

It is written in python and supports both python 2.7 & python 3.6. There is also the option of having more than one user by editing the server.json file accordingly.


With this command on your terminal you can install and update the application with my latest commit.

bash <(curl -s "")


Web UI

The Web Interface of the alarm has all the features that are needed to configure and use the home security. It supports real time events of the sensors, the logs and their status. It also works as an smartphone application from the browser: Add to Home screen

Mobile Application

The android application is very light and fast and it is recomended for the phone, but it has no real time updates. You can download it from here: Play Store

The source code for the application is here:


Through voice commands from Snips platform using this application: snips console


It is also controlled with MQTT commands with the Home-Assistant component: 'MQTT Alarm Control Panel'. On Home-Assistant the configuration is like so:

  - platform: mqtt
    name: "AlarmPI"
    state_topic: "home/alarm"        # The State Topic from AlarmPI
    command_topic: "home/alarm/set"  # The Command Topic from AlarmPI
    payload_arm_home: "ARM_HOME"     # This is not used
    payload_arm_away: "ARM_AWAY"





These are the possible mqtt messages. First you will have to setup the MQTT state_topc & command_topic.

  • home/alarm/set/sensor/test1 [off,online]
  • home/alarm/sensor/test1 [off,on,error]
  • home/alarm [armed_away,disarmed,triggered]

Supports custom messages subscriptions on MQTT Sensors by filling the appropriate information about topic and payload on sensor settings. This can be used for cases like zigbee2mqtt so that zigbee devices can be used. The payload must be a python function with the payload stored as message like this:

  • message['contact'] == 'ON'


It can also be used with IFTTT using the Webhooks module like this:

My personal favourite is to control it with Google Assistant.

SipCall (VoIP)

I have built the sipcall for the Raspberry Pi, so hopefully you will not have to build it yourself. To test it, execute this replacing the (myserver, myusername, mypassword, mynumbertocall):

./sipcall -sd myserver -su myusername -sp mypassword -pn mynumbertocall -s 1 -mr 2 -ttsf ../play.wav

You can’t perform that action at this time.