Skip to content

mrahmadt/ESPHome-Smart-Oven

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Smart Oven (ESPHome Oven Monitor)

An oven-area monitor built with ESPHome on an ESP32-C6.

The goal is to answer simple questions like:

  • Is the oven likely running?
  • Is it cooling down?
  • Is it off?
  • Is there a possible gas leak?
  • Is the oven running while nobody is in the kitchen?

The goal is not to measure exact oven temperature.

This project uses:

  • SHT3x to monitor temperature near the oven
  • MQ-6 to monitor possible gas leakage
  • Home Assistant to provide room temperature and motion state
  • Home Assistant automations to send alerts

Features

  • Reads oven-area temperature from SHT3x
  • Reads MQ-6 analog value for a rough gas trend
  • Reads MQ-6 digital alert output
  • Calculates temperature change over 5 minutes
  • Compares oven-area temperature with room temperature from Home Assistant
  • Exposes one text status sensor:
    • Pending
    • Off
    • Running
    • Cooling
  • Uses Home Assistant automation to send alerts for:
    • oven status changes
    • gas alert detection
    • MQ-6 analog threshold
    • oven running while kitchen motion conditions match the automation logic

How it works

Temperature

The SHT3x reads the temperature near the oven.

Every minute, the project stores a new reading and keeps the last 5 minutes of values.
It then calculates the difference between:

  • current oven temperature
  • oven temperature 5 minutes ago

That gives a simple Temp Change 5 Min value.

Oven status

The project also reads the room temperature from Home Assistant using:

  • sensor.kitchen_temperature

The oven status is then decided like this:

  • Pending
    • not enough samples collected yet
  • Off
    • oven-area temperature is close to room temperature
  • Running
    • temperature is rising strongly, or the oven is still clearly hotter than room temperature
  • Cooling
    • oven was running and is now cooling down

Gas monitoring

The MQ-6 is used in 2 ways:

  • AO, analog output, as a rough gas trend
  • DO, digital output, as a gas alert signal

The analog value is useful for thresholds and graphs.
The digital output is useful for simple immediate alerts.

Home Assistant automation

This project also uses Home Assistant automation for notifications.

The automation can alert you when:

  • oven status changes
  • gas alert is detected
  • MQ-6 analog value goes above a threshold
  • the oven is reported as running while the kitchen motion condition in Home Assistant matches your rule

In this setup, kitchen presence is based on a motion sensor exposed in Home Assistant.

The automation YAML is stored separately in the repository and is not embedded in this README.


Important safety note

This project is useful for:

  • home automation
  • notifications
  • trend monitoring
  • extra warning

It should not be your only gas safety system.

For real kitchen gas safety, use a proper certified gas alarm.


Hardware

Parts

  • 1 × ESP32-C6 dev board
  • 1 × SHT3x I2C sensor module
  • 1 × MQ-6 gas sensor module
  • 2 × 10k resistors
  • 2 × 20k resistors
  • jumper wires
  • breadboard, perfboard, or soldered board

Wiring

ESP32-C6 pins used

ESP32-C6 pin Purpose
3V3 SHT3x power
5V MQ-6 power
GND Common ground
GPIO7 SHT3x SDA
GPIO6 SHT3x SCL
GPIO4 MQ-6 AO through divider
GPIO5 MQ-6 DO through divider

SHT3x wiring

Connect the SHT3x like this:

SHT3x pin ESP32-C6 pin
VCC 3V3
GND GND
SDA GPIO7
SCL GPIO6

Important: power the SHT3x from 3.3V, not 5V.


MQ-6 wiring

The MQ-6 module has:

  • VCC
  • GND
  • AO
  • DO

Power

MQ-6 pin ESP32-C6 pin
VCC 5V
GND GND

Analog output, AO

Connect AO to GPIO4 through a resistor divider:

MQ-6 AO ---- 10k ----+---- GPIO4
                     |
                    20k
                     |
                    GND

Digital output, DO

Connect DO to GPIO5 through a resistor divider:

MQ-6 DO ---- 10k ----+---- GPIO5
                     |
                    20k
                     |
                    GND

AO and DO are separate signals. Do not connect them together.

Full wiring diagram

                           +----------------------+
                           |      ESP32-C6        |
                           |                      |
                           | 3V3 ---------------+------------------> SHT3x VCC
                           | GND ---------------+--------+---------> SHT3x GND
                           |                     \       \
                           |                      -------+---------> MQ-6 GND
                           |                        
                           | 5V -------------------------------> MQ-6 VCC
                           |
                           | GPIO7 ----------------------------> SHT3x SDA
                           | GPIO6 ----------------------------> SHT3x SCL
                           |
                           | GPIO4 <-----+---- 10k ---- MQ-6 AO
                           |             |
                           |            20k
                           |             |
                           |            GND
                           |
                           | GPIO5 <-----+---- 10k ---- MQ-6 DO
                           |             |
                           |            20k
                           |             |
                           |            GND
                           +----------------------+

oven_wiring_diagram_infographic

alt text

Breadboard / perfboard logic

Think of the MQ-6 AO and DO as two separate resistor dividers.

AO divider

MQ-6 AO -> 10k -> junction -> GPIO4
                        |
                       20k
                        |
                       GND

DO divider

MQ-6 DO -> 10k -> junction -> GPIO5
                        |
                       20k
                        |
                       GND

This is the same electrical idea whether you build it on: • breadboard • perfboard • soldered prototype board

ESPHome configuration

The repository includes the ESPHome configuration file separately.

It includes: • SHT3x temperature sensor • MQ-6 analog sensor • MQ-6 digital gas alert • room temperature from Home Assistant • 5-minute temperature delta calculation • oven status logic

Sensors exposed to Home Assistant

This project creates these useful entities:

Temperature

  • sensor.oven_oven_temperature
  • sensor.oven_oven_temp_change_5_min

Gas

  • sensor.oven_mq6_analog
  • binary_sensor.oven_mq6_gas_alert

Status

  • sensor.oven_status

Home Assistant dependencies

This project also expects these Home Assistant entities to exist:

  • sensor.kitchen_temperature
  • a kitchen motion sensor used by your automation logic

Status meanings

Status Meaning
Pending Not enough samples collected yet
Off Oven-area temperature is close to room temperature
Running Oven is heating strongly or still clearly hot
Cooling Oven was running and is cooling down
room temp unavailable Home Assistant room temperature entity is missing or unavailable

Alerting behavior

The Home Assistant automation in this project is designed to notify you when:

  • oven status changes
  • gas alert becomes active
  • MQ-6 analog value crosses a defined threshold
  • oven is running while the kitchen motion logic matches your alert rule

This lets you build practical notifications such as:

  • gas warning in the kitchen
  • oven status updates
  • oven running while nobody is detected in the kitchen
  • room temperature unavailable warning

Placement tips

SHT3x

Place the SHT3x:

  • near the oven
  • away from direct flame
  • away from direct contact with metal surfaces
  • where it can detect temperature rise around the oven

MQ-6

Place the MQ-6:

  • where leaked gas is likely to reach it
  • in a location with airflow
  • away from grease and steam as much as possible

MQ sensors need warm-up and can drift, so expect some variation.


Build tips

  • Keep all grounds common
  • Keep the resistor-divider wiring short and clean
  • Verify AO and DO divider voltages with a multimeter before connecting to the ESP32-C6
  • Label AO and DO clearly during assembly
  • If using a perfboard, test everything first on a breadboard

Quick test checklist

SHT3x

  • VCC to 3V3
  • GND to GND
  • SDA to GPIO7
  • SCL to GPIO6

MQ-6

  • VCC to 5V
  • GND to GND
  • AO to GPIO4 through 10k / 20k
  • DO to GPIO5 through 10k / 20k

ESPHome

  • device connects to Wi-Fi
  • sensor.kitchen_temperature exists in Home Assistant
  • oven status changes from Pending to normal states after enough samples

Home Assistant

  • kitchen motion sensor is available
  • notification service is configured
  • automation file is imported and enabled

Notes

  • The MQ-6 analog value is a rough trend, not a calibrated ppm reading
  • The MQ-6 digital signal is useful for a simple gas alert
  • This project is better used as a smart monitor, not as a certified safety system

License

Add your preferred license here.

For example:

MIT License

About

ESPHome oven monitor using ESP32-C6, SHT3x, and MQ-6 to detect oven status, temperature changes, and possible gas leaks, with Home Assistant alerts and kitchen motion awareness.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors