Skip to content

fbertet/alarm-panel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESPHome Alarm Panel

GitHub License Conventional Commits

Alarm Panel

A custom 3D-printed alarm panel based on ESPHome, designed for Home Assistant integration

FeaturesHardwareInstallationUsageAcknowledgmentsLicense


Overview

This project provides a complete solution for a custom alarm panel that integrates seamlessly with Home Assistant. After searching for commercial options and finding them either cloud-dependent, limited, or expensive, this open-source alternative I designed using ESPHome and 3D printing.

The panel combines RFID authentication with visual and audible feedback, featuring a clean, modern design inspired by contemporary smart home aesthetics.

To take full advantage, it is recommended to use it with Home Assistant Manual Alarm control panel integration.

Features

  • RFID Authentication: Secure arm/disarm using RFID badges
  • Visual Feedback: 1.54" OLED display with custom animations and countdown timers
  • LED Indicators: WS2812B LED strip for color-coded status indication
  • Audible Alerts: Active buzzer for confirmation beeps
  • Home Assistant Integration: Native ESPHome integration with event triggers
  • Fully Customizable: Open-source design allows complete customization
  • Offline Operation: No cloud dependency required

Multiple modes

The alarm panel can be in four modes:

Panel Mode Corresponding Alarm state Display state LED strip state Buzzer state
Standby Disabled Time of the day Turned off Turned off
Arming Will be armed in 30sec 30sec countdown Orange Turned off
Waiting Will be triggered in 30sec Waiting character animation Orange Turned off
Alert Triggered, intrusion! Angry character animation Blinking red ON every sec

It also gives feedback in case a tag is scanned:

Tag Display state LED strip state Buzzer state
Valid Happy character animation Green Two short beeps
Wrong Sad character animation Red One long beep

Device page on Home Assistant

Device entities on Home Assistant

Hardware

Bill of Materials

Component Description Link
ESP32-S2 Mini Microcontroller board https://fr.aliexpress.com/item/1005006246777213.html
CH1116 OLED 1.54" display https://fr.aliexpress.com/item/1005009132302307.html
MFRC-522 RFID reader https://fr.aliexpress.com/item/1005006087459353.html
Active Buzzer 5V 12x9.5mm https://fr.aliexpress.com/item/1005007143315059.html
WS2812B LED Strip 144 LED/m (8 LEDs section) https://fr.aliexpress.com/item/1005007982624217.html
RFID Tags 13.56 MHz keyfob tags (S50) https://fr.aliexpress.com/item/1005005715485875.html
24 AWG Wires For internal wiring https://fr.aliexpress.com/item/1005007391168450.html
M3 Screws 8mm torx (5 pcs) https://fr.aliexpress.com/item/4000222500869.html
PLA Filament Matte white recommended https://www.amazon.fr/dp/B0D4Z8QT5T

Total Cost: Approximately €40–50 (excluding 3D printer)

3D Printing

3D Models

The enclosure consists of two parts:

  • Backplate: Houses all components with integrated cable channels
  • Faceplate: Cover with stylized buzzer grille

Print both 3D parts using the provided STL files available in the hardware/3d-models/ directory.

Print Settings:

  • Layer height: 0.2 mm
  • Infill: 20%
  • Support: Not required
  • Material: PLA (white recommended)

NB: In case you want to make your own version of the model, Fusion 360 project file is also available in the hardware/3d-models/ directory.

Wiring

Next step is to solder components according to the wiring diagram.

Wiring

Detailed wiring diagrams are available in the hardware/wiring/ directory. Below is a summary of connections:

Click to expand wiring table

CH1116 OLED Screen → ESP32-S2 Mini

Screen ESP32 Protocol
SDA GPIO 8 I2C Data
SCL GPIO 10 I2C Clock
GND GND Ground
VCC 5V Power

MFRC522 RFID Reader → ESP32-S2 Mini

RFID ESP32 Protocol
SDA GPIO 12 SPI CS
SCK GPIO 7 SPI Clock
MOSI GPIO 11 SPI MOSI
MISO GPIO 9 SPI MISO
RST GPIO 21 Reset
GND GND Ground
3V3 3V3 Power

Active Buzzer → ESP32-S2 Mini

Buzzer ESP32 Type
GND GND Ground
VCC GPIO 16 Control

WS2812B LED Strip → ESP32-S2 Mini

LED ESP32 Type
DATA GPIO 37 Data
VCC VBUS 5V Power
GND GND Ground

ℹ️ To fit everything in the case, it is recommended to solder the wires on both sides of the ESP32 S2 Mini.

Assembly

Once everything is soldered, route wires through integrated cable channels and secure components to the backplate.

Optional: To prevent light bleeding, you can add opaque stickers inside the case.

⚠️ Follow Installation step before attaching the faceplate using 5× M3 screws. In fact, to flash the Lolin S2 Mini for the first time via USB, it is required to access O and RST buttons.

Installation

Prerequisites

  • A running Home Assistant instance
  • ESPHome installed
    • Either as a standalone CLI install
    • Or as the ESPHome Home Assistant Add-on on Home Assistant OS setup
  • USB cable for initial flashing of ESP32-S2 Mini

Software Setup

  1. Clone this repository:

    git clone https://github.com/fbertet/alarm-panel.git
    cd alarm-panel
  2. Configure secrets (Wi-Fi + ESPHome credentials):

    In the esphome/ directory, create your secrets file from the example:

    cd esphome
    cp secrets.yaml.example secrets.yaml

    Edit secrets.yaml with your actual values:

    • wifi_ssid: Your Wi-Fi AP SSID
    • wifi_password: Your Wi-Fi AP password
    • alarm_panel_api_encryption_key: A 32-byte base64-encoded encryption key for ESPHome API (see documentation)
    • alarm_panel_ota_password: Password that will be required for over-the-air updates
    • alarm_panel_fallback_ap_password: Password that will be required to connect to fallback captive portal
  3. Configure device IP

    Edit alarm-panel and set a static IP address so OTA works reliably (configure static DHCP reservation on your router):

    wifi:
      ssid: !secret wifi_ssid
      password: !secret wifi_password
      # FIXME Replace this by your ESP32 fixed IP address:
      use_address: 192.168.1.X
  4. First flash (USB required):

    From the esphome/ directory:

    esphome run alarm-panel.yaml

    On the Lolin S2 Mini, hold the O button while pressing RST to enter the bootloader mode on first flash.

  5. Find your RFID Tag UIDs and configure them in alarm-panel.yaml

    Once the device is flashed, you're ready to configure it with your own RFID tags.

    To know their UIDs:

    • Connect to the device logs:
      esphome logs alarm-panel.yaml
    • Present your tags to the RFID reader
    • Note the UID strings shown in the logs (example: 7B-D3-A1-15)
    • Update the valid_tags global in alarm-panel.yaml replacing TAG_UID_1, etc. by your values:
      globals:
        - id: valid_tags
          type: std::vector<std::string>
          initial_value: '{"TAG_UID_1", "TAG_UID_2"}'

    You can add more than two tags if needed.

    Reflash (OTA or USB) after changing the YAML.

  6. Subsequent updates (OTA):

    Once the device is on Wi-Fi and reachable at its configured IP:

    esphome run alarm-panel.yaml --device <YOUR_DEVICE_IP_ADDRESS>

Usage

Initial Setup in Home Assistant

  1. The device should be auto-discovered in Home Assistant via the ESPHome integration
  2. Add the device to Home Assistant and ensure entities are available
  3. Create automations to:
    • Set the panel mode based on your alarm state
    • React to valid/invalid tag events (arm/disarm, entry/exit logic, etc.)

Known Issues

  • CH1116 Display: The first two columns may show noise due to ESPHome compatibility issues. This is cosmetically addressed in the code by mirroring a similar effect on the opposite side of the screen.
  • Light Bleeding: Use opaque stickers inside the case or consider multi-material printing (with a thin inner black layer) if your printer supports it.

Improvement Ideas

  • Add fingerprint sensor support
  • Add keypad support
  • Improve CH1116 driver compatibility

Acknowledgments

License

This project is licensed under the MIT License – see the LICENSE file for details.

Project Links


Made with ❤️ for the Home Assistant community

If this project helped you, consider starring ⭐ the repository!

About

A custom made Alarm panel for Home Assistant

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors