A complete access control solution with ESP32-based door controllers and a web-based management dashboard. Runs as a Home Assistant Add-on or standalone.
- β Dual-door support (2 doors per ESP32 board)
- β Wiegand RFID readers (26-bit & 34-bit support)
- β PIN code keypads (4-8 digit PINs)
- β Temporary access codes (one-time, limited, or unlimited uses)
- β Per-door usage tracking for temp codes
- β User schedules (time-based access restrictions)
- β Door schedules (auto unlock/lock by time)
- β Web-based controller dashboard
- β User & group management with door permissions
- β Emergency lockdown/unlock (board-wide or per-door)
- β Real-time access logs with filtering
- β Schedule templates for easy configuration
- β CSV import/export for users
- β Configurable controller address - Set default IP/domain for boards
- β HTTP & HTTPS support - Works with reverse proxies and Cloudflare tunnels
- β Remote board management - Adopt boards on different networks
- β Offline operation (ESP32 works without controller)
- β Relay control with configurable unlock duration (0.5-30 seconds)
- β Audible feedback (buzzer)
- β Visual feedback (LED)
- β Dual keypad support (one per door)
- β Dual Wiegand reader support
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CONTROLLER β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Home Assistant Add-on / Standalone β β
β β β β
β β β’ Web Dashboard (port 8100) β β
β β β’ User Management β β
β β β’ Access Logs β β
β β β’ Board Management β β
β β β’ Controller Settings (IP/Domain configuration) β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β
β HTTP/HTTPS (configurable) β
β β β
ββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββΌβββββββββββββββββββββββ
β β β
βΌ βΌ βΌ
βββββββββββββββββ βββββββββββββββββ βββββββββββββββββ
β ESP32 #1 β β ESP32 #2 β β ESP32 #3 β
β (2 doors) β β (2 doors) β β (2 doors) β
β β β β β β
β β’ RFID Reader β β β’ RFID Reader β β β’ RFID Reader β
β β’ Keypad β β β’ Keypad β β β’ Keypad β
β β’ Relays β β β’ Relays β β β’ Relays β
βββββββββββββββββ βββββββββββββββββ βββββββββββββββββ
- Add this repository to Home Assistant Add-on Store
- Install "Access Control System"
- Start the add-on
- Access the dashboard via the add-on panel
docker run -d \
-p 8100:8100 \
-v access_control_data:/data \
--name access-control \
ghcr.io/btzll1412/access-control-addonπ Web Flasher
- Connect ESP32 via USB
- Click "INSTALL FIRMWARE"
- Select your COM port
- Wait 2-3 minutes for flashing
After flashing:
- Connect to WiFi:
AccessControl-Setup(password:Config123) - Open browser: http://192.168.4.1
- Enter your WiFi credentials
- Set controller IP address
- Save and reboot
- Open the Controller Dashboard
- Go to π‘ Boards tab
- Click "β Adopt Boards" when you see the notification
- Configure controller address (see below)
- Click "Adopt"
The Controller Settings feature allows you to configure the default address that boards use to communicate with the controller. This is essential for:
- Boards on different networks
- Using a domain name instead of IP
- HTTPS with reverse proxy (nginx, Cloudflare tunnel, etc.)
- Go to π‘ Boards tab
- Click "βΌ Show Settings" on the Controller Settings panel
- Configure:
- Protocol: HTTP or HTTPS
- Address: IP address or domain name
- Port: 8100 for HTTP, 443 for HTTPS (auto-detected)
- Click "πΎ Save Default Settings"
| Scenario | Protocol | Address | Port |
|---|---|---|---|
| Local network | HTTP | 192.168.1.100 | 8100 |
| Cloudflare tunnel | HTTPS | access.example.com | 443 |
| Custom port | HTTPS | myserver.com | 8443 |
When adopting a board, you can:
- β Use default - Uses the saved controller settings
- β¬ Custom - Enter a specific address for this board
This allows mixing local and remote boards in the same system.
| Component | Specification | Notes |
|---|---|---|
| ESP32 Board | ESP32-WROOM-32 or ESP32-S3 | 16MB Flash recommended |
| USB Cable | Data cable (not charge-only) | Must support data transfer |
| Relay Module | 2-Channel 5V/12V | With optocoupler isolation |
| Power Supply | 12V DC, 2A minimum | For relays and locks |
| Wiegand Readers | RC522 or PN532 RFID | Up to 2 readers per board |
| Keypads | 4x4 Matrix Keypad | Up to 2 keypads per board |
| Electric Locks | 12V solenoid or magnetic | 2 doors per board |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β ESP32 PINOUT β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β RELAYS: β
β GPIO 13 βββ Relay 1 (Door 1) β
β GPIO 12 βββ Relay 2 (Door 2) β
β β
β WIEGAND READER 1 (Door 1): β
β GPIO 21 βββ D0 β
β GPIO 22 βββ D1 β
β β
β WIEGAND READER 2 (Door 2): β
β GPIO 32 βββ D0 β
β GPIO 33 βββ D1 β
β β
β KEYPAD 1 (Door 1): β
β Rows: GPIO 14, 27, 26, 25 β
β Columns: GPIO 23, 18, 5, 17 β
β β
β KEYPAD 2 (Door 2): β
β Rows: GPIO 15, 4, 16, 34 β
β Columns: GPIO 35, 36, 39, 25 β
β β
β FEEDBACK: β
β GPIO 19 βββ Buzzer (+) β
β GPIO 2 βββ Status LED (+) βββ 220Ξ© βββ GND β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ESP32 Relay Module Door Lock
βββββ ββββββββββββ βββββββββ
GPIO 13 βββββββββββββββ IN1
GPIO 12 βββββββββββββββ IN2
3.3V ββββββββββββββββββ VCC
GND βββββββββββββββββββ GND
COM1 βββββ 12V (+)
NO1 ββββββββββββββββββ Lock 1 (+)
COM2 βββββ 12V (+) Lock 1 (-) βββ 12V (-)
NO2 ββββββββββββββββββ Lock 2 (+)
Lock 2 (-) βββ 12V (-)
- View all connected boards with online/offline status
- Configure default controller settings
- Adopt pending boards
- Sync user database to boards
- Delete/edit board configuration
- Real-time door status
- Manual unlock button
- Emergency lock/unlock per door
- Configure unlock duration
- View door schedules
- Add/edit users
- Assign RFID cards and PINs
- Set validity dates
- Assign to access groups
- Import/export via CSV
- Create access groups
- Assign doors to groups
- Color-coded organization
- User schedules (when users can access)
- Door schedules (auto unlock times)
- Create temporary access codes
- One-time, limited uses, or unlimited
- Per-door or global codes
- Time-limited validity
- Board-wide emergency lockdown
- Board-wide emergency unlock
- Per-door overrides
- Auto-reset timers
- Real-time access log
- Filter by door, user, date
- Access granted/denied status
Possible causes:
- Controller address not reachable from board's network
- Port blocked by firewall
- HTTPS certificate issues
Solutions:
- Verify the controller address is correct
- For HTTPS, ensure port 443 is used (not 8100)
- Check if board can reach the controller IP/domain
- Look at board logs via serial monitor
- Install CH340/CP2102 driver
- Try different USB cable (must be data cable)
- Try different USB port
- Restart computer
- Hold BOOT button on ESP32 while clicking "Install"
- Try lower baud rate
- Ensure no other program is using the COM port
- Wait 30 seconds after flashing
- Power cycle the ESP32
- Check if LED is blinking (indicates AP mode)
- Check relay wiring (COM, NO pins)
- Verify 12V power supply to relays
- Check door lock polarity
- Test relay manually
- Verify unlock duration setting
- Verify Wiegand wiring (D0/D1 to correct GPIOs)
- Check if card is added to user account
- Test card format (26-bit vs 34-bit)
- Check if reader has power
- Web Flasher: https://btzll1412.github.io/access-control-addon/esp32-flasher/
- GitHub Repository: https://github.com/btzll1412/access-control-addon
- Issues: GitHub Issues
- New: Configurable controller address for board adoption
- New: HTTP/HTTPS protocol selection
- New: Default controller settings in Boards tab
- New: Per-board controller address override
- Fix: Port defaulting (443 for HTTPS, 8100 for HTTP)
- Initial release with full feature set
- Web flasher for ESP32
- Home Assistant Add-on support
MIT License - See LICENSE file for details
Contributions welcome! Please open an issue or pull request.
Built with β€οΈ using ESP32, Flask, and Home Assistant