Issue with using bme680_bsec sensor with ESP32 C3

Hi everyone,

I’ve just set-up an ESP32 C3 super mini with 2 sensors, BME680 and SGP41. I am currently having issues deploying the configuration as I keep getting this error:

Failed config

sensor.bme680_bsec: [source /config/esphome/air-quality-kitchen.yaml:28]
  
  Component sensor.bme680_bsec requires component bme680_bsec.
  platform: bme680_bsec
  temperature: 
    name: BME680 Temperature
  pressure: 
    name: BME680 Pressure
  humidity: 
    name: BME680 Humidity
  iaq: 
    name: BME680 IAQ
    id: iaq
  co2_equivalent: 
    name: BME680 CO2 Equivalent
  breath_voc_equivalent: 
    name: BME680 Breath VOC Equivalent
text_sensor.bme680_bsec: [source /config/esphome/air-quality-kitchen.yaml:44]
  
  Component text_sensor.bme680_bsec requires component bme680_bsec.
  platform: bme680_bsec
  iaq_accuracy: 
    name: BME680 IAQ Accuracy

This is odd to me as from the reading I have done on this forum it indicated that the library for the bsec part should work and is supported. Thus I am not sure what I have done wrong.

This is my yaml configuration:

esphome:
  name: air-quality-kitchen
  friendly_name: Air_Quality_Kitchen

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


# Configuration entry for ESP32
i2c:
  sda: 8
  scl: 9
  scan: true

# Configuration for SGP41 TVOC Sensor
sensor:
  - platform: sgp4x
    voc:
      name: "Kitchen VOC Index"
      id: kitchen_voc
    nox:
      name: "Kitchen NOx Index"
      id: kitchen_NOx

# Configuration for bme680_bsec Sensor
  - platform: bme680_bsec
    temperature:
      name: "BME680 Temperature"
    pressure:
      name: "BME680 Pressure"
    humidity:
      name: "BME680 Humidity"
    iaq:
      name: "BME680 IAQ"
      id: iaq
    co2_equivalent:
      name: "BME680 CO2 Equivalent"
    breath_voc_equivalent:
      name: "BME680 Breath VOC Equivalent"

text_sensor:
  - platform: bme680_bsec
    iaq_accuracy:
      name: "BME680 IAQ Accuracy"

  - platform: template
    name: "BME680 IAQ Classification"
    icon: "mdi:checkbox-marked-circle-outline"
    lambda: |-
      if ( int(id(iaq).state) <= 50) {
        return {"Excellent"};
      }
      else if (int(id(iaq).state) >= 51 && int(id(iaq).state) <= 100) {
        return {"Good"};
      }
      else if (int(id(iaq).state) >= 101 && int(id(iaq).state) <= 150) {
        return {"Lightly polluted"};
      }
      else if (int(id(iaq).state) >= 151 && int(id(iaq).state) <= 200) {
        return {"Moderately polluted"};
      }
      else if (int(id(iaq).state) >= 201 && int(id(iaq).state) <= 250) {
        return {"Heavily polluted"};
      }
      else if (int(id(iaq).state) >= 251 && int(id(iaq).state) <= 350) {
        return {"Severely polluted"};
      }
      else if (int(id(iaq).state) >= 351) {
        return {"Extremely polluted"};
      }
      else {
        return {"error"};
      }

I would greatly appreciate any help.

You miss

bme680_bsec:

Odd after adding that just below the i2c config I got this:

Failed config

bme680_bsec: [source /config/esphome/air-quality-kitchen.yaml:18]
  
  This feature is only available on ['esp8266'].
  - {}

Is it really not compatible with esp32?

Likely with S-class ESP32, but maybe not C-class?
Try with

esp32:
  board: az-delivery-devkit-v4

and if it works, I guess you’ll have your answer.

EDIT: Apparently, neither C or S are supported. Only “plain” ESP32.

Oh bugger :frowning: I wish I knew that.

Where did you find that out from?

1 Like

Thank you :slight_smile: