Issue with ENS160+AHT21 - ENS160 readings unavailable

Hi,
I am trying to add an ENS160+AHT21 sensor to my climate control module to check CO2 Level in Chicken Broiler.
Every few hours the ENS160 stops reading values and output is always “0”

I am using a NodeMCU-32S DevKit v4 and the code is:

#---------------------------------------------------------------------#
#                           Main Configuration                        #
#---------------------------------------------------------------------#

esphome:
  name: climate-control-w
  friendly_name: Climate Control W

esp32:
  board: esp32dev
  framework:
    type: arduino

# esp8266:
#   board: nodemcuv2
#   framework:
#     version: recommended

web_server:
  local: True
  port: 80

# ESPHome mDNS cannot resolve IP since it's done by HAOS in docker
mdns:
  disabled: True

# Enable logging
logger:
  level: verbose
  # logs:
  #   component: ERROR



#---------------------------------------------------------------------#
#                      API && Network Configuration                   #
#---------------------------------------------------------------------#

# Enable Home Assistant API
api:
  encryption:
    key: "drNXf5SuO31xoiLl0FkyF9SFogXx2juAF0tXcr9qYHs="

ota:
  password: "9454b017f8677b2a8e3519dbed777b3d"

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

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Climate-Control-W"
    password: "12345600"
  
  manual_ip:
    static_ip: 192.168.30.20
    gateway: 192.168.30.1
    subnet: 255.255.255.0
    dns1: 192.168.30.1

captive_portal: 



#---------------------------------------------------------------------#
#                 COMMUNICATION Protocols Configuration               #
#---------------------------------------------------------------------#

i2c:
  sda: 21
  scl: 22
  scan: true
  id: bus_a
  # frequency: 100kHz



#---------------------------------------------------------------------#
#                    BINARY SENSORS  -  Input Pins                    #
#---------------------------------------------------------------------#

binary_sensor:

  # Check For Node Status
  - platform: status
    name: "Status"



#---------------------------------------------------------------------#
#                    SENSORS  -  Environmental System                 #
#---------------------------------------------------------------------#

bme680_bsec:
  - id: cc_bme680
    i2c_id: bus_a
    address: 0x77
    state_save_interval: 1h

sensor:

  # SHT41 - Temp && Humidity
  - platform: sht4x
    id: id_sht41
    i2c_id: bus_a
    address: 0x44
    temperature:
        name: "SHT41 Temperature"
        id: id_sht41_temp
        accuracy_decimals: 2
    humidity:
        name: "SHT41 Humidity"
        id: id_sht41_hum
        accuracy_decimals: 2
    precision: High
    update_interval: 2s

  # SGP41 - VOC && NOx
  - platform: sgp4x
    id: id_sgp41
    i2c_id: bus_a
    address: 0x59
    voc:
      name: "SGP41 VOC Index"
      algorithm_tuning:
        learning_time_offset_hours: 2
        learning_time_gain_hours: 2
    nox:
      name: "SGP41 NOx Index"
      algorithm_tuning:
        learning_time_offset_hours: 2
        learning_time_gain_hours: 2
    compensation:
        temperature_source: id_sht41_temp
        humidity_source: id_sht41_hum
    update_interval: 5s

  # BME680
  - platform: bme680_bsec
    pressure:
      name: "BME680 Pressure"
      id: id_bme680_pressure

  # MiCS 4514
  - platform: mics_4514
    id: id_mics4514
    i2c_id: bus_a
    address: 0x75
    carbon_monoxide:
      name: MiCS Carbon Monoxide
    ammonia:
      name: MiCS Ammonia
    update_interval: 5s

  # SCD41
  - platform: scd4x
    id: id_scd4x
    i2c_id: bus_a
    address: 0x62
    co2:
      name: "SCD41 CO2"
      id: id_scd41_co2
    automatic_self_calibration: True
    ambient_pressure_compensation_source: id_bme680_pressure
    update_interval: 5s

  # ENS160
  - platform: ens160
    id: ens160_sensor
    i2c_id: bus_a
    address: 0x53
    eco2:
      name: "ENS160 eCO2"
      id: id_ens160_eco2
    tvoc:
      name: "ENS160 TVOC"
      id: id_ens160_tvoc
    aqi:
      name: "ENS160 AQI"
      id: id_ens160_aqi
    compensation:
      temperature: id_sht41_temp
      humidity: id_sht41_hum
    update_interval: 5s

  # Node Internal Temperature
  - platform: internal_temperature
    name: "Internal Temp"

  # Reports the WiFi signal strength/RSSI in dB
  - platform: wifi_signal
    name: "WiFi Signal dB"
    id: id_cc_wifi_signal_db
    update_interval: 60s
    entity_category: "diagnostic"

  # Reports Module Uptime
  - platform: uptime
    name: "Uptime Sensor"



#---------------------------------------------------------------------#
#                     BUTTONS  -  Core Configuration                  #
#---------------------------------------------------------------------#

button:

  # Restarts MCU
  - platform: restart
    name: Restart

as for ESPHome logs

INFO ESPHome 2023.12.5
INFO Reading configuration /config/climate-control-w.yaml...
INFO Starting log output from 192.168.30.20 using esphome API
INFO Successfully connected to climate-control-w @ 192.168.30.20 in 0.150s
INFO Successful handshake with climate-control-w @ 192.168.30.20 in 0.102s
[10:18:48][I][app:102]: ESPHome version 2023.12.5 compiled on Feb 10 2024, 03:40:09
[10:18:48][C][wifi:573]: WiFi:
[10:18:48][C][wifi:405]:   Local MAC: 40:22:D8:78:87:44
[10:18:48][C][wifi:410]:   SSID: '_KLEIN_Technologies_'[redacted]
[10:18:48][C][wifi:411]:   IP Address: 192.168.30.20
[10:18:48][C][wifi:413]:   BSSID: 6E:3B:6B:30:C3:C4[redacted]
[10:18:48][C][wifi:414]:   Hostname: 'climate-control-w'
[10:18:48][C][wifi:416]:   Signal strength: -20 dB ▂▄▆█
[10:18:48][V][wifi:418]:   Priority: 0.0
[10:18:48][C][wifi:420]:   Channel: 11
[10:18:48][C][wifi:421]:   Subnet: 255.255.255.0
[10:18:48][C][wifi:422]:   Gateway: 192.168.30.1
[10:18:48][C][wifi:423]:   DNS1: 192.168.30.1
[10:18:48][C][wifi:424]:   DNS2: 0.0.0.0
[10:18:48][C][logger:443]: Logger:
[10:18:48][C][logger:444]:   Level: VERBOSE
[10:18:48][C][logger:445]:   Log Baud Rate: 115200
[10:18:48][C][logger:447]:   Hardware UART: UART0
[10:18:48][C][i2c.arduino:053]: I2C Bus:
[10:18:48][C][i2c.arduino:054]:   SDA Pin: GPIO21
[10:18:48][C][i2c.arduino:055]:   SCL Pin: GPIO22
[10:18:48][C][i2c.arduino:056]:   Frequency: 50000 Hz
[10:18:48][C][i2c.arduino:059]:   Recovery: bus successfully recovered
[10:18:48][I][i2c.arduino:069]: Results from i2c bus scan:
[10:18:48][I][i2c.arduino:075]: Found i2c device at address 0x38
[10:18:48][I][i2c.arduino:075]: Found i2c device at address 0x44
[10:18:48][I][i2c.arduino:075]: Found i2c device at address 0x53
[10:18:48][I][i2c.arduino:075]: Found i2c device at address 0x59
[10:18:48][I][i2c.arduino:075]: Found i2c device at address 0x62
[10:18:48][I][i2c.arduino:075]: Found i2c device at address 0x75
[10:18:48][I][i2c.arduino:075]: Found i2c device at address 0x77
[10:18:48][D][scd4x:269]: ambient pressure compensation skipped - no change required
[10:18:48][V][sensor:043]: 'SCD41 CO2': Received new state 751.000000
[10:18:48][D][sensor:094]: 'SCD41 CO2': Sending state 751.00000 ppm with 0 decimals of accuracy
[10:18:48][V][json:038]: Attempting to allocate 512 bytes for JSON serialization
[10:18:48][V][json:058]: Size after shrink 76 bytes
[10:18:48][C][uptime.sensor:031]: Uptime Sensor 'Uptime Sensor'
[10:18:48][C][uptime.sensor:031]:   Device Class: 'duration'
[10:18:48][C][uptime.sensor:031]:   State Class: 'total_increasing'
[10:18:48][C][uptime.sensor:031]:   Unit of Measurement: 's'
[10:18:48][C][uptime.sensor:031]:   Accuracy Decimals: 0
[10:18:48][C][uptime.sensor:031]:   Icon: 'mdi:timer-outline'
[10:18:48][V][uptime.sensor:031]:   Unique ID: '4022d8788744-uptime'
[10:18:48][C][status:034]: Status Binary Sensor 'Status'
[10:18:48][C][status:034]:   Device Class: 'connectivity'
[10:18:48][C][bme680_bsec.sensor:132]: cc_bme680 via BSEC:
[10:18:48][C][bme680_bsec.sensor:137]:   BSEC Version: 1.4.8.0
[10:18:48][C][bme680_bsec.sensor:139]:   Address: 0x77
[10:18:48][C][bme680_bsec.sensor:146]:   Temperature Offset: 0.00
[10:18:48][C][bme680_bsec.sensor:147]:   IAQ Mode: Static
[10:18:48][C][bme680_bsec.sensor:148]:   Sample Rate: LP
[10:18:48][C][bme680_bsec.sensor:149]:   State Save Interval: 3600000ms
[10:18:48][C][bme680_bsec.sensor:152]:     Sample Rate: Default
[10:18:48][C][bme680_bsec.sensor:153]:   Pressure 'BME680 Pressure'
[10:18:48][C][bme680_bsec.sensor:153]:     Device Class: 'atmospheric_pressure'
[10:18:48][C][bme680_bsec.sensor:153]:     State Class: 'measurement'
[10:18:48][C][bme680_bsec.sensor:153]:     Unit of Measurement: 'hPa'
[10:18:48][C][bme680_bsec.sensor:153]:     Accuracy Decimals: 1
[10:18:48][C][bme680_bsec.sensor:154]:     Sample Rate: Default
[10:18:48][C][bme680_bsec.sensor:156]:     Sample Rate: Default
[10:18:48][V][ens160:157]: Status: ENS160 STATAS bit    0x0
[10:18:48][V][ens160:159]: Status: ENS160 STATER bit    0x0
[10:18:48][V][ens160:160]: Status: ENS160 VALIDITY FLAG 0x00
[10:18:48][V][ens160:162]: Status: ENS160 NEWDAT bit    0x0
[10:18:48][V][ens160:164]: Status: ENS160 NEWGPR bit    0x1
[10:18:48][D][ens160:172]: ENS160 readings unavailable - Normal Operation but readings not ready
[10:18:48][C][sht4x:050]:   Address: 0x44
[10:18:48][C][sgp4x:305]: SGP4x:
[10:18:48][C][sgp4x:306]:   Address: 0x59
[10:18:48][C][sgp4x:307]:   store_baseline: 1
[10:18:48][C][sgp4x:326]:   Type: SGP41
[10:18:48][C][sgp4x:327]:   Serial number: 64557337
[10:18:48][C][sgp4x:328]:   Minimum Samples: 45.000000
[10:18:48][C][sgp4x:330]:   Update Interval: 5.0s
[10:18:48][C][sgp4x:333]:   Compensation:
[10:18:48][C][sgp4x:334]:     Temperature Source: 'SHT41 Temperature'
[10:18:48][C][sgp4x:334]:       Device Class: 'temperature'
[10:18:48][C][sgp4x:334]:       State Class: 'measurement'
[10:18:48][C][sgp4x:334]:       Unit of Measurement: '°C'
[10:18:48][C][sgp4x:334]:       Accuracy Decimals: 2
[10:18:48][C][sgp4x:334]:       Icon: 'mdi:thermometer'
[10:18:48][C][sgp4x:335]:     Humidity Source: 'SHT41 Humidity'
[10:18:48][C][sgp4x:335]:       Device Class: 'humidity'
[10:18:48][C][sgp4x:335]:       State Class: 'measurement'
[10:18:48][C][sgp4x:335]:       Unit of Measurement: '%'
[10:18:48][C][sgp4x:335]:       Accuracy Decimals: 2
[10:18:48][C][sgp4x:335]:       Icon: 'mdi:water-percent'
[10:18:48][C][sgp4x:339]:   VOC 'SGP41 VOC Index'
[10:18:48][C][sgp4x:339]:     Device Class: 'aqi'
[10:18:48][C][sgp4x:339]:     State Class: 'measurement'
[10:18:48][C][sgp4x:339]:     Unit of Measurement: ''
[10:18:48][C][sgp4x:339]:     Accuracy Decimals: 0
[10:18:48][C][sgp4x:339]:     Icon: 'mdi:radiator'
[10:18:48][C][sgp4x:340]:   NOx 'SGP41 NOx Index'
[10:18:48][C][sgp4x:340]:     Device Class: 'aqi'
[10:18:48][C][sgp4x:340]:     State Class: 'measurement'
[10:18:48][C][sgp4x:340]:     Unit of Measurement: ''
[10:18:48][C][sgp4x:340]:     Accuracy Decimals: 0
[10:18:48][C][sgp4x:340]:     Icon: 'mdi:radiator'
[10:18:48][V][sgp4x:169]: VOC = 273, NOx = 1
[10:18:48][W][component:214]: Component sgp4x.sensor took a long time for an operation (0.06 s).
[10:18:48][W][component:215]: Components should block for at most 20-30ms.
[10:18:48][C][mics_4514:035]: MICS 4514:
[10:18:48][C][mics_4514:036]:   Address: 0x75
[10:18:48][C][mics_4514:037]:   Update Interval: 5.0s
[10:18:49][C][mics_4514:039]:   Carbon Monoxide 'MiCS Carbon Monoxide'
[10:18:49][C][mics_4514:039]:     State Class: 'measurement'
[10:18:49][C][mics_4514:039]:     Unit of Measurement: 'ppm'
[10:18:49][C][mics_4514:039]:     Accuracy Decimals: 2
[10:18:49][C][mics_4514:043]:   Ammonia 'MiCS Ammonia'
[10:18:49][C][mics_4514:043]:     State Class: 'measurement'
[10:18:49][C][mics_4514:043]:     Unit of Measurement: 'ppm'
[10:18:49][C][mics_4514:043]:     Accuracy Decimals: 2
[10:18:49][C][scd4x:094]: scd4x:
[10:18:49][C][scd4x:095]:   Address: 0x62
[10:18:49][C][scd4x:112]:   Automatic self calibration: ON
[10:18:49][C][scd4x:115]:   Dynamic ambient pressure compensation using sensor 'BME680 Pressure'
[10:18:49][C][scd4x:127]:   Measurement mode: periodic (5s)
[10:18:49][C][scd4x:139]:   Temperature offset: 4.00 °C
[10:18:49][C][scd4x:140]:   Update Interval: 5.0s
[10:18:49][C][scd4x:141]:   CO2 'SCD41 CO2'
[10:18:49][C][scd4x:141]:     Device Class: 'carbon_dioxide'
[10:18:49][C][scd4x:141]:     State Class: 'measurement'
[10:18:49][C][scd4x:141]:     Unit of Measurement: 'ppm'
[10:18:49][C][scd4x:141]:     Accuracy Decimals: 0
[10:18:49][C][scd4x:141]:     Icon: 'mdi:molecule-co2'
[10:18:49][C][ens160:278]: ENS160:
[10:18:49][D][ens160:300]: Setup successful
[10:18:49][I][ens160:304]: Firmware Version: 5.4.6
[10:18:49][C][ens160:306]:   Address: 0x53
[10:18:49][C][ens160:307]:   Update Interval: 5.0s
[10:18:49][C][ens160:308]:   CO2 Sensor: 'ENS160 eCO2'
[10:18:49][C][ens160:308]:     Device Class: 'carbon_dioxide'
[10:18:49][C][ens160:308]:     State Class: 'measurement'
[10:18:49][C][ens160:308]:     Unit of Measurement: 'ppm'
[10:18:49][C][ens160:308]:     Accuracy Decimals: 0
[10:18:49][C][ens160:308]:     Icon: 'mdi:molecule-co2'
[10:18:49][C][ens160:309]:   TVOC Sensor: 'ENS160 TVOC'
[10:18:49][C][ens160:309]:     Device Class: 'volatile_organic_compounds_parts'
[10:18:49][C][ens160:309]:     State Class: 'measurement'
[10:18:49][C][ens160:309]:     Unit of Measurement: 'ppb'
[10:18:49][C][ens160:309]:     Accuracy Decimals: 0
[10:18:49][C][ens160:309]:     Icon: 'mdi:radiator'
[10:18:49][C][ens160:310]:   AQI Sensor: 'ENS160 AQI'
[10:18:49][C][ens160:310]:     Device Class: 'aqi'
[10:18:49][C][ens160:310]:     State Class: 'measurement'
[10:18:49][C][ens160:310]:     Unit of Measurement: ''
[10:18:49][C][ens160:310]:     Accuracy Decimals: 0
[10:18:49][C][ens160:310]:     Icon: 'mdi:chemical-weapon'
[10:18:49][C][ens160:313]:     Temperature Compensation: 'SHT41 Temperature'
[10:18:49][C][ens160:313]:     Device Class: 'temperature'
[10:18:49][C][ens160:313]:     State Class: 'measurement'
[10:18:49][C][ens160:313]:     Unit of Measurement: '°C'
[10:18:49][C][ens160:313]:     Accuracy Decimals: 2
[10:18:49][C][ens160:313]:     Icon: 'mdi:thermometer'
[10:18:49][C][ens160:314]:     Humidity Compensation: 'SHT41 Humidity'
[10:18:49][C][ens160:314]:     Device Class: 'humidity'
[10:18:49][C][ens160:314]:     State Class: 'measurement'
[10:18:49][C][ens160:314]:     Unit of Measurement: '%'
[10:18:49][C][ens160:314]:     Accuracy Decimals: 2
[10:18:49][C][ens160:314]:     Icon: 'mdi:water-percent'
[10:18:49][V][sensor:043]: 'SHT41 Temperature': Received new state 22.580681
[10:18:49][D][sensor:094]: 'SHT41 Temperature': Sending state 22.58068 °C with 2 decimals of accuracy
[10:18:49][V][json:038]: Attempting to allocate 512 bytes for JSON serialization
[10:18:49][V][json:058]: Size after shrink 84 bytes
[10:18:49][V][sensor:043]: 'SHT41 Humidity': Received new state 54.580223
[10:18:49][D][sensor:094]: 'SHT41 Humidity': Sending state 54.58022 % with 2 decimals of accuracy
[10:18:49][V][json:038]: Attempting to allocate 512 bytes for JSON serialization
[10:18:49][V][json:058]: Size after shrink 80 bytes
[10:18:49][W][component:214]: Component sht4x.sensor took a long time for an operation (0.06 s).
[10:18:49][W][component:215]: Components should block for at most 20-30ms.
[10:18:49][C][internal_temperature:059]: Internal Temperature Sensor 'Internal Temp'
[10:18:49][C][internal_temperature:059]:   Device Class: 'temperature'
[10:18:49][C][internal_temperature:059]:   State Class: 'measurement'
[10:18:49][C][internal_temperature:059]:   Unit of Measurement: '°C'
[10:18:49][C][internal_temperature:059]:   Accuracy Decimals: 1
[10:18:49][C][restart.button:017]: Restart Button 'Restart'
[10:18:49][C][captive_portal:088]: Captive Portal:
[10:18:49][C][web_server:168]: Web Server:
[10:18:49][C][web_server:169]:   Address: 192.168.30.20:80
[10:18:49][C][ota:097]: Over-The-Air Updates:
[10:18:49][C][ota:098]:   Address: 192.168.30.20:3232
[10:18:49][C][ota:101]:   Using Password.
[10:18:49][C][api:139]: API Server:
[10:18:49][C][api:140]:   Address: 192.168.30.20:6053
[10:18:49][C][api:142]:   Using noise encryption: YES
[10:18:49][C][wifi_signal.sensor:009]: WiFi Signal 'WiFi Signal dB'
[10:18:49][C][wifi_signal.sensor:009]:   Device Class: 'signal_strength'
[10:18:49][C][wifi_signal.sensor:009]:   State Class: 'measurement'
[10:18:49][C][wifi_signal.sensor:009]:   Unit of Measurement: 'dBm'
[10:18:49][C][wifi_signal.sensor:009]:   Accuracy Decimals: 0
[10:18:49][V][wifi_signal.sensor:009]:   Unique ID: '4022d8788744-wifisignal'
[10:18:49][V][sgp4x:169]: VOC = 274, NOx = 1
[10:18:49][W][component:214]: Component sgp4x.sensor took a long time for an operation (0.07 s).
[10:18:49][W][component:215]: Components should block for at most 20-30ms.
[10:18:49][V][mics_4514:056]: Got data: 00 3B 01 76 03 62
[10:18:49][V][sensor:043]: 'MiCS Carbon Monoxide': Received new state 0.000000
[10:18:49][D][sensor:094]: 'MiCS Carbon Monoxide': Sending state 0.00000 ppm with 2 decimals of accuracy
[10:18:49][V][json:038]: Attempting to allocate 512 bytes for JSON serialization
[10:18:49][V][json:058]: Size after shrink 88 bytes
[10:18:49][V][sensor:043]: 'MiCS Ammonia': Received new state 0.000000
[10:18:49][D][sensor:094]: 'MiCS Ammonia': Sending state 0.00000 ppm with 2 decimals of accuracy
[10:18:49][V][json:038]: Attempting to allocate 512 bytes for JSON serialization
[10:18:49][V][json:058]: Size after shrink 80 bytes
[10:18:49][W][component:214]: Component mics_4514.sensor took a long time for an operation (0.07 s).
[10:18:49][W][component:215]: Components should block for at most 20-30ms.
[10:18:49][V][bme680_bsec.sensor:196]: cc_bme680: Performing sensor run
[10:18:49][V][bme680_bsec.sensor:244]: Queueing read in 41ms
[10:18:50][V][bme680_bsec.sensor:253]: cc_bme680: Reading data
[10:18:50][V][bme680_bsec.sensor:348]: cc_bme680: after bsec_do_steps: num_inputs=1 num_outputs=1
[10:18:50][V][bme680_bsec.sensor:363]: cc_bme680: Queuing sensor state publish actions
[10:18:50][V][sensor:043]: 'BME680 Pressure': Received new state 1007.650024
[10:18:50][D][sensor:094]: 'BME680 Pressure': Sending state 1007.65002 hPa with 1 decimals of accuracy
[10:18:50][V][json:038]: Attempting to allocate 512 bytes for JSON serialization
[10:18:50][V][json:058]: Size after shrink 84 bytes
[10:18:50][V][sgp4x:169]: VOC = 275, NOx = 1
[10:18:50][W][component:214]: Component sgp4x.sensor took a long time for an operation (0.07 s).
[10:18:50][W][component:215]: Components should block for at most 20-30ms.
[10:18:51][V][sensor:043]: 'SHT41 Temperature': Received new state 22.583351
[10:18:51][D][sensor:094]: 'SHT41 Temperature': Sending state 22.58335 °C with 2 decimals of accuracy
[10:18:51][V][json:038]: Attempting to allocate 512 bytes for JSON serialization
[10:18:51][V][json:058]: Size after shrink 84 bytes
[10:18:51][V][sensor:043]: 'SHT41 Humidity': Received new state 54.566872
[10:18:51][D][sensor:094]: 'SHT41 Humidity': Sending state 54.56687 % with 2 decimals of accuracy
[10:18:51][V][json:038]: Attempting to allocate 512 bytes for JSON serialization
[10:18:51][V][json:058]: Size after shrink 80 bytes
[10:18:51][W][component:214]: Component sht4x.sensor took a long time for an operation (0.06 s).
[10:18:51][W][component:215]: Components should block for at most 20-30ms.
[10:18:51][V][sgp4x:169]: VOC = 276, NOx = 1
[10:18:51][W][component:214]: Component sgp4x.sensor took a long time for an operation (0.07 s).
[10:18:51][W][component:215]: Components should block for at most 20-30ms.
[10:18:52][V][sgp4x:169]: VOC = 276, NOx = 1
[10:18:52][W][component:214]: Component sgp4x.sensor took a long time for an operation (0.07 s).
[10:18:52][W][component:215]: Components should block for at most 20-30ms.
[10:18:52][V][sensor:043]: 'SGP41 VOC Index': Received new state 276.000000
[10:18:52][D][sensor:094]: 'SGP41 VOC Index': Sending state 276.00000  with 0 decimals of accuracy
[10:18:52][V][json:038]: Attempting to allocate 512 bytes for JSON serialization
[10:18:52][V][json:058]: Size after shrink 76 bytes
[10:18:52][V][sensor:043]: 'SGP41 NOx Index': Received new state 1.000000
[10:18:52][D][sensor:094]: 'SGP41 NOx Index': Sending state 1.00000  with 0 decimals of accuracy
[10:18:52][V][json:038]: Attempting to allocate 512 bytes for JSON serialization
[10:18:52][V][json:058]: Size after shrink 76 bytes
[10:18:52][W][component:214]: Component sgp4x.sensor took a long time for an operation (0.05 s).
[10:18:52][W][component:215]: Components should block for at most 20-30ms.
[10:18:52][V][bme680_bsec.sensor:196]: cc_bme680: Performing sensor run
[10:18:52][V][bme680_bsec.sensor:244]: Queueing read in 41ms
[10:18:53][V][bme680_bsec.sensor:253]: cc_bme680: Reading data
[10:18:53][V][bme680_bsec.sensor:348]: cc_bme680: after bsec_do_steps: num_inputs=1 num_outputs=1
[10:18:53][V][bme680_bsec.sensor:363]: cc_bme680: Queuing sensor state publish actions
[10:18:53][V][sensor:043]: 'BME680 Pressure': Received new state 1007.669983
[10:18:53][D][sensor:094]: 'BME680 Pressure': Sending state 1007.66998 hPa with 1 decimals of accuracy
[10:18:53][V][json:038]: Attempting to allocate 512 bytes for JSON serialization
[10:18:53][V][json:058]: Size after shrink 84 bytes
[10:18:53][V][sensor:043]: 'SHT41 Temperature': Received new state 22.580681
[10:18:53][D][sensor:094]: 'SHT41 Temperature': Sending state 22.58068 °C with 2 decimals of accuracy
[10:18:53][V][json:038]: Attempting to allocate 512 bytes for JSON serialization
[10:18:53][V][json:058]: Size after shrink 84 bytes
[10:18:53][V][sensor:043]: 'SHT41 Humidity': Received new state 54.616463
[10:18:53][D][sensor:094]: 'SHT41 Humidity': Sending state 54.61646 % with 2 decimals of accuracy
[10:18:53][V][json:038]: Attempting to allocate 512 bytes for JSON serialization
[10:18:53][V][json:058]: Size after shrink 80 bytes
[10:18:53][W][component:214]: Component sht4x.sensor took a long time for an operation (0.06 s).
[10:18:53][W][component:215]: Components should block for at most 20-30ms.
[10:18:53][D][scd4x:269]: ambient pressure compensation skipped - no change required
[10:18:53][V][sensor:043]: 'SCD41 CO2': Received new state 752.000000
[10:18:53][D][sensor:094]: 'SCD41 CO2': Sending state 752.00000 ppm with 0 decimals of accuracy
[10:18:53][V][json:038]: Attempting to allocate 512 bytes for JSON serialization
[10:18:53][V][json:058]: Size after shrink 76 bytes
[10:18:53][V][ens160:157]: Status: ENS160 STATAS bit    0x0
[10:18:53][V][ens160:159]: Status: ENS160 STATER bit    0x0
[10:18:53][V][ens160:160]: Status: ENS160 VALIDITY FLAG 0x00
[10:18:53][V][ens160:162]: Status: ENS160 NEWDAT bit    0x0
[10:18:53][V][ens160:164]: Status: ENS160 NEWGPR bit    0x1
[10:18:53][D][ens160:172]: ENS160 readings unavailable - Normal Operation but readings not ready
[10:18:53][V][sgp4x:169]: VOC = 277, NOx = 1
[10:18:53][W][component:214]: Component sgp4x.sensor took a long time for an operation (0.07 s).
[10:18:53][W][component:215]: Components should block for at most 20-30ms.
[10:18:54][V][sgp4x:169]: VOC = 278, NOx = 1
[10:18:54][W][component:214]: Component sgp4x.sensor took a long time for an operation (0.07 s).
[10:18:54][W][component:215]: Components should block for at most 20-30ms.
[10:18:54][V][mics_4514:056]: Got data: 00 3B 01 7B 03 63
[10:18:54][V][sensor:043]: 'MiCS Carbon Monoxide': Received new state 0.000000
[10:18:54][D][sensor:094]: 'MiCS Carbon Monoxide': Sending state 0.00000 ppm with 2 decimals of accuracy
[10:18:54][V][json:038]: Attempting to allocate 512 bytes for JSON serialization
[10:18:54][V][json:058]: Size after shrink 88 bytes
[10:18:54][V][sensor:043]: 'MiCS Ammonia': Received new state 0.000000
[10:18:54][D][sensor:094]: 'MiCS Ammonia': Sending state 0.00000 ppm with 2 decimals of accuracy
[10:18:54][V][json:038]: Attempting to allocate 512 bytes for JSON serialization
[10:18:54][V][json:058]: Size after shrink 80 bytes
[10:18:54][W][component:214]: Component mics_4514.sensor took a long time for an operation (0.06 s).
[10:18:54][W][component:215]: Components should block for at most 20-30ms.
[10:18:55][V][sensor:043]: 'SHT41 Temperature': Received new state 22.580681
[10:18:55][D][sensor:094]: 'SHT41 Temperature': Sending state 22.58068 °C with 2 decimals of accuracy
[10:18:55][V][json:038]: Attempting to allocate 512 bytes for JSON serialization
[10:18:55][V][json:058]: Size after shrink 84 bytes
[10:18:55][V][sensor:043]: 'SHT41 Humidity': Received new state 54.601204
[10:18:55][D][sensor:094]: 'SHT41 Humidity': Sending state 54.60120 % with 2 decimals of accuracy
[10:18:55][V][json:038]: Attempting to allocate 512 bytes for JSON serialization
[10:18:55][V][json:058]: Size after shrink 80 bytes
[10:18:55][W][component:214]: Component sht4x.sensor took a long time for an operation (0.06 s).
[10:18:55][W][component:215]: Components should block for at most 20-30ms.
[10:18:55][V][sgp4x:169]: VOC = 279, NOx = 1
[10:18:55][W][component:214]: Component sgp4x.sensor took a long time for an operation (0.07 s).
[10:18:55][W][component:215]: Components should block for at most 20-30ms.
[10:18:55][V][bme680_bsec.sensor:196]: cc_bme680: Performing sensor run
[10:18:56][V][bme680_bsec.sensor:244]: Queueing read in 41ms
[10:18:56][V][bme680_bsec.sensor:253]: cc_bme680: Reading data
[10:18:56][V][bme680_bsec.sensor:348]: cc_bme680: after bsec_do_steps: num_inputs=1 num_outputs=1
[10:18:56][V][bme680_bsec.sensor:363]: cc_bme680: Queuing sensor state publish actions
[10:18:56][V][sensor:043]: 'BME680 Pressure': Received new state 1007.650024
[10:18:56][D][sensor:094]: 'BME680 Pressure': Sending state 1007.65002 hPa with 1 decimals of accuracy
[10:18:56][V][json:038]: Attempting to allocate 512 bytes for JSON serialization
[10:18:56][V][json:058]: Size after shrink 84 bytes
[10:18:56][V][sgp4x:169]: VOC = 280, NOx = 1
[10:18:56][W][component:214]: Component sgp4x.sensor took a long time for an operation (0.07 s).
[10:18:56][W][component:215]: Components should block for at most 20-30ms.
[10:18:57][V][sensor:043]: 'SHT41 Temperature': Received new state 22.580681
[10:18:57][D][sensor:094]: 'SHT41 Temperature': Sending state 22.58068 °C with 2 decimals of accuracy
[10:18:57][V][json:038]: Attempting to allocate 512 bytes for JSON serialization
[10:18:57][V][json:058]: Size after shrink 84 bytes
[10:18:57][V][sensor:043]: 'SHT41 Humidity': Received new state 54.660336
[10:18:57][D][sensor:094]: 'SHT41 Humidity': Sending state 54.66034 % with 2 decimals of accuracy
[10:18:57][V][json:038]: Attempting to allocate 512 bytes for JSON serialization
[10:18:57][V][json:058]: Size after shrink 80 bytes
[10:18:57][W][component:214]: Component sht4x.sensor took a long time for an operation (0.06 s).
[10:18:57][W][component:215]: Components should block for at most 20-30ms.
[10:18:57][V][sgp4x:169]: VOC = 281, NOx = 1
[10:18:57][W][component:214]: Component sgp4x.sensor took a long time for an operation (0.07 s).
[10:18:57][W][component:215]: Components should block for at most 20-30ms.
[10:18:57][V][sensor:043]: 'SGP41 VOC Index': Received new state 281.000000
[10:18:57][D][sensor:094]: 'SGP41 VOC Index': Sending state 281.00000  with 0 decimals of accuracy
[10:18:57][V][json:038]: Attempting to allocate 512 bytes for JSON serialization
[10:18:57][V][json:058]: Size after shrink 76 bytes
[10:18:57][V][sensor:043]: 'SGP41 NOx Index': Received new state 1.000000
[10:18:57][D][sensor:094]: 'SGP41 NOx Index': Sending state 1.00000  with 0 decimals of accuracy
[10:18:57][V][json:038]: Attempting to allocate 512 bytes for JSON serialization
[10:18:57][V][json:058]: Size after shrink 76 bytes
[10:18:57][W][component:214]: Component sgp4x.sensor took a long time for an operation (0.06 s).
[10:18:57][W][component:215]: Components should block for at most 20-30ms.
[10:18:58][D][scd4x:269]: ambient pressure compensation skipped - no change required
[10:18:58][V][sensor:043]: 'SCD41 CO2': Received new state 750.000000
[10:18:58][D][sensor:094]: 'SCD41 CO2': Sending state 750.00000 ppm with 0 decimals of accuracy
[10:18:58][V][json:038]: Attempting to allocate 512 bytes for JSON serialization
[10:18:58][V][json:058]: Size after shrink 76 bytes
[10:18:58][V][ens160:157]: Status: ENS160 STATAS bit    0x0
[10:18:58][V][ens160:159]: Status: ENS160 STATER bit    0x0
[10:18:58][V][ens160:160]: Status: ENS160 VALIDITY FLAG 0x00
[10:18:58][V][ens160:162]: Status: ENS160 NEWDAT bit    0x0
[10:18:58][V][ens160:164]: Status: ENS160 NEWGPR bit    0x1
[10:18:58][D][ens160:172]: ENS160 readings unavailable - Normal Operation but readings not ready
[10:18:58][V][sgp4x:169]: VOC = 282, NOx = 1
[10:18:58][W][component:214]: Component sgp4x.sensor took a long time for an operation (0.07 s).
[10:18:58][W][component:215]: Components should block for at most 20-30ms.

Any help would be appreciated.
Thank you for your time.

I absolutely had the same problem with the combined ENS160 and AHT21 chips. I posted about it in the hass discord, but the short version is that the issue was to do with the power to the ENS160 falling below requirements at some points, and the fix was soldering on a supplemental capacitor to prevent the dropout and provide steady power to the ENS160 sensor.

I fear those messages are lost to time on the discord now, but I’ve attached a picture. It’s a 47uF capacitor from the positive side of the ENS160 supply (it was like 1.7v or something i think) to ground. Note that these boards differ sometimes… in one case i had to go from the output of the fet and in the other i could solder to the smd capacitor… they’re almost identical, but not quite.

That said, even after doing this, i found I was getting wildly variable results from several otherwise identical sensors in identical circuits in the same room.

I decided to use separate ENS160 and AHT21 boards, and unfortunately even those aren’t really as consistent as I’d like, and a few may have the same issue of the persistent 0 value issue you report above. I haven’t tried to fix them yet, so we’ll see. I’m not sure how good these really are ultimately, or at least, the ones you can get from AliExpress. Caveat Emptor i guess.

3 Likes

Dear kbenton,

A week ago i tried to provide an external power supply for all the sensors connected to my ESP32 and it seems to be working fine till now. ENS160+AHT20 still hasn’t crashed yet.

As for the readings, i am currently comparing ENS160 to SCD41 (true sensor) and the results differ at most about 100ppm.

As for the ENS sensor, i purchased a bunch of ENS160+ENS210 sensors from rtRobot from AliExpress and will conduct a thorough test since i will be using it in mass production in my Control Panels for Chicken Broilers and will let you know the results.

N.B:
rtRobot’s sensor module are very reliable, i have been using their products for the last 3 years under very harsh conditions.

rtRobot Official Link:
https://rtrobot.aliexpress.com/store/5891226?spm=a2g0s.8937474.0.0.468e2e0ejEtlL8

Thank you for your time.

Thank you! This saved my sanity. Added an extra cap and haven’t had this issue since.

It has highlighted another issue I’ve been seeing with these boards which I’ve posted about over here.

Any tips for the size and type of capacitor? I’m quite novice to electronics.
Does it have to be 47 nF and does it have to use an elco type (electrolyte, bipolar)? If using a ceramic, tantalum, or mylar type or another, is it possible?
Considering that the elco type is quite large, and I want a compact size.