Skip to content

PNW-Computers/ESP32_HA_Alarm

Repository files navigation

🚨 ESP32 Security System — Home Assistant Distributed Alarm System

PNWC Car Alarm Project Collage

A professional-grade, distributed vehicle security system. This project bridges a battery-powered mobile sensor unit with a mains-powered house siren using Home Assistant and ESPHome.


🏗️ System Architecture

  1. The Sensor (Car Unit): A LILYGO T-Display S3 with LD2410C Human Presence Radar and an SW-420 Vibration Sensor. Automatically charges via a switched USB source; enters deep sleep 30 seconds after the car is parked to preserve LiPo health.
  2. The Brain (Home Assistant): Manages global logic, time-of-day scheduling, and Frigate NVR camera integration.
  3. The Alarm (House Unit): A headless ESP32-WROOM-32 controlling a 12V DC Siren via a 5V Relay. Features a high-reliability hardwired "Wall Kill" button.

📂 Repository Structure

  • car_security_tdisplay_s3.yaml: Sensor unit config (Vibration + Radar + Power Management).
  • house_siren_wroom32.yaml: Headless siren controller with "Safe Pin" relay logic and status LED.
  • ha_automations.yaml: Main Home Assistant logic, scheduling, and notification engine.
  • frigate_notify_automate.yaml: Advanced automation for sending Frigate video clips on trigger.
  • dashboard.md: Full UI configuration (Mushroom Cards) for the security console.
  • system_control_card.yaml: Raw YAML for the main dashboard status and control card.
  • frigate_live_view.yaml: Dashboard configuration for real-time camera integration.
  • frigate_nvr_integrate.md: Documentation for connecting Frigate events to the alarm triggers.
  • zigbee_kill_button.yaml: Optional automation for remote Zigbee-based silencing.
  • alarm_3d_case_designs.svg: Blueprints for PETG (Car) and ASA (Siren) enclosures.

🛒 Parts List & Shopping Links

🚗 Unit 1: Car Sensor (Presence & Vibration)

🏠 Unit 2: House Siren (Relay Controlled)


🔌 Master Wiring Reference

🏠 Unit 2: House Siren (WROOM-32 DevKit)

Component ESP32 Pin Logic / Notes
Relay VCC 5V / VIN Powers the relay coil
Relay GND GND Common ground
Relay IN GPIO 13 Trigger (Safe pin)
Wall Kill Button GPIO 14 Connect to GND to trigger
Status LED GPIO 2 Internal Blue LED (Pulses on Alarm)

🚗 Unit 1: Car Sensor (LILYGO T-Display S3)

Component ESP32 Pin Logic / Notes
Vibration (SW-420) GPIO 1 Hardware Wake-up Pin
Radar TX (LD2410) GPIO 3 ESP RX ← Sensor TX
Radar RX (LD2410) GPIO 2 ESP TX → Sensor RX
Battery Voltage GPIO 4 100k/100k Voltage Divider
USB Power Sense GPIO 43 Internal (Auto-Sleep Logic)
LCD Backlight GPIO 38 Internal (Screen Dimming)

🤖 Advanced Features

📡 Intelligent Power Management

The Car Unit is designed for Zero-Maintenance Operation:

  • Ignition Sync: Detects USB power (GPIO43), stays awake, and charges.
  • Parked Security: Enters Deep Sleep 30s after car off. Wakes on vibration to alert Home Assistant.

🔘 Triple-Layer Kill Switch

  1. Local Display: Dashboard controls in Home Assistant.
  2. Hardwired: GPIO14 physical "Wall Kill" button on the siren unit.
  3. Mobile: Actionable video notifications on your phone.

🧪 Testing & Commissioning

  1. Radar Calibration: Tune LD2410 Gate Sensitivity in ESPHome to ignore movement outside car glass.
  2. Power Logic: Unplug USB-C; verify the unit enters Deep Sleep and wakes on movement.
  3. Siren Safety: Verify the 60-second auto-timeout script works to prevent permanent siren noise.

⚠️ Safety Note

The house unit switches 12V DC only. Do not attempt to switch mains AC (120V/240V) directly with these relay modules. Ensure all 12V lines are fused.

About

Project Goal: Create a battery-operated device that detects vehicle movement/vibration and sends an alert over Wi-Fi to Home Assistant.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors