KS0457 keyestudio CCS811 Carbon Dioxide Air Quality Sensor

i bought this module KS0457 keyestudio CCS811 Carbon Dioxide Air Quality Sensor - Keyestudio Wiki, but when i go to insert the code in esphome
i2c:
sda: D0
scl: D1

  • platform: ccs811
    eco2:
    name: “CCS811 eCO2 Value”
    tvoc:
    name: “CCS811 Total Volatile Organic Compound”
    address: 0x5A
    update_interval: 60s

log it is this :
[21:06:02][I][i2c.arduino:156]: Performing I2C bus recover
[21:06:02][E][i2c.arduino:172]: Recovery failed: SCL is held LOW on the I2C bus
[21:06:04][E][component:112]: Component ccs811.sensor was marked as failed.
and the ic2 bus is not detected.
wemos s1
KS0457_keyestudio_CCS811_Carbon_Dioxide_Air_Quality_Sensor.
i followed this guide
https://esphome.io/components/sensor/ccs811.html
but it doesn’t seem to work.
Input voltage is 5V.




If someone could help me.
thank you

i had bad experiences running the ccs811 on a wemos d1 because of the clock-stretching, i then moved to an esp32 and esphome.
but i think d0/d1 are a bad choice, try d1/d2 like described here WeMos Mini D1 - Default I2C & SPI pins

ok i try. or i try esp32

nothing
the error is on nodemcu
[17:26:56][I][i2c.arduino:156]: Performing I2C bus recovery
[17:26:56][E][i2c.arduino:172]: Recovery failed: SCL is held LOW on the I2C bus
[17:26:56][E][component:112]: Component ccs811.sensor was marked as failed.

esphome:
name: votair
substitutions:
hostname: ‘VOTAIR:’
esp8266:
board: nodemcuv2

Enable logging

logger:

Enable Home Assistant API

api:

ota:
password: “626e3ee26f586edd01aca7253ec33cfa”

wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password

Enable fallback hotspot (captive portal) in case wifi connection fails

ap:
ssid: “Votair Fallback Hotspot”
password: “KmqpoQJOWO6B”

captive_portal:

web_server:
port: 80

sensor:

  • platform: wifi_signal
    name: $hostname WiFi Signal
    id: rssi_value
    update_interval: 60s

  • platform: uptime
    name: $hostname Uptime
    id: uptime_s
    update_interval: 15s

  • platform: template
    name: $hostname WiFi
    lambda: |-
    return id(rssi_value).state * 2 + 200.0;
    icon: mdi:wifi
    unit_of_measurement: ‘%’
    update_interval: 60s

  • platform: ccs811
    eco2:
    name: “CCS811 eCO2 Value”
    tvoc:
    name: “CCS811 Total Volatile Organic Compound”
    address: 0x5A
    update_interval: 60s

switch:

  • platform: restart
    name: EspHome Node Restart
    binary_sensor:

  • platform: status
    name: $hostname Status
    text_sensor:

  • platform: wifi_info
    ssid:
    name: $hostname WiFi SSID
    ip_address:
    name: $hostname IP Address
    bssid:
    name: $hostname Connected BSSID
    mac_address:
    name: $hostname Mac Wifi Address
    scan_results:
    name: $hostname Latest Scan Results

  • platform: version
    name: $hostname ESPHome Version

  • platform: wifi_info

  • platform: template
    name: $hostname Uptime (formatted)
    lambda: |-
    uint32_t dur = id(uptime_s).state;
    int dys = 0;
    int hrs = 0;
    int mnts = 0;
    if (dur > 86399) {
    dys = trunc(dur / 86400);
    dur = dur - (dys * 86400);
    }
    if (dur > 3599) {
    hrs = trunc(dur / 3600);
    dur = dur - (hrs * 3600);
    }
    if (dur > 59) {
    mnts = trunc(dur / 60);
    dur = dur - (mnts * 60);
    }
    char buffer[17];
    sprintf(buffer, “%ud %02uh %02um %02us”, dys, hrs, mnts, dur);
    return {buffer};
    icon: mdi:clock-start
    update_interval: 15s

i2c:
sda: D1
scl: D2

this is yaml

could you send a scheme o this component and esp32 and yaml with photo?
Thank you

substitutions:
  devicename: combo
  deviceplatform: ESP32
  deviceboard: espea32

<<: !include common.yaml

i2c:
  sda: 21
  scl: 22


sensor:
  - platform: dht
    pin: 2
    model: DHT22
    temperature:
      name: "Temperature DHT"
      id: "temperature_dht"
      filters:
        - median
        - throttle: 60s
        - heartbeat: 60s
    humidity:
      name: "Humidity DHT"
      id: "humidity_dht"
      filters:
        - median
        - throttle: 60s
        - heartbeat: 60s
    update_interval: 60s
  - platform: ccs811
    eco2:
      name: "eCO2"
      filters:
        - median
        - throttle: 60s
        - heartbeat: 60s
    tvoc:
      name: "TVOC"
      filters:
        - median
        - throttle: 60s
        - heartbeat: 60s
    address: 0x5A
    update_interval: 60s
    baseline: 0x7CBE
    temperature: "temperature_dht"
    humidity: "humidity_dht"


do you have a photo with ccs811? i have a wemos esp32

the log is
[10:52:06][C][ccs811:151]: CCS811
[10:52:06][C][ccs811:152]: Address: 0x5A
[10:52:06][C][ccs811:153]: Update Interval: 60.0s
[10:52:06][C][ccs811:154]: CO2 Sensor ‘eCO2’
[10:52:06][C][ccs811:154]: Device Class: ‘carbon_dioxide’
[10:52:06][C][ccs811:154]: State Class: ‘measurement’
[10:52:06][C][ccs811:154]: Unit of Measurement: ‘ppm’
[10:52:06][C][ccs811:154]: Accuracy Decimals: 0
[10:52:06][C][ccs811:154]: Icon: ‘mdi:molecule-co2’
[10:52:06][C][ccs811:155]: TVOC Sensor ‘TVOC’
[10:52:06][C][ccs811:155]: Device Class: ‘volatile_organic_compounds’
[10:52:06][C][ccs811:155]: State Class: ‘measurement’
[10:52:06][C][ccs811:155]: Unit of Measurement: ‘ppb’
[10:52:06][C][ccs811:155]: Accuracy Decimals: 0
[10:52:06][C][ccs811:155]: Icon: ‘mdi:radiator’
[10:52:06][C][ccs811:160]: Baseline: NOT SET
[10:52:06][W][ccs811:165]: Communication failed! Is the sensor connected?
[10:52:06][C][captive_portal:144]: Captive Portal:
[10:52:06][C][ota:082]: Over-The-Air Updates:
[10:52:06][C][ota:083]: Address: votesp32.local:3232
[10:52:06][C][ota:086]: Using Password.
[10:52:06][C][api:134]: API Server:
[10:52:06][C][api:135]: Address: votesp32.local:6053
[10:52:06][C][api:139]: Using noise encryption: NO
[10:52:06][C][mdns:084]: mDNS:
[10:52:06][C][mdns:085]: Hostname: votesp32

esphome:
  name: votesp32

esp32:
  board: nodemcu-32s
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:
  password: "66cefde8fd367f82897835a868150afd"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Votesp32 Fallback Hotspot"
    password: "NoGblSXsoV4W"

captive_portal:
i2c:
  sda: 21
  scl: 22
  scan: true

sensor:
  - platform: ccs811
    eco2:
      name: "eCO2"
      filters:
        - median
        - throttle: 60s
        - heartbeat: 60s
    tvoc:
      name: "TVOC"
      filters:
        - median
        - throttle: 60s
        - heartbeat: 60s
    address: 0x5A
    update_interval: 60s
# Example configuration entry
esp32_ble_tracker:

switch:
  - platform: gpio
    pin: GPIO2
    id: led

script:
  - id: start_led
    then:
      - switch.turn_on: led
      - delay: 1min
      - switch.turn_off: led

exposure_notifications:
  on_exposure_notification:
    then:
      - lambda: |
          ESP_LOGD("main", "Got notification:");
          ESP_LOGD("main", "  RPI: %s", hexencode(x.rolling_proximity_identifier).c_str());
          ESP_LOGD("main", "  RSSI: %d", x.rssi);

      # Stop existing timer so that turn_off doesn't get called
      - script.stop: start_led
      - script.execute: start_led

voltage is 5v?