Indoor Air quality meter that measures CO_2, particulates, VOCs, temperature, humidity, and pressure. LED indicator displays the PM2.5 AQI by color.
Wemos D1 Mini Microprocessor - $20 for 5
Sensirion SCD40 or SCD41 - $49.50
Sensirion SGP40 - $14.95
Sensirion SPS30 - $46.95
Bosch BMP280 - $9.95
NeoPixel 5050 - $4.50 for 10
https://www.jeffgeerling.com/blog/2021/airgradient-diy-air-quality-monitor-co2-pm25 and https://howtomechatronics.com/projects/diy-air-quality-monitor-pm2-5-co2-voc-ozone-temp-hum-arduino-meter/
esphome:
name: kitchen-air-quality
platform: ESP8266
board: d1_mini
on_boot:
priority: 30
then:
- light.turn_on:
id: kitchen_aqi
effect: "Display AQI"
brightness: 50%
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: set_ota password
wifi:
ssid: your_ssid
password: your_wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Kitchen-AQ Fallback Hotspot"
password: ap_password
captive_portal:
i2c:
sda: 4
scl: 5
scan: true
id: bus_a
# Particle sensor
sensor:
- platform: sps30
pm_1_0:
name: "Kitchen PM <1µm Weight concentration"
id: "kitchen_PM_1_0"
pm_2_5:
name: "Kitchen PM <2.5µm Weight concentration"
id: "kitchen_PM_2_5"
pm_4_0:
name: "Kitchen PM <4µm Weight concentration"
id: "kitchen_PM_4_0"
pm_10_0:
name: "Kitchen PM <10µm Weight concentration"
id: "kitchen_PM_10_0"
pmc_0_5:
name: "Kitchen PM <0.5µm Number concentration"
id: "kitchen_PMC_0_5"
pmc_1_0:
name: "Kitchen PM <1µm Number concentration"
id: "kitchen_PMC_1_0"
pmc_2_5:
name: "Kitchen PM <2.5µm Number concentration"
id: "kitchen_PMC_2_5"
pmc_4_0:
name: "Kitchen PM <4µm Number concentration"
id: "kitchen_PMC_4_0"
pmc_10_0:
name: "Kitchen PM <10µm Number concentration"
id: "kitchen_PMC_10_0"
pm_size:
name: "Kitchen Typical Particle size"
id: "kitchen_pm_size"
address: 0x69
update_interval: 10s
- platform: scd4x
co2:
name: "Kitchen CO2"
temperature:
name: "Kitchen Temperature"
id: "kitchen_temperature"
humidity:
name: "Kitchen Humidity"
id: "kitchen_humidity"
update_interval: 30s
- platform: sgp40
name: "Kitchen VOC"
id: "kitchen_voc"
update_interval: 5s
compensation:
humidity_source: kitchen_humidity
temperature_source: kitchen_temperature
- platform: bmp280
temperature:
name: "Kitchen Temperature 2"
oversampling: 16x
pressure:
name: "Kitchen Pressure"
address: 0x77
update_interval: 60s
uart:
id: uart_2
rx_pin: D4
tx_pin: D3
baud_rate: 115200
light:
- platform: neopixelbus
type: GRB
variant: 800KBPS
pin: GPIO3
num_leds: 1
name: "Kitchen AQI"
id: kitchen_aqi
effects:
- lambda:
name: "Display AQI"
update_interval: 30s
lambda: |-
auto call = id(kitchen_aqi).turn_on();
call.set_transition_length(1000);
call.set_brightness(0.5);
if (id(kitchen_PM_2_5).state >= 0 && id(kitchen_PM_2_5).state < 12) {
call.set_rgb(0, 1, 0);
} else if (id(kitchen_PM_2_5).state >= 12 && id(kitchen_PM_2_5).state < 35) {
call.set_rgb(1, 0.93, 0);
} else if (id(kitchen_PM_2_5).state >= 35 && id(kitchen_PM_2_5).state < 55) {
call.set_rgb(1, 0.4, 0);
} else if (id(kitchen_PM_2_5).state >= 55 && id(kitchen_PM_2_5).state < 150) {
call.set_rgb(1, 0, 0);
} else if (id(kitchen_PM_2_5).state >= 150 && id(kitchen_PM_2_5).state < 250) {
call.set_rgb(0.85, 0, 1);
} else if (id(kitchen_PM_2_5).state >= 250) {
call.set_rgb(1, 0, 0.22);
}
call.perform();