esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
290 stars 34 forks source link

Issue with ENS160+AHT21 device. #5451

Open onlize opened 7 months ago

onlize commented 7 months ago

The problem

I am trying to connect ENS160+AHT21 to WeMos D1 Mini (ESP8266). Here is the code that I use:

i2c:
  ## I²C Port - For Temp/Humidity/Pressure & CO²/VOC Sensors
  scl: D1
  sda: D2
  scan: true
  id: bus_a

sensor:
  - platform: aht10
    variant: AHT10
    temperature:
      name: "AHT10 ID Temperature Sensor"
      id: aht10_id_temperature_sensor
    humidity:
      name: "AHT10 Living Room Humidity"
      id: aht10_id_humidity_sensor
    update_interval: 60s
  - platform: ens160
    eco2:
      name: "ENS160 eCO2"
    tvoc:
      name: "ENS160 Total Volatile Organic Compounds"
    aqi:
      name: "ENS160 Air Quality Index"
      id: ens160_air_quality_index
    update_interval: 60s
    address: 0x53
    compensation:
      temperature: aht10_id_temperature_sensor
      humidity: aht10_id_humidity_sensor

I have this output: image

Why am I getting all those messages about AHT10 sensor and what should I do about this?

Which version of ESPHome has the issue?

2023.12.9

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

2024.1.5

What platform are you using?

ESP8266

Board

WeMos D1 Mini

Component causing the issue

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

imrj commented 7 months ago

I have same issue, identical code and either get zero readings (even after 1hr) or get a consistent value that doesnt change however the same sensor works perfectly fine when using Arduino....so this sort of narrows it down to an issue in ESPhome

dlgoodr commented 5 months ago

I have an AHT21 that stopped working when upgrading to latest. Pinning the component to an older version "fixed" it for me, try this?

external_components:
  - source: github://esphome/esphome@2023.12.9
    components: [ aht10 ]
dlgoodr commented 5 months ago

Also, @onlize, you need to set your variant to AHT20 if you're using an aht21 chip.

dlgoodr commented 5 months ago

This does seem to be fixed in 2024.3.1

codesalatdev commented 5 months ago

I am not able to test with 2024.3.1, but reverting to the older version of the component fixed it for me.