>>> Join Us in the Fight Against Air Pollution

AirGradient Forum

Issue setting up AirGradient ONE Indoor Monitor Kit Version 9 with ESPhome

I tried to set up my AirGradient ONE v9 with ESPhome but couldn’t get any of the sensors to work. With the shipped firmware it worked with no issues. I’ve taken the pins from here https://www.airgradient.com/images/diy/schematics.png but I can’t get the GPIO addresses correct. I’m assuming the eps32.board value is correct based on this datasheet https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/hw-reference/esp32c3/user-guide-devkitm-1.html#id7 where ESP32-C3-MINI is mentioned. Did someone get this to work?

ESPhome config:

esphome:
  name: airgradient-one
  friendly_name: AirGradient ONE

esp32:
  board: esp32-c3-devkitm-1
  framework:
    type: arduino

logger:
  baud_rate: 0

api:
  encryption:
    key: !secret api_encryption_key

ota:
  password: !secret ota_password

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  domain: .iot

  ap:
    ssid: airgradient-84fce60259c0
    password: cleanair

captive_portal:

http_request:

web_server:
  port: 80
  enable_private_network_access: false
  include_internal: true
  ota: false

time:
  - platform: homeassistant

uart:
  - id: senseair_s8
    baud_rate: 9600
    rx_pin: GPIO2 # D4
    tx_pin: GPIO0 # D3
  - id: plantower_pms5003
    baud_rate: 9600
    rx_pin: GPIO12 # D6
    tx_pin: GPIO14 # D5

# Sensirion SGP41
# Sensirion SHT40
i2c:
  sda: GPIO4 # D2
  scl: GPIO5 # D1
  frequency: 100kHz

switch:
  - platform: safe_mode
    name: Flash Mode (Safe Mode)
    disabled_by_default: true

button:
  - platform: restart
    name: Restart
    disabled_by_default: true

sensor:
  - platform: wifi_signal
    name: "WiFi Signal dB"
    id: wifi_signal_db
    update_interval: 60s
    entity_category: "diagnostic"

  # SenseAir S8
  - platform: senseair
    uart_id: senseair_s8
    co2:
      name: "CO2 level"
    update_interval: 30s

  # Plantower PMS5003
  - platform: pmsx003
    uart_id: plantower_pms5003
    type: PMSX003
    pm_1_0:
      name: "Particulate Matter <1.0µm Concentration"
    pm_2_5:
      name: "Particulate Matter <2.5µm Concentration"
    pm_10_0:
      name: "Particulate Matter <10.0µm Concentration"
    update_interval: 180s

  # Sensirion SHT40
  - platform: sht4x
    temperature:
      name: "Temperature"
      id: sht4x_temperature
    humidity:
      name: "Humidity"
      id: sht4x_humidity
    update_interval: 30s

  # Sensirion SGP41
  - platform: sgp4x
    voc:
      name: "VOC Index"
    nox:
      name: "NOx Index"
    compensation:
      temperature_source: sht4x_temperature
      humidity_source: sht4x_humidity
    update_interval: 30s

I don’t have an AG One. But @MallocArray maintains ESPHome configurations for various AG variants such as the One. Maybe you can check out his configs here: GitHub - MallocArray/airgradient_esphome: ESPHome definition for an AirGradient DIY device to send data to HomeAssistant and AirGradient servers

1 Like

Specifically, this file has the pin outs that work

1 Like

@mascot1579 thanks for the link and @MallocArray for the repository. With this, I could get everything to work.