Project Briefing
A low-cost hardware project where I rebuilt my broken garage remote into a fully HomeKit-compatible smart garage door opener for under $22 AUD. Using an ESP32, a relay module, and a custom C++ firmware built with HomeSpan, the system exposes the garage door as a native HomeKit accessory — complete with Siri control, automations, and real-time door state updates.
The project involved:
- Reverse-engineering a dumb garage opener
- Designing and wiring the ESP32–relay–buck converter hardware
- Writing the firmware to implement Apple’s HomeKit Garage Door service
- Creating a clean, reliable, local-only solution (no cloud, no subscriptions)
It now opens and closes my garage via the Home app, Siri, or automations like “open when I arrive home”. A fun mix of embedded systems, HomeKit internals, and practical engineering.
Technical Details
Microcontroller
- ESP32 Dev Board
- Dual-core Tensilica LX6 @ 240 MHz
- 520 KB SRAM
- Integrated 2.4 GHz Wi-Fi (802.11 b/g/n)
Power System:
- Input: 24V auxiliary output from garage opener
- Conversion: DC–DC buck converter (24V → 5V)
- ESP32 powered via VIN pin
- Relay powered at 5V from shared supply
Control Interface:
- 1-Channel 5V relay module
- Relay contact operation: COM + NO
- Control signal via GPIO22
- Pulse duration: 1000 ms
- Pin returned to high-impedance (INPUT) after trigger
Garage Door Integration:
- Momentary switch simulation
- Wiring mapped to opener terminals: COM WALL and NEG SWITCH
- Fully compatible with most low-voltage garage openers (dry-contact activated)
HomeKit Implementation:
- Using HomeSpan (open-source HAP implementation)
- Accessory category: Garage Door Opener
- Characteristics implemented:
• CurrentDoorState
• TargetDoorState - ObstructionDetected
- Pairing method: HomeKit setup code
- Local-only communication (no cloud services)
Firmware:
- Written in C++ using Arduino cores for ESP32
- Includes serial command interface for debugging
- Implements door-state timing logic (Opening → Open, Closing → Closed)
- Wi-Fi credentials and pairing code configurable in firmware
Safety + Reliability:
- Relay isolated from microcontroller logic
- ESP32 protected from power ripple via regulated 5V supply
- Input pin returned to high-impedance to avoid ghost triggers
- Maintains full compatibility with physical wall switch and safety sensors
