esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
293 stars 36 forks source link

SHT21 sensor don't work #3549

Closed pavellzubkov closed 1 year ago

pavellzubkov commented 2 years ago

The problem

SHT21 sensor (gy-21) don't work with esphome. That sensor work korrectly on sane board with arduino library.

Which version of ESPHome has the issue?

2022.8.0

What type of installation are you using?

Docker

Which version of Home Assistant has the issue?

2022.8.7

What platform are you using?

ESP32

Board

nodemcu

Component causing the issue

htu21d

Example YAML snippet

esphome:
  name: humi

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:
  level: VERBOSE

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

ota:
  password: "bdcbfc73eca210343a06dbc1ea4dab85"

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

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

# Example configuration entry for ESP32
i2c:
  sda: GPIO18
  scl: GPIO19
  scan: true
  id: bus_a
  frequency: 10kHz

sensor:

  - platform: htu21d
    i2c_id: bus_a
    temperature:
      name: "Temperature"
      accuracy_decimals: 0
    #  id: box_temp
    humidity:
      name: "Humidity"
      accuracy_decimals: 0
     # id: box_humi
    update_interval: 5s

Anything in the logs that might be useful for us?

[00:44:13][C][logger:275]: Logger:
[00:44:13][C][logger:276]:   Level: VERBOSE
[00:44:13][C][logger:277]:   Log Baud Rate: 115200
[00:44:13][C][logger:278]:   Hardware UART: UART0
[00:44:13][C][i2c.arduino:038]: I2C Bus:
[00:44:13][C][i2c.arduino:039]:   SDA Pin: GPIO18
[00:44:13][C][i2c.arduino:040]:   SCL Pin: GPIO19
[00:44:13][C][i2c.arduino:041]:   Frequency: 10000 Hz
[00:44:13][C][i2c.arduino:044]:   Recovery: bus successfully recovered
[00:44:13][I][i2c.arduino:054]: Results from i2c bus scan:
[00:44:13][I][i2c.arduino:060]: Found i2c device at address 0x40
[00:44:14][C][htu21d:028]: HTU21D:
[00:44:14][C][htu21d:029]:   Address: 0x40
[00:44:14][C][htu21d:033]:   Update Interval: 5.0s
[00:44:14][C][htu21d:034]:   Temperature 'Temperature'
[00:44:14][C][htu21d:034]:     Device Class: 'temperature'
[00:44:14][C][htu21d:034]:     State Class: 'measurement'
[00:44:14][C][htu21d:034]:     Unit of Measurement: '°C'
[00:44:14][C][htu21d:034]:     Accuracy Decimals: 0
[00:44:14][C][htu21d:035]:   Humidity 'Humidity'
[00:44:14][C][htu21d:035]:     Device Class: 'humidity'
[00:44:14][C][htu21d:035]:     State Class: 'measurement'
[00:44:14][C][htu21d:035]:     Unit of Measurement: '%'
[00:44:14][C][htu21d:035]:     Accuracy Decimals: 0
[00:44:14][C][mdns:094]: mDNS:
[00:44:14][C][mdns:095]:   Hostname: humi-soil
[00:44:14][V][mdns:096]:   Services:
[00:44:14][V][mdns:098]:   - _esphomelib, _tcp, 6053
[00:44:14][V][mdns:100]:     TXT: version = 2022.8.0
[00:44:14][V][mdns:100]:     TXT: mac = 94b5554d0434
[00:44:14][V][mdns:100]:     TXT: platform = ESP32
[00:44:14][V][mdns:100]:     TXT: board = esp32dev
[00:44:14][C][ota:085]: Over-The-Air Updates:
[00:44:14][C][ota:086]:   Address: humi.local:3232
[00:44:14][C][ota:089]:   Using Password.
[00:44:14][C][api:138]: API Server:
[00:44:14][C][api:139]:   Address: humi.local:6053
[00:44:14][C][api:141]:   Using noise encryption: YES
[00:44:17][V][component:199]: Component htu21d.sensor took a long time for an operation (0.05 s).
[00:44:17][V][component:200]: Components should block for at most 20-30ms.
[00:44:22][V][component:199]: Component htu21d.sensor took a long time for an operation (0.05 s).
[00:44:22][V][component:200]: Components should block for at most 20-30ms.
[00:44:27][V][component:199]: Component htu21d.sensor took a long time for an operation (0.05 s).
[00:44:27][V][component:200]: Components should block for at most 20-30ms.

Additional information

No response

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.