Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
Bettesworth Construction
DIY Home Improvement

DIY Wi‐Fi Gas Detector With Text Alerts: Build It Safely

A Wi‐Fi gas monitor can send phone alerts, but an ESP32 and MQ sensor are supplementary electronics—not a certified residential gas alarm. Learn the safer architecture, fuel-specific placement, Home Assistant alerts, calibration, and failure planning.

By Bettesworth Construction Team 8 min read
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Yes, you can build a Wi‐Fi-connected gas monitor that alerts your phone—but an ESP32 and MQ sensor should never be your home’s only gas alarm. The safest arrangement is a listed residential combustible-gas detector for the actual life-safety function, with Home Assistant adding remote push notifications or optional SMS. An ESP32/MQ-5 build is useful for learning and supplementary monitoring, but it is not a certified replacement.

Choose the safe architecture first

Approach Best for Local alarm Remote alert Main limitation
Listed detector plus smart input Home safety Yes Yes Relay or integration compatibility varies by model
ESP32 plus MQ-5 Learning and prototyping Must be added Yes Not certified; readings require warm-up and calibration
Commercial smart detector Convenience Usually Depends on the model May depend on cloud services and app compatibility

For a construction or home-improvement project, the recommended design is:

As an Amazon Associate I earn from qualifying purchases.

  1. Install a listed combustible-gas alarm according to its instructions.
  2. Choose a model or alarm system with a documented relay, dry-contact output, or supported smart-home integration.
  3. Connect that alarm state to Home Assistant through an appropriate, isolated input.
  4. Use Home Assistant for urgent phone notifications and, if required, an external SMS service.

The certified alarm must continue to sound locally if Wi‐Fi, Home Assistant, the router, or the internet fails.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Know which gas you need to detect

Natural gas is primarily methane and is lighter than air. Propane and LPG are heavier than air. That difference affects both the sensor choice and its mounting position.

#1 Best Overall
Sale
X-Sense Wi-Fi Radon Detector for Home with APP Notification, Model XR0A-iR
  • Always Know When Radon Changes: Connect to 2.4 GHz Wi-Fi and check radon levels in the app anytime; app notifications keep you informed, so you don’t have to keep checking the device
  • See the Trend, Not Just a Snapshot: Radon levels can rise and fall over time. Up to 999 days of continuous monitoring helps reveal your home’s long-term radon pattern, with saved history retained after battery replacement
  • Read Results Without Guesswork: The LCD screen shows current radon levels and simple trend arrows, helping you quickly understand whether readings are going up, going down, or staying stable
  • Know What to Do Next: The app helps you understand your readings and provides practical guidance when action may be needed; export PDF reports or XLSX/CSV files for records, trend review, or professional consultation
  • Check Multiple Areas with One Device: Move the detector to another room and press the reset button to start a new monitoring session, making it easy to compare radon levels across different spaces
  • Natural gas: generally requires high placement, near the ceiling or high on a wall, subject to the detector manufacturer’s instructions and local requirements.
  • Propane/LPG: generally requires low placement, often within approximately 18 inches of the floor, subject to the product instructions and adopted code.
  • Both fuels: one sensor and one mounting height may not adequately cover different fuel areas. Use fuel-specific listed detectors or a product explicitly rated for both.

NFPA committee material discusses high placement for natural-gas detectors and low placement for propane detectors. Confirm the current locally adopted code and the exact detector manual before installation: NFPA placement material.

A carbon-monoxide alarm does not detect methane or propane, and a smoke alarm does not detect combustible gas. Homes with fuel-burning appliances may need separate combustible-gas and CO protection. UL explains the distinction between these devices and the relevant standards at UL’s gas-detector certification page.

What certification means

Look for the exact model’s documentation and applicable listing—not merely a marketplace description or a generic “UL” logo. Relevant standards include UL 1484 for residential gas detectors, UL 2075 for gas and vapor detectors and sensors used in household gas-detection systems, and UL 2034 for carbon-monoxide alarms.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

UL has warned about combustible-gas detectors carrying unauthorized UL marks. Verify the model rather than trusting a seller’s claim: UL’s warning.

Rank #2
PT520A Natural Gas Detector, Gas Leak Detector with 17-Inch Gooseneck, Locating The Source Like Propane, Methane, and Butane for Home and RV (Includes Battery x3) - Orange
  • Effective Gas Leak Detector: The TOPTES PT520A natural gas detector detects leaks of methane, propane, natural gas, LPG, butane, and more in tight spaces
  • Flexible Probe: The 17-inch gooseneck allows easy access to hard-to-reach areas like pipelines, storage tanks, gas fireplaces, and basements, ideal for both indoor and outdoor leak detection. During use, point the probe toward the suspected leak source and move as close as 1–5 cm
  • Visual and Audible Alarm: PT520A responds in 0.5 seconds, with 7 colored bars and a 75dB alarm that increase with gas concentration. Detection range: 50-10,000 ppm (Methane)
  • User-Friendly Functions: Enable or disable Auto Power-Off with the APO button to save power after 10 minutes of inactivity. The Mute button silences the alarm, and the non-slip, wear-resistant design ensures a secure, comfortable grip for easy handling
  • What You Get: 1×PT520A Gas Leak Detector, 3×AAA Batteries, 1×Protective Case, and 1×User Manual. Allow 30 seconds of warm-up in clean air before starting detection

Parts for an experimental ESP32 monitor

  • ESP32 development board
  • MQ-5 module for experimental natural-gas/LPG monitoring, or a sensor specifically matched to the fuel
  • Power supply sized for both the ESP32 and the sensor heater
  • Local buzzer and/or status LED
  • Secure connectors or terminal blocks
  • Ventilated enclosure that does not block the sensing element
  • Home Assistant server and reliable Wi‐Fi
  • Optional backup power for the network and Home Assistant host

MQ-5 modules are marketed for LPG, natural gas, and coal gas. MQ-2 modules are marketed for LPG, propane, hydrogen, and other gases. These modules respond to multiple vapors and are not selective, calibrated residential alarms. See the manufacturer information for MQ-5 and MQ-2.

An integrated option such as M5Stack’s Unit MQ uses an MQ-5 sensor and provides an I2C interface with sensor voltage, ADC readings, temperature, and firmware information. That can simplify software integration, but it does not make the completed project a listed alarm.

Power and enclosure precautions

MQ sensors contain a heated sensing element. They normally require continuous heater power, produce heat, and are not automatically suitable for battery operation. Do not describe the project as battery-friendly unless the exact sensor, duty cycle, current draw, temperature, and runtime have been measured.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Do not put an unsealed hobby circuit directly in a location where leaked gas could create an ignition hazard. The safest arrangement keeps the listed detector responsible for detection and treats the hobby electronics as a separate monitoring layer. Use a suitable enclosure with unobstructed airflow, secure wiring, and no exposed conductors likely to contact moisture.

Rank #3
TopTes Guard-101 Gas Detector, 4 Gas Monitor for H2S, CO, LEL and O2, with Vibration, Visual and Audible Alarms, 14h Long Battery Life, Safety Explosion-Proof, for Work, Home - Orange
  • Quick Detection, Safety First: Guard-101 4 gas monitor multi gas detector is designed for rapid detection of 4 types of gases (H2S, CO, LEL, O2). The battery life lasts up to 14 hours, ensuring long-term monitoring of gas concentrations
  • User-Friendly Design: Guard-101 gas detector is made of high-strength ABS engineering plastic, which is waterproof, dustproof, and explosion-proof. Its back clip design makes it easy to carry in the workplace. Password protection prevents accidental operation, with an initial password of "69"
  • Triple Alarm, Data Storage: Guard-101 4 gas monitor multi gas detector utilizes three alarm modes: LED light, vibration, and sound. It responds within 0.5 seconds and continues to alarm until the gas concentration returns to normal. The Guard-101 also features an alarm record storage function, allowing you to check monitoring data at any time
  • Professional Certification: The Guard-101 4 Gas Monitor has passed rigorous safety tests conducted by internationally authorized institutions. It holds valid certification and meets industry standards, ensuring high reliability and accuracy in various environments
  • What You Get: Your purchase includes a Guard-101 gas detector, a packaging box, a user manual, a charging cable, and a standard gas hood. This device is suitable for a wide range of applications, including industrial manufacturing, mining, agriculture, emergency rescue, and home use

Build the prototype as a monitored state machine

The functional arrangement is:

MQ-5 sensor → ESP32 → Wi‐Fi → Home Assistant → phone push notification or optional SMS
       └→ local buzzer/LED

The ESP32 should:

  • Power and read the sensor continuously.
  • Ignore readings during the documented startup warm-up period.
  • Smooth noisy readings.
  • Require a sustained threshold crossing instead of reacting to one sample.
  • Drive a local buzzer immediately when its alarm state is reached.
  • Publish a clear binary gas_detected state.
  • Publish sensor health, Wi‐Fi status, uptime, and last-seen information.
  • Report an unavailable or implausible sensor separately from a clear reading.

Use the analog value for trends, calibration, and troubleshooting. Do not treat an uncalibrated ADC value as a verified gas concentration or percentage of the lower explosive limit.

A basic hysteresis strategy prevents the alarm from chattering:

If reading exceeds ALARM_ON for CONFIRM_TIME:
    state = gas_detected

If state is gas_detected and reading falls below ALARM_OFF
for CLEAR_TIME:
    state = gas_clear

ALARM_OFF should be lower than ALARM_ON. Choose values only after observing the sensor’s clean-air baseline and response to an approved test stimulus; do not copy an arbitrary threshold from another build.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Configure Home Assistant alerts

Expose the prototype—or, preferably, the certified alarm’s isolated contact—as a binary sensor in Home Assistant. The current Home Assistant gas-detection trigger documentation shows both the interface workflow and YAML pattern: gas-detected trigger documentation.

Rank #4
PT199 Natural Gas Leak Detector with Audible & Visual Alarm, Portable Gas Sniffer to Locate Combustible Sources Like Methane, Propane for Home(Includes Battery x2)-Orange
  • Combustible Gas Leak Detector: The TopTes PT199 detects natural gas, methane, propane, butane, LPG, and more, pinpointing leaks to reduce the risk of explosion, keeping your family and property safe
  • Visual and Audio Gas Alarm: Visual and audio alarms trigger within 0.5 seconds of gas detection. The alarm intensifies with gas concentration, and the LCD screen turns red when gas levels are high
  • Batteries Included and Easy to Use: The TopTes PT199 includes 2x AAA batteries and is ready after a 30-second warm-up. The low battery indicator activates below 2.4V, and it auto-powers off after 5 minutes without operation or gas detection
  • Compact Design: Pocket-sized, non-slip, and easy to carry or store in the included bag. Ideal for RV owners, DIYers, and homeowners with gas appliances. Saves you from paying hundreds of dollars in diagnostics or wasting gas in an undetected leak
  • What You Get: 1x PT199 Gas Leak Detector, 1x Storage Bag, 2x AAA Batteries, 1x User Manual. Detection range: 50-1,000 ppm (based on methane). Detection distance: 1-5cm
alias: "Urgent gas alert"
triggers:
  - trigger: air_quality.gas_detected
    target:
      entity_id: binary_sensor.kitchen_gas
    options:
      behavior: each
      for: "00:00:00"

actions:
  - action: notify.send_message
    target:
      entity_id: notify.my_device
    data:
      title: "GAS ALERT"
      message: "Combustible gas detected in the kitchen. Leave the building and call for help from outside."

The entity ID and notification target will differ in your installation. Confirm the generated entity and notification service in Home Assistant before enabling the automation.

For a hobby sensor, a brief confirmation period may reduce nuisance alerts, but a long delay can postpone warning. Do not delay a life-safety alert merely to make notifications quieter.

Include fault and recovery notifications

  • Send an urgent alert when gas is detected.
  • Send a separate message when the state returns to normal.
  • Use a cooldown or notification mode that prevents message flooding.
  • Alert when the sensor becomes unavailable.
  • Monitor the Home Assistant host and network if remote warning is important.
  • Schedule a weekly or monthly test reminder.

Push notification is not the same as SMS. Push normally depends on the phone app and data connection. SMS requires a configured external messaging provider, sender identity, account credentials, network access, and usually per-message charges. Voice escalation is another option, but it adds more configuration and cost. Treat SMS as an optional second path, never as the only alarm path.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Warm-up, calibration, and safe testing

MQ sensors are heated semiconductor sensors and should not be expected to give reliable readings immediately after power-up. The required warm-up and first-use burn-in depend on the specific sensor and operating mode. Follow its datasheet rather than applying one universal time.

Best Value
Sale
GQ RadonPro Radon Detector and Geiger Counter 2-in-1 Remote Monitoring App
  • 【RadonPro Radon Gas & Nuclear radiation detection】is designed for home use radon detection & monitoring with highly sensitive and accurate radon sensor.This 2-in-1 design model Integrated both radon detector and Geiger Counter for both radon gas and radiation detection. Namely it can detect Radon gas and nuclear radiation at the same time and shows both reading at main screen simultaneously. Upgraded Version V2.0 since Jan-2026
  • 【Fast response & sensitive】Utilizes fastest calculation algorithm for quick radon testing results in five minutes and radiation result in one minute.
  • 【Radon monitoring】Continuous monitoring of radon levels and radiation level in indoor environments with Logs data into internal memory every second. Equipped with Type-C USB port for communication and power supply for continuous monitoring.
  • 【Color LCD display, User-Friendly Interface & Alarm】High-quality color LCD module, simple, easy-to-use, and large font display with customizable settings to suit individual preferences. Detects radon gas and nuclear radiation with built-in audible and visual alarms when radon gas levels go high
  • 【Menu in the unit & Real-time Data App & Data Sharing】multi-function menu from the unit. Also, a real-time App can be download to cellphone and facilitate real-time data tracking via mobile App. WiFi connection and can be disable or enable. Connect to GQ data sharing website GQ GMC-Map, Connectivity for global data access

Before choosing a threshold:

  1. Run the sensor in clean air and record its baseline over time.
  2. Observe drift as temperature and humidity change.
  3. Check whether cooking vapors, alcohol, solvents, aerosols, smoke, or cleaning products cause a response.
  4. Choose separate alarm and clear thresholds plus sustained-duration rules.
  5. Record how long the sensor takes to return toward baseline.

Never release natural gas into a room or deliberately create a combustible mixture for testing. Safer options include the sensor’s documented procedure, a commercial calibration or test gas designed for that sensor, or a controlled manufacturer-approved test performed outdoors or by a qualified professional.

Test three separate things:

  • Electronics: simulate the alarm input and confirm the ESP32 produces a local alarm and binary state.
  • Sensor: use an approved test stimulus and verify a response.
  • Complete system: confirm the local alarm, Wi‐Fi reporting, Home Assistant automation, phone notification, recovery message, and offline fault alert.

Place and maintain the device correctly

Follow the listed detector’s manual first. In general, natural-gas detectors belong high in the room, while propane detectors belong low. Avoid dead-air corners, concealed cavities, strong drafts, appliance exhaust, drains, splashing water, and locations where ventilation can bypass the sensing element. Place the detector where it can hear locally and where occupants can access its test control.

Garages, crawl spaces, utility rooms, RVs, and outdoor propane installations can have different temperature, humidity, ventilation, and code requirements. An indoor hobby module is not automatically suitable for those environments.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Review the system regularly. Test the certified alarm according to its instructions, periodically test the complete notification chain, inspect wiring and enclosure ventilation, review backup power, and replace the listed detector on its specified schedule. MQ sensors can drift or become affected by dust, humidity, solvents, cooking fumes, and age.

Troubleshooting

Symptom Likely causes Action
Constant alarm Warm-up, vapors, contamination, low threshold, poor power Ventilate safely, inspect the installation and power, and do not dismiss repeated alarms without checking the fuel system.
No alarm Wrong sensor, blocked sensor, failed heater, broken connection, threshold too high Check the fuel match, heater power, sensor health, and approved test procedure.
Reading stuck at zero Disconnected sensor, failed ADC connection, or firmware fault Report it as a fault—not “gas clear”—and inspect the wiring.
Repeated notifications Noise around one threshold or missing cooldown Add hysteresis and notification control without creating a dangerous alert delay.
Device offline Wi‐Fi, power, ESP32, router, or Home Assistant failure Keep the local listed alarm independent and create an explicit offline alert.
Notification not received Muted phone, Do Not Disturb, no data, expired token, disabled automation, or provider outage Test the phone and notification service separately and retain the local siren.
Reading changes with cleaning products MQ cross-sensitivity to vapors Improve placement, record the interference, and do not claim selective gas measurement.

Do not casually add an automatic shutoff

Closing a gas valve can be part of an engineered system, but it is not a simple relay project. Home Assistant documents valve-control automation, yet any automatic shutoff requires professional evaluation of the valve type, voltage and current, fail-safe behavior, manual reset, local code, installation requirements, and possible effects on emergency response. Never connect a hobby relay directly to a gas valve without verifying all of those conditions.

What to do when an alarm sounds

Do not operate switches, phones, plugs, or flames inside the suspected area. Leave immediately. From outside, call the gas utility or emergency services. Do not re-enter until qualified responders say it is safe.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Site Office

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.