Yet another alarm (control) panel for Home Assistant.

Overview

HASS-YAAP

Yet another alarm (control) panel for Home Assistant.
  • Change alarm system mode (away, home, night, disarmed)
  • Welcome people arriving by their name
  • Turn off all lights (when you leave for example)

Usage

Arming & Disarming
  1. Press * to enter code mode
  2. Enter Pin
  3. Finish sequence by using
    • A: Arm Away
    • B: Arm Night
    • C: Arm Home
    • D: Disarm
  4. You can also reset the entered code by pressing * again
Turn of lights

Press # while on the main state screen. On any other screen # will go back to the main screen.

Enable LCD backlight

Press any key.

Example Screens

Default Screen

Code

Connecting

Current State

Wrong Code

Welcome

Used Hardware

Parts

ElectronicsYou should probably choose a better pin layout than I did but apparently this is what I used judging from the code 😅

ESP8266 Configuration

Download and install the PlatformIO IDE.

Create a file called config.h in the folder include with the contents of config_example.h.

Choose a language file (default selected is English):

#include "translations/EN.h"

Add your WiFi and MQTT credentials:

#define WiFi_SSID              "WiFi_SSID"
#define WiFi_PW                "WiFi_PW"
#define MQTT_SERVER_IP         "192.168.x.y"
#define MQTT_USER              "MQTT_USER"
#define MQTT_PW                "MQTT_PW"
#define MQTT_CLIENT_NAME       "AlarmControlPanel"

Adjust the other settings to your liking.

If needed adjust the settings in PlatformIO for your board.

PlatformIO Project

PlatformIO Project

Home Assistant Configuration

Requirements

  • MQTT Server (for Home Assistant OS: Mosquitto)

  • An alarm system (for example: Manual)

  • Some Automations (see YAML below)

MQTT

Setup a MQTT server, configure it in Home Assistant and add an account for the alarm panel on the server.

Automations

Required automations

MQTT Alarm Panel - Alarm State

Sends alarm system changes to the panel & receives state requests from the panel.

Replace alarm_control_panel.alarmsystem with the entity id of your alarm system.

- alias: "MQTT Alarm Panel - Alarm State"
  trigger:
    - platform: mqtt
      topic: "alarmpanel/get"
      payload: "state"
    - platform: state
      entity_id: alarm_control_panel.alarmsystem
  action:
    - service: mqtt.publish
      data:
        topic: "alarmpanel/state"
        payload: "{{ states('alarm_control_panel.alarmsystem') }}"
MQTT Alarm Panel - Alarm State

Automation to change the state of the alarm system. You can define valid codes in the variables section.

The name of the code will be used to send a message to a specified phone when the alarm is disabled via the panel. You can disable this by removing the notify action.

Replace alarm_control_panel.alarmsystem with the entity id of your alarm system.

Replace notify.enter_phone_id_here with the entity id of your phone.

- alias: "MQTT Alarm Panel - Set Alarm State"
  variables:
    codes:
      23342: "Code 1"
      6563434: "Code 2"
      9189938992: "Code 3"
  trigger:
    - platform: mqtt
      topic: "alarmpanel/arm/away"
    - platform: mqtt
      topic: "alarmpanel/arm/home"
    - platform: mqtt
      topic: "alarmpanel/arm/night"
    - platform: mqtt
      topic: "alarmpanel/disarm"
  action:
    - choose:
        - conditions:
            - condition: template
              value_template: '{{ trigger.payload | int in codes }}'
          sequence:
            - choose:
                - conditions:
                    - condition: template
                      value_template: "{{ trigger.topic == 'alarmpanel/arm/away' }}"
                  sequence:
                    - service: alarm_control_panel.alarm_arm_away
                      entity_id: alarm_control_panel.alarmsystem
                - conditions:
                    - condition: template
                      value_template: "{{ trigger.topic == 'alarmpanel/arm/home' }}"
                  sequence:
                    - service: alarm_control_panel.alarm_arm_home
                      entity_id: alarm_control_panel.alarmsystem
                - conditions:
                    - condition: template
                      value_template: "{{ trigger.topic == 'alarmpanel/arm/night' }}"
                  sequence:
                    - service: alarm_control_panel.alarm_arm_night
                      entity_id: alarm_control_panel.alarmsystem
                - conditions:
                    - condition: template
                      value_template: "{{ trigger.topic == 'alarmpanel/disarm' }}"
                  sequence:
                    - service: alarm_control_panel.alarm_disarm
                      entity_id: alarm_control_panel.alarmsystem
                    - service: notify.enter_phone_id_here
                      data_template:
                        message: >
                          Alarm system disarmed with code: {{codes[trigger.payload  | int]}}
                        title: "⚠️ Warning Alarmpanel"
      default:
        - service: mqtt.publish
          data:
            topic: "alarmpanel/arm/error"
            payload: "invalidCode"
        - service: notify.enter_phone_id_here
          data_template:
            message: >
               A wrong code was entered into the alarm panel: {{trigger.payload}}
            title: "⚠️ Warning Alarmpanel"
MQTT Alarm Panel - Lights off

Turns of your lights when # is pressed on the panel while on the alarm state screen.

- alias: "MQTT Alarm Panel - Lights off"
  trigger:
    - platform: mqtt
      topic: "alarmpanel/lights"
      payload: "off"
  action:
    - service: light.turn_off
      entity_id: all
    - service: mqtt.publish
      data:
        topic: "alarmpanel/lights/callback"
        payload: "success"

Optional automations

Welcome Notification

The automation below will send the name of people arriving at your home to the alarm panel to display.

If you have a motion / door sensor in the area it will wait for someone to be present near the panel. Remove the first action if you don't have one.

- alias: "Welcome Notification"
  trigger:
    platform: event
    event_type: state_changed
  mode: parallel
  condition:
    condition: and
    conditions:
      - condition: template
        value_template: "{{ trigger.event.data.new_state is defined }}"
      - condition: template
        value_template: "{{ trigger.event.data.old_state is defined }}"
      - condition: template
        value_template: "{{ trigger.event.data.new_state.domain == 'person' }}"
      - condition: template
        value_template: "{{ trigger.event.data.new_state.state == 'home' }}"
      - condition: template
        value_template: "{{ trigger.event.data.old_state.state != 'home' }}"
  action:
    - wait_template: "{{ is_state('binary_sensor.motion_sensor_near_panel', 'on') }}"
      timeout: 300
      continue_on_timeout: false
    - service: mqtt.publish
      data:
        topic: "person/arrived"
        payload: "{{state_attr(trigger.event.data.entity_id, 'friendly_name')}}"
Motion Sensor

Turn on the LCD backlight if a motion sensor near the panel is triggered.

- alias: "MQTT Alarm Panel - Turn LCD on when motion is detected"
  trigger:
    platform: state
    entity_id: binary_sensor.motion_sensor_near_panel
    to: 'on'
  action:
    - service: mqtt.publish
      data:
        topic: "alarmpanel/lcd"
        payload: "on"

Roadmap

  • TLS Support (Anyone want to give it a shot?)
  • Support more display types?
  • More translations
You might also like...
Yet another matrix client. Click packaging for locally running on Ubuntu Touch

Cinny Click Packaging Cinny is a Matrix client focusing primarily on simple, elegant and secure interface. License Cinny source package licensed under

Foo_openlyrics - An open-source lyric display panel for foobar2000
Foo_openlyrics - An open-source lyric display panel for foobar2000

foo_openlyrics An open-source lyrics plugin for foobar2000 that includes its own UI panel for displaying and sources for downloading lyrics that are n

EspHoMaTriX - A simple DIY status display with an 8x32 RGB LED panel implemented with esphome.io

EspHoMaTriX (ehmtx) A simple DIY status display with an 8x32 RGB LED panel implemented with esphome.io Introduction There are some status displays out

Bypass UAC at any level by abusing the Program Compatibility Assistant with RPC, WDI, and more Windows components
Bypass UAC at any level by abusing the Program Compatibility Assistant with RPC, WDI, and more Windows components

ByeIntegrity 8.0 The eighth Windows privilege escalation attack in the ByeIntegrity family. ByeIntegrity 8.0 is the most complex one I've created so f

Control Heidelberg Wallbox Energy Control over WiFi using ESP8266 and configure your own local load management
Control Heidelberg Wallbox Energy Control over WiFi using ESP8266 and configure your own local load management

scroll down for English version and additional information wbec WLAN-Anbindung der Heidelberg WallBox Energy Control über ESP8266 Die Heidelberg W

Azure Outlook Command & Control (C2) - Remotely control a compromised Windows Device from your Outlook mailbox. Threat Emulation Tool for North Korean APT InkySquid / ScarCruft / APT37. TTP: Use Microsoft Graph API for C2 Operations. Automatic street light control using LDR as the sensor and an LED as an example of a street light. Performed a small simulation of an Arduino board along with LDR and LED to simulate the automatic street light control in TinkerCAD.
Budgie Control Center is a fork of GNOME Control Center for the Budgie 10 Series.

Budgie Control Center Budgie Control Center is a fork of GNOME Settings / GNOME Control Center with the intent of providing a simplified list of setti

DIY LCD touchscreen for Home Automation
DIY LCD touchscreen for Home Automation

HA SwitchPlate HASPone The HASPone is a DIY touchscreen controller you can mount into a standard North American work box. It connects to your home aut

Comments
  • automation issue

    automation issue

    Hi! I'm trying to make this myself,but I'm facing a issue with the automation to change the state of the alarm system- I check it on the the template editor of HA and I have the message " UndefinedError: 'trigger' is undefined".

    Any idea what can be the cause ?

    Thanks for your support

    opened by dasc19 6
  • Libraries

    Libraries

    I am totally new to PlatformIO and I have read the manual but I am struggling with the libaries. I have added to following to platformio.ini

    lib_deps = plapointe6/EspMQTTClient@^1.11.1 arkhipenko/Dictionary@^3.2.1 chris--a/Keypad@^3.1.1 marcoschwartz/LiquidCrystal_I2C@^1.1.4

    But I get the following errors when building:

    *** [.pio\build\nodemcu\lib32b\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o] Error 1 Compiling .pio\build\nodemcu\FrameworkArduino\Stream.cpp.o *** [.pio\build\nodemcu\lib30f\EspMQTTClient\EspMQTTClient.cpp.o] Error 1

    Just adding lib_deps = plapointe6/EspMQTTClient@^1.11.1 arkhipenko/Dictionary@^3.2.1 chris--a/Keypad@^3.1.1 marcoschwartz/LiquidCrystal_I2C@^1.1.4 to the ini file is that enough or do I need to download these libaries myself?

    opened by iObi 2
Owner
Paul-Vincent Roll
Paul-Vincent Roll
A hacky e-ink display for Home Assistant sensors

This is a hacky PlatformIO project in which Home Assistant data is displayed in an e-ink display. Useful Links Display Hardware on Tindie Official Git

null 55 Sep 21, 2022
Home Assistant E-Ink Dashboard on the Inkplate 10

HomePlate Home Assistant E-Ink Dashboard on the Inkplate 10 Features Display Home Assistant dashboards on a beautiful e-ink display Display WiFi QR Co

Ian Foster 65 Jan 6, 2023
A push-button control panel for Zoom

Zoom Control Panel A push-button control panel for Zoom This repo contains files for building a push-button control panel for Zoom.

Elena Long 48 Nov 15, 2022
Arduino Fridge Alarm: Let it go! Let it go!

Arduino Fridge Alarm: Let it go! Let it go! It's just a mess! Water on the floor, food thawing away and all the wasted time to clean this chaos! You l

Christopher Gebhardt 1 Nov 2, 2021
Arduino countdown alarm for SimulIDE

ArduinoAlarm Arduino countdown alarm for SimulIDE The included program drives an Arduino Uno circuit with a ten second countdown that signifies when a

null 1 Nov 12, 2021
Yet Another Ghidra Integration for IDA

Yagi Yet Another Ghidra Integration for IDA Overview Yagi intends to include the wonderful Ghidra decompiler into both IDA pro and IDA Free. ?? You ca

Airbus CERT 390 Dec 8, 2022
Yet another abstraction layer - a general purpose C++ library.

Yet Another Abstraction Layer What yaal is a cross platform, general purpose C++ library. This library provides unified, high level, C++ interfaces an

Marcin Konarski 14 Jul 27, 2022
Yet another Hi-C scaffolding tool

YaHS: yet another Hi-C scaffolding tool Overview YaHS is scaffolding tool using Hi-C data. It relies on a new algothrim for contig joining detection w

null 55 Dec 19, 2022
YARP - Yet Another Robot Platform

YARP __ __ ___ ____ ____ \ \/ // || _ \ | _ \ \ // /| || |/ / | |/ / / // ___ || _ \ | _/ /_//_/ |_||_| \_\|_| ===================

Robotology 445 Dec 18, 2022
YACHT: Yet Another C++ Helper Template

YACHT: Yet Another C++ Helper Template A template for C++ projects. Welcome to your YACHT! Because why build a boat from scratch, when you can enjoy a

Dimitri Belopopsky 11 Apr 2, 2022