ESP32-based alert device that monitors HTTP endpoint availability and signals the result via LEDs. Configure Wi-Fi credentials and the monitored URL wirelessly over BLE using a companion app.
GitHub: sub4ikgg/alertoid · Firmware: 1.0.0
- On first boot, hold the BOOT button for ~2 seconds to enter BLE configuration mode.
- Send Wi-Fi credentials and the URL to monitor via BLE.
- The device connects to Wi-Fi and starts polling the URL at the configured interval.
- LEDs indicate the current state at a glance.
- On BLE disconnect, the device restarts automatically.
BLE advertising auto-stops after ~24 seconds if no client connects.
| State | Yellow | Green | Red |
|---|---|---|---|
| Waiting for Wi-Fi | blinks | blinks | off |
| Resource OK | off | triple-blinks, stays on | off |
| Resource unavailable | off | off | rapid blinks, stays on |
| BLE advertising | blinks | off | blinks (sync) |
| BLE connected | alternates with red | off | alternates with yellow |
If the HTTP request fails (network error), the device retries silently on the next check cycle without changing LED state.
| Component | GPIO |
|---|---|
| Yellow LED | 27 |
| Green LED | 25 |
| Red LED | 32 |
| BOOT button | 0 (built-in) |
Device advertises as Alertoid-<MAC>. Connect with any BLE client that supports GATT writes.
Service UUID: 6E400001-B5A3-F393-E0A9-E50E24DCCA9E
| Characteristic | UUID suffix | Direction | Payload |
|---|---|---|---|
| Wi-Fi config | ...03 |
Write | {"ssid":"...","passphrase":"..."} |
| URL config | ...04 |
Write | {"url":"...","code":200,"check_interval":30} |
| URL config | ...07 |
Read | {"url":"...","code":200,"check_interval":30} |
| Firmware info | ...05 |
Read | {"firmware":"1.0.0","mac":"...","serial":"..."} |
| Reboot | ...06 |
Write | "reboot" |
check_interval is in seconds (default: 5 s). After a reboot command, the device restarts and automatically re-enters BLE advertising mode.
Requires PlatformIO.
# Build
pio run
# Flash
pio run --target upload
# Monitor serial output (115200 baud)
pio device monitor
# Flash and monitor
pio run --target upload && pio device monitorSettings survive reboots via ESP32 NVS (Non-Volatile Storage):
| Namespace | Keys | Default |
|---|---|---|
wifi_prefs |
wifi_ssid, wifi_passphrase |
— |
res_prefs |
res_url, res_code, res_interval |
https://httpbin.org/status/200, 200, 50 ticks |
ble |
reboot (bool) |
false |
src/
├── main.cpp # Main loop and operating mode state machine
├── debug.h # LOG() macro
├── ble/ # BLE server and characteristics
├── led/ # LED GPIO control and blink patterns
├── resource/ # HTTPS availability check
└── wifi/ # Wi-Fi connection management
docs/
└── led-blink-spec.md # Detailed LED timing specification
See LICENSE.