A standalone ESP32-based Wi-Fi panic button that sends email and/or webhook alerts when pressed. Designed for rapid deployment with a captive portal-based configuration interface, suitable for non-technical environments.
- β¨ Features
- π οΈ Hardware
- π Pinout
- π¦ Libraries Used
- π Getting Started
- π§ Web Interface
- π Battery Monitoring
- π Webhook Integration
- π OTA Updates
- π Resetting
- πΌοΈ UI Preview
- π¨οΈ 3D-Printed Case
- π License
- Captive portal for Wi-Fi and alert configuration
- Email (SMTP) and/or webhook alerts when button is pressed
- EEPROM-stored settings with web-based update support
- Visual battery monitoring (gauge, percentage, and voltage)
- Responsive, mobile-friendly web interface
- Factory reset and test alert functionality
- Support for ESP32-C6 boards (like FireBeetle 2 ESP32-C6)
- Configuration validation to ensure at least one alert path is active
Optimized for:
- DFRobot FireBeetle 2 ESP32-C6 board
- Momentary push-button (GPIO 4)
- Onboard LED (GPIO 15)
- Battery voltage monitoring via A0 (GPIO 0)
Function | GPIO Pin |
---|---|
Panic Button | 4 |
Status LED | 15 |
Battery ADC | 0 |
- ESP Mail Client
- HTTPClient (for webhook functionality)
- WiFi
- WebServer
- DNSServer
- EEPROM
- Flash the firmware using the Arduino IDE
- If no config is stored, the device starts in Setup Mode:
- Hosts an AP named
PanicAlarm_XXXX
(XXXX is part of the MAC address) - Password:
setupalarm
- Captive portal guides you through configuration
- Hosts an AP named
- Once configured, the device connects to your Wi-Fi and enters Normal Mode
- Captive portal with pages for Wi-Fi, SMTP, webhook, and location setup
- Device enters this mode if config is missing or reset
- Live status dashboard with battery gauge and diagnostics
- Config page for updating any setting
- Alert testing tools for both email and webhook
- Factory reset with confirmation
- Visual gauge with color coding:
- Green: > 50%
- Yellow: 25β50%
- Red: < 25%
- Live percentage and voltage display
- Low battery alerts via email/webhook (if enabled)
Webhook alerts are JSON payloads with:
event
(e.g."panic_triggered"
or"battery_low"
)device_id
,location
battery_level
,voltage
ip
,mac
timestamp
This device supports automatic Over-The-Air firmware updates via the included OTA update server:
- Devices check for updates periodically
- Server verifies device identity and firmware compatibility
- Updates are downloaded and applied automatically
- No manual intervention required for managed devices
For hosting your own OTA update server, refer to the OTA Server README for complete setup and usage instructions.
Note: OTA updates preserve all user configurations and settings.
Access the reset page via the web UI to:
- Clear all config (Wi-Fi, SMTP, webhook, location)
- Restart in Setup Mode
This project includes a printable enclosure tailored for the FireBeetle ESP32-C6. All STL and 3MF files are located in the case/v1/
directory:
panic_button_case.3mf
β complete project layout for slicerscase_back.stl
case_bottom.stl
case_front.stl
case_top.stl
- Material: PLA, PETG, or similar
- Layer Height: 0.2 mm
- Infill: β₯ 15%
- Supports: Optional (recommended for top-bottom half alignment when screwed together)
- Perimeters/Walls: 2 or 3
The top and bottom shells include simple interlocking features. Use supports only if dimensional accuracy matters for your use case.
Firmware: GPLv3 β see LICENSE for details.
OTA Server: AGPLv3 β see ota-server/LICENSE for details.
Case: MIT License β see case/LICENSE for details.