Advanced alarm control panel for Home Assistant with PIN authentication, plugin support, and headless tablet interface.
- π BCrypt PIN Hashing - Military-grade security with work factor 12
- π‘οΈ Rate Limiting - Protection against brute force attacks (5 attempts, 15-min lockout)
- π« Session Management - Secure 30-day sessions with auto-refresh
- π IP Tracking - Full audit trail with IP address logging
- π« IP Filtering - Optional IP range restrictions
- π± Headless Panel - Touch-optimized fullscreen interface for tablets
- π₯οΈ Admin Panel - Complete user and PIN management
- β¨οΈ Standard Panel - Traditional numeric keypad interface
- π¨ Color-Coded States - Visual feedback (Green=Disarmed, Red=Armed, Orange=Armed Home)
- π Home Assistant Events - Automatic event firing for notifications
- π REST API - Complete plugin architecture for custom integrations
- π² Multi-Device Support - Track unlimited tablets/devices
- π Real-time Updates - Live alarm state synchronization
- π³ Docker Ready - Multi-architecture support (amd64, arm64, armv7, armhf, i386)
- ποΈ Home Assistant Add-on - One-click installation
- π Database Support - MySQL, SQLite
- β‘ High Performance - <100ms response times, minimal resource usage
-
Add this repository to your Home Assistant add-on store:
https://github.com/werddomain/Hass-Alarm -
Install the "Hass-Alarm Panel" add-on
-
Configure and start the add-on
docker run -d \
--name hass-alarm \
-p 5000:80 \
-e Ha__Host="your-ha-instance:8123/" \
-e Ha__ApiKey="your_token" \
-e Ha__Entities__Arm="input_boolean.alarm_home" \
-e Ha__Entities__ArmHome="input_boolean.alarm_ar" \
-e Admin__Email="admin@example.com" \
-e Admin__Password="YourPassword123!" \
ghcr.io/werddomain/hass-alarm:latestSee INSTALLATION.md for detailed instructions.
Create the required Home Assistant entities:
# configuration.yaml
input_boolean:
alarm_home:
name: Alarm Armed
icon: mdi:shield-lock
alarm_ar:
name: Alarm Armed Home
icon: mdi:shield-home- Access the admin panel at
http://homeassistant.local:8099 - Log in with your admin credentials
- Create users under Users section
- Assign PINs under PIN Codes section
- Test the panel at
/Home/Panelor/HeadlessPanel
- URL:
http://homeassistant.local:8099 - Features: User management, PIN management, action groups
- URL:
http://homeassistant.local:8099/Home/Panel - Features: Numeric keypad, PIN entry, alarm control
- URL:
http://homeassistant.local:8099/HeadlessPanel - Features:
- Fullscreen touch interface
- Device name registration
- 30-day persistent sessions
- Auto-lock after inactivity
- Real-time state updates
- Base URL:
http://homeassistant.local:8099/api/plugin - Documentation: PLUGIN_GUIDE.md
import requests
# Register device
device = requests.post("http://homeassistant.local:8099/api/plugin/device/register",
json={"deviceName": "My Tablet"})
# Authenticate
auth = requests.post("http://homeassistant.local:8099/api/plugin/authenticate",
json={"pin": "1234", "deviceId": device.json()["device_id"]})
# Change alarm state
requests.post("http://homeassistant.local:8099/api/plugin/state",
headers={"X-Session-Token": auth.json()["session_token"]},
json={"action": "arm"})automation:
- alias: "Alarm State Change Notification"
trigger:
platform: event
event_type: hass_alarm_state_change
action:
- service: notify.mobile_app
data:
title: "Alarm Status Changed"
message: >
{{ trigger.event.data.friendly_name }} changed alarm to
{{ trigger.event.data.new_state }} from
{{ trigger.event.data.device_name }}Events include:
timestamp- ISO 8601 timestampuser_name- Usernamefriendly_name- User's email or display namepin_name- Name assigned to the PINnew_state- New alarm state (arm, disarm, arm_home)device_name- Device that made the changedevice_ip- IP address of the device
- Installation Guide - Complete installation and deployment instructions
- Plugin Guide - REST API documentation and examples
- Add-on Documentation - Home Assistant add-on specific docs
- Add-on README - Add-on store information
# Clone repository
git clone https://github.com/werddomain/Hass-Alarm.git
cd Hass-Alarm/Hass-Alarm
# Restore dependencies
dotnet restore
# Run migrations
dotnet ef database update
# Build
dotnet build
# Run
dotnet rundotnet testdocker build -t hass-alarm -f hass-alarm/Dockerfile .The project uses GitHub Actions for automatic builds and releases:
- Automatic builds on push to
main - Multi-architecture Docker images
- Semantic versioning
- Automated changelog generation
Use the GitHub Actions workflow:
- Go to Actions β Version Bump
- Click Run workflow
- Select bump type (patch/minor/major)
- The workflow will:
- Update version in
config.json - Create a git tag
- Build multi-arch Docker images
- Create GitHub release
- Update version in
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Hass-Alarm β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
β βAdmin Panel β βStandard Panelβ βHeadless Panelβ β
β β(Web UI) β β(Keypad) β β(Tablet UI) β β
β ββββββββ¬ββββββββ ββββββββ¬ββββββββ ββββββββ¬ββββββββ β
β β β β β
β ββββββββββββββββββββΌβββββββββββββββββββ β
β β β
β βββββββββΌβββββββββ β
β β Controllers β β
β β - Home β β
β β - Plugin β β
β β - HeadlessPanelβ β
β βββββββββ¬βββββββββ β
β β β
β ββββββββββββββββββββΌβββββββββββββββββββ β
β β β β β
β ββββββββΌββββββββ ββββββββΌββββββββ ββββββββΌββββββββ β
β βSession Serviceβ βAlarmState Svcβ βHA Event Serviceβ β
β β- 30-day tokensβ β- State mgmt β β- Event firing β β
β ββββββββ¬ββββββββ ββββββββ¬ββββββββ ββββββββ¬ββββββββ β
β β β β β
β ββββββββββββββββββββΌβββββββββββββββββββ β
β β β
β βββββββββΌβββββββββ β
β β Database β β
β β - Users/PINs β β
β β - Devices β β
β β - Sessions β β
β ββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
β API Calls
β
ββββββββββΌββββββββββ
β Home Assistant β
β - input_boolean β
β - Events β
ββββββββββββββββββββ
Hass-Alarm/
βββ .github/
β βββ workflows/ # GitHub Actions workflows
β βββ build-addon.yml # Build and publish workflow
β βββ version-bump.yml# Version management workflow
βββ hass-alarm/ # Home Assistant add-on
β βββ rootfs/ # Add-on filesystem
β β βββ etc/services.d/hass-alarm/
β β βββ run # Startup script
β β βββ finish # Shutdown script
β βββ config.json # Add-on configuration
β βββ Dockerfile # Add-on Docker image
β βββ README.md # Add-on store page
β βββ DOCS.md # Add-on documentation
βββ Hass-Alarm/ # Main application
β βββ Controllers/ # MVC controllers
β β βββ HomeController.cs
β β βββ PluginController.cs
β β βββ HeadlessPanelController.cs
β βββ Services/ # Business logic
β β βββ AlarmState.cs
β β βββ SessionService.cs
β β βββ HomeAssistantEventService.cs
β β βββ RateLimitService.cs
β β βββ PinHashingService.cs
β βββ Data/ # Data layer
β β βββ ApplicationDbContext.cs
β β βββ Models/
β β βββ Device.cs
β β βββ PanelSession.cs
β β βββ PinCode.cs
β βββ Views/ # Razor views
β β βββ Home/
β β βββ HeadlessPanel/
β βββ Migrations/ # EF Core migrations
βββ INSTALLATION.md # Installation guide
βββ PLUGIN_GUIDE.md # API documentation
βββ README.md # This file
βββ repository.json # Add-on repository config
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
MIT License - See LICENSE file for details
- Home Assistant - Home automation platform
- HADotNet - Home Assistant .NET client
- BCrypt.Net - Password hashing
- Issues: GitHub Issues
- Documentation: Installation Guide | Plugin Guide
- Discussions: GitHub Discussions
- Mobile app integration
- Biometric authentication support
- Multi-language support
- Custom themes
- Advanced reporting and analytics
- Integration with more alarm systems
- Voice assistant integration
If you find this project useful, please consider giving it a star!
Made with β€οΈ for the Home Assistant community