ESP32-based multi-sensor fire & gas alarm with MacroDroid voice alerting
When a threshold is breached, the ESP32 sends an HTTP request to MacroDroid via it's WebHook on your Android phone, passing the trigger cause as a parameter. A MacroDroid macro receives this, extracts the cause and speaks it aloud [at full volume] via text-to-speech — even if the phone is on silent at any time, but it must still have Internet access.
Three separate sensors can trigger an alert, each with its own spoken message: [ in addition to :Fire Fire Fire" ]
| Trigger | Condition | Spoken alert example | MacroDroid code received |
|---|---|---|---|
| 🌡️ Temperature min | Temperature falls below threshold [frost detection] |
Temperature is too low" | Low |
| 🌡️ Temperature max | Temperature exceeds threshold | "Temperature is too high" | High |
| 📈 Temperature rise rate | Temperature rising faster than configured rate | "Temperature is rising rapidly" | Rise |
| 💨 Carbon Monoxide | CO level exceeds threshold | "Excessive Carbon Monoxide present" | CO |
| ⚗️ Hydrogen | H2 level exceeds threshold | "Excessive Hydrogen present" | H2 |
| Multiple |
more than one sensor triggered |
"Major fire in progress" |
Many |
Call /status on the device to get the current state. Example response:
Temperature High Threshold: 30.00 Temperature Low Threshold: 1.00 Temperature rise rate: 1.50Temperature adjustment: -3.98 Current Temperature: 20.01 Min Temperature: 19.90 (2026-04-12 08:00:36) Max Temperature: 20.17 (2026-04-12 07:11:37) CO Threshold: 300.00 Current CO: 127.38 Min CO: 80.75 (2026-04-12 08:08:05) Max CO: 214.25 (2026-04-12 07:49:15) H2 Threshold: 300.00 Current H2: 94.13 Min H2: 39.63 (2026-04-12 07:37:19) Max H2: 143.50 (2026-04-12 08:10:33)
A dedicated Android app (Java, API 26+, tested on Samsung S9+) provides a live dashboard with colour-coded gauges, one-tap toggle controls and in-app threshold editing.
All commands are plain HTTP GET requests. Use
WebCmd or any browser.
Replace 192.168.1.199 with your device IP.
| Command | Description |
|---|---|
| http://192.168.1.199/status | Current settings and sensor readings, replace "status" with any of the following examples |
| alarm?system=on|off | Turn the entire system on or off (eg. cancel false alarms) |
| alarm?alert=on|off | Enable or disable phone alerting |
| alarm?buzzer=on|off | Enable or disable the onboard buzzer |
| temp?min=1 | Set temperature alarm lowthreshold (°C) |
| temp?max=35 | Set temperature alarm high threshold (°C) |
| temp?rise=1.5 | Set temperature rise rate threshold (°C/min) |
| temp?adjust=-2.5 | Calibration offset — adjusts all temperature readings |
| temp?reset=temp | Reset min/max temperature records |
| temp?reset=co | Reset min/max CO records |
| temp?reset=h2 | Reset min/max H2 records |
| temp?reset= | Reset all min/max records |
| Co?max=300 | Set CO alarm threshold (ppm) |
| H2?max=300 | Set H2 alarm threshold (ppm) |
| Feature | Magic Fire Alarm | Nest Protect | First Alert SC5 | X-Sense |
|---|---|---|---|---|
| Temperature low monitoring |
Yes | ❌ No | ❌ No | ❌ No |
| Temperature high monitoring | Yes | Yes | Yes | ⚠️ Basic |
| Temperature rise rate detection | Yes | ❌ No | ❌ No | ❌ No |
| CO monitoring | Yes | Yes | Yes | Yes |
| H2 (hydrogen) monitoring | Yes | ❌ No | ❌ No | ❌ No |
| Spoken cause of alarm | Yes, immediate via MacroDroid | ⚠️ App notification only | ⚠️ App notification only | ❌ No |
| Remote alarm cancelling |
Full, Buzzer or Alert, Wi-Fi needed | ⚠️ Same Wi-Fi only, proximity required, blocked on high CO | ⚠️ App silence, no granular control | ❌ No |
| Open HTTP API | Full RestFul API | ❌ Proprietary only | ❌ Proprietary only | ❌ No |
| Adjustable thresholds | All sensors | ❌ Fixed | ❌ Fixed | ❌ Fixed |
| Temperature calibration | Yes | ❌ No | ❌ No | ❌ No |
| Min/Max history logging | All sensors | ❌ No | ❌ No | ❌ No |
| Custom Android app | Open source | ⚠️ Google Home only | ⚠️ First Alert only | ⚠️ X-Sense only |
| MacroDroid integration | Native Webhook |
❌ No | ❌ No | ❌ No |
| Subscription required | None | ❌ Nest Aware | ⚠️ Optional | None |
![]() MacroDroid can receive the following alerts: High, Rise, CO, H2, Many |
![]() For false alerts during configuration shake to cancel macro and shake again to re-enable macro |
When the system is powered it will trigger both the buzzer alarm and
also a trial voice alert on the phone [which can be used to check it is
working as expected and test settings by restarting the unit with the
restart button].
It may continue producing a buzz alert and voice alert at the first
power up while the sensors initialise for anything up to a day.
To get around this, use the alarm?system=off for the first 24 hours, or adjust the thresholds accordingly
| Item | Description |
|---|---|
| 📱 Android App APK | Java app for Android API 26+ (Samsung S9+ and above). Pre-configured for 192.168.1.199 |