esphome / issues

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

i2c sensors recognized but fail to read after boot #3091

Closed 4224 closed 2 years ago

4224 commented 2 years ago

The problem

Upon updating from 2022.2.4 to 2022.2.5 and flashing the update to my ESP32-POE-ISO, all my i2c sensors are recognized in the logs but have stopped reporting values. I see communication errors for each device. Nothing else was changed physically or with the ESPHome config before updating and flashing. I have enabled very_verbose logging to get the logs included.

I am using a tca9548a multiplexer on one bus and no multiplexer on another bus. The i2c communication errors are consistent on devices on both buses.

The behavior is consistent after reboot. I don't have another ESP32 to test with.

Which version of ESPHome has the issue?

2022.2.5

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

2022.2.9

What platform are you using?

ESP32

Board

ESP32-POE-ISO

Component causing the issue

i2c

Example YAML snippet

esphome:
  name: indoor
  platform: ESP32
  board: esp32-poe-iso

ethernet:
  type: LAN8720
  mdc_pin: GPIO23
  mdio_pin: GPIO18
  clk_mode: GPIO17_OUT
  phy_addr: 0
  power_pin: GPIO12
  manual_ip:
    static_ip: 192.168.x.x
    gateway: 192.168.x.x
    subnet: 255.255.255.0

i2c:
  - id: i2c0
    sda: 4
    scl: 5
    scan: True
  - id: bus_b
    sda: 13
    scl: 16
    scan: True

# Enable logging
logger:
    level: VERY_VERBOSE
# Enable Home Assistant API
api:

ota:

tca9548a:
  - address: 0x70
    id: multiplex0
    i2c_id: i2c0
    channels:
      - bus_id: multiplex0channel0
        channel: 0
      - bus_id: multiplex0channel1
        channel: 1
      - bus_id: multiplex0channel2
        channel: 2
sensor:
  - platform: scd30
    i2c_id: multiplex0channel0
    co2:
      name: "indoor CO2"
      accuracy_decimals: 1
    temperature:
      name: "indoor scd30 temp"
      accuracy_decimals: 2
    humidity:
      name: "indoor scd30 Rh"
      accuracy_decimals: 1
#    temperature_offset: 1.5 °C
#    address: 0x61
    update_interval: 5s

  - platform: mcp9808
    i2c_id: multiplex0channel2
    name: "indoor temp"
    update_interval: 5s

  - platform: sgp30
    i2c_id: multiplex0channel1
    eco2:
      name: "indoor eCO2"
      accuracy_decimals: 1
    tvoc:
      name: "indoor TVOC"
      accuracy_decimals: 1
#    address: 0x58
    update_interval: 5s

  - platform: hm3301
    i2c_id: bus_b
    pm_1_0:
      name: "indoor PM1.0"
    pm_2_5:
      name: "indoor PM2.5"
    pm_10_0:
      name: "indoor PM10.0"
    aqi:
      name: "indoor AQI"
      calculation_type: "CAQI"
    address: 0x40

Anything in the logs that might be useful for us?

INFO Reading configuration /config/esphome/indoor.yaml...
WARNING GPIO12 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
WARNING GPIO4 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
WARNING GPIO4 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Generating C++ source...
INFO Compiling app...
Processing indoor (board: esp32-poe-iso; framework: arduino; platform: platformio/espressif32 @ 3.5.0)
--------------------------------------------------------------------------------
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
Dependency Graph
|-- <WiFi> 1.0
|-- <ESPmDNS> 1.0
|-- <Update> 1.0
|-- <Wire> 1.0.1
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/api/api_connection.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/api/api_frame_helper.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/api/api_pb2.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/api/api_pb2_service.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/api/api_server.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/api/list_entities.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/api/proto.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/api/subscribe_state.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/api/user_services.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/api/util.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/esp32/core.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/esp32/gpio_arduino.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/esp32/gpio_idf.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/esp32/preferences.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/ethernet/ethernet_component.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/hm3301/hm3301.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/i2c/i2c.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/i2c/i2c_bus_arduino.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/i2c/i2c_bus_esp_idf.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/logger/logger.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/mcp9808/mcp9808.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/md5/md5.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/mdns/mdns_component.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/mdns/mdns_esp32_arduino.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/mdns/mdns_esp8266.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/mdns/mdns_esp_idf.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/network/util.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/ota/ota_backend_arduino_esp32.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/ota/ota_backend_arduino_esp8266.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/ota/ota_backend_esp_idf.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/ota/ota_component.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/scd30/scd30.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/sensor/automation.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/sensor/filter.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/sensor/sensor.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/sgp30/sgp30.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/socket/bsd_sockets_impl.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/socket/lwip_raw_tcp_impl.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/socket/socket.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/components/tca9548a/tca9548a.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/core/application.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/core/color.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/core/component.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/core/controller.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/core/entity_base.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/core/helpers.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/core/log.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/core/scheduler.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/esphome/core/util.cpp.o
Compiling /data/indoor/.pioenvs/indoor/src/main.cpp.o
Generating partitions /data/indoor/.pioenvs/indoor/partitions.bin
Compiling /data/indoor/.pioenvs/indoor/lib64d/WiFi/ETH.cpp.o
Compiling /data/indoor/.pioenvs/indoor/lib64d/WiFi/WiFi.cpp.o
Compiling /data/indoor/.pioenvs/indoor/lib64d/WiFi/WiFiAP.cpp.o
Compiling /data/indoor/.pioenvs/indoor/lib64d/WiFi/WiFiClient.cpp.o
Compiling /data/indoor/.pioenvs/indoor/lib64d/WiFi/WiFiGeneric.cpp.o
Compiling /data/indoor/.pioenvs/indoor/lib64d/WiFi/WiFiMulti.cpp.o
Compiling /data/indoor/.pioenvs/indoor/lib64d/WiFi/WiFiSTA.cpp.o
Compiling /data/indoor/.pioenvs/indoor/lib64d/WiFi/WiFiScan.cpp.o
Compiling /data/indoor/.pioenvs/indoor/lib64d/WiFi/WiFiServer.cpp.o
Compiling /data/indoor/.pioenvs/indoor/lib64d/WiFi/WiFiUdp.cpp.o
Compiling /data/indoor/.pioenvs/indoor/lib915/ESPmDNS/ESPmDNS.cpp.o
Archiving /data/indoor/.pioenvs/indoor/lib64d/libWiFi.a
Compiling /data/indoor/.pioenvs/indoor/libbc6/Update/HttpsOTAUpdate.cpp.o
Compiling /data/indoor/.pioenvs/indoor/libbc6/Update/Updater.cpp.o
Archiving /data/indoor/.pioenvs/indoor/lib915/libESPmDNS.a
Compiling /data/indoor/.pioenvs/indoor/lib4fc/Wire/Wire.cpp.o
Archiving /data/indoor/.pioenvs/indoor/libbc6/libUpdate.a
Archiving /data/indoor/.pioenvs/indoor/libFrameworkArduinoVariant.a
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/Esp.cpp.o
Archiving /data/indoor/.pioenvs/indoor/lib4fc/libWire.a
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/FunctionalInterrupt.cpp.o
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/HardwareSerial.cpp.o
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/IPAddress.cpp.o
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/IPv6Address.cpp.o
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/MD5Builder.cpp.o
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/Print.cpp.o
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/Stream.cpp.o
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/StreamString.cpp.o
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/WMath.cpp.o
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/WString.cpp.o
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/base64.cpp.o
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/cbuf.cpp.o
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/esp32-hal-adc.c.o
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/esp32-hal-bt.c.o
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/esp32-hal-cpu.c.o
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/esp32-hal-dac.c.o
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/esp32-hal-gpio.c.o
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/esp32-hal-i2c.c.o
/data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-i2c.c: In function 'i2cDumpFifo':
/data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-i2c.c:415:35: warning: ' ' flag used with '%X' gnu_printf format [-Wformat=]
       } else k += sprintf(&buf[k],"% 4X ",fifoBuffer[i]);
                                   ^
/data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-i2c.c:415:35: warning: ' ' flag used with '%X' gnu_printf format [-Wformat=]
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/esp32-hal-ledc.c.o
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/esp32-hal-log.c.o
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/esp32-hal-matrix.c.o
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/esp32-hal-misc.c.o
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/esp32-hal-psram.c.o
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/esp32-hal-rmt.c.o
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/esp32-hal-sigmadelta.c.o
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/esp32-hal-spi.c.o
/data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-spi.c: In function 'spiTransferBytesNL':
/data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-spi.c:922:39: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
                 uint8_t * last_out8 = &result[c_longs-1];
                                       ^
/data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-spi.c:923:40: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
                 uint8_t * last_data8 = &last_data;
                                        ^
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/esp32-hal-time.c.o
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/esp32-hal-timer.c.o
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/esp32-hal-touch.c.o
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/esp32-hal-uart.c.o
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/libb64/cdecode.c.o
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/libb64/cencode.c.o
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/main.cpp.o
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/stdlib_noniso.c.o
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/wiring_pulse.c.o
Compiling /data/indoor/.pioenvs/indoor/FrameworkArduino/wiring_shift.c.o
Archiving /data/indoor/.pioenvs/indoor/libFrameworkArduino.a
Linking /data/indoor/.pioenvs/indoor/firmware.elf
RAM:   [=         ]  13.7% (used 44960 bytes from 327680 bytes)
Flash: [=====     ]  48.3% (used 885966 bytes from 1835008 bytes)
Building /data/indoor/.pioenvs/indoor/firmware.bin
esp32_create_combined_bin(["/data/indoor/.pioenvs/indoor/firmware.bin"], ["/data/indoor/.pioenvs/indoor/firmware.elf"])
Wrote 0xe8540 bytes to file /data/indoor/.pioenvs/indoor/firmware-factory.bin, ready to flash to offset 0x0
======================== [SUCCESS] Took 153.77 seconds ========================
INFO Successfully compiled program.
INFO Connecting to 192.168.3.22
INFO Uploading /data/indoor/.pioenvs/indoor/firmware.bin (886080 bytes)
Uploading: [============================================================] 100% Done...

INFO Waiting for result...
INFO OTA successful
INFO Successfully uploaded program.
INFO Starting log output from 192.168.x.x using esphome API
INFO Successfully connected to 192.168.x.x
[10:27:24][I][app:102]: ESPHome version 2022.2.5 compiled on Feb 24 2022, 10:25:50
[10:27:24][C][logger:233]: Logger:
[10:27:24][C][logger:234]:   Level: VERY_VERBOSE
[10:27:24][C][logger:235]:   Log Baud Rate: 115200
[10:27:24][C][logger:236]:   Hardware UART: UART0
[10:27:24][C][i2c.arduino:038]: I2C Bus:
[10:27:24][C][i2c.arduino:039]:   SDA Pin: GPIO4
[10:27:24][C][i2c.arduino:040]:   SCL Pin: GPIO5
[10:27:24][C][i2c.arduino:041]:   Frequency: 50000 Hz
[10:27:24][C][i2c.arduino:044]:   Recovery: bus successfully recovered
[10:27:24][I][i2c.arduino:054]: Results from i2c bus scan:
[10:27:24][I][i2c.arduino:060]: Found i2c device at address 0x40
[10:27:24][C][i2c.arduino:038]: I2C Bus:
[10:27:24][C][i2c.arduino:039]:   SDA Pin: GPIO13
[10:27:24][C][i2c.arduino:040]:   SCL Pin: GPIO16
[10:27:24][C][i2c.arduino:041]:   Frequency: 50000 Hz
[10:27:24][C][i2c.arduino:044]:   Recovery: bus successfully recovered
[10:27:24][I][i2c.arduino:054]: Results from i2c bus scan:
[10:27:24][I][i2c.arduino:060]: Found i2c device at address 0x70
[10:27:24][C][tca9548a:033]: TCA9548A:
[10:27:24][C][tca9548a:034]:   Address: 0x70
[10:27:24][C][scd30:121]: scd30:
[10:27:24][C][scd30:122]:   Address: 0x61
[10:27:24][W][scd30:126]: Communication failed! Is the sensor connected?
[10:27:24][C][scd30:140]:   Altitude compensation: OFF
[10:27:24][C][scd30:144]:   Automatic self calibration: ON
[10:27:24][C][scd30:145]:   Ambient pressure compensation: 0mBar
[10:27:24][C][scd30:146]:   Temperature offset: 0.00 °C
[10:27:24][C][scd30:147]:   Update interval: 5s
[10:27:24][C][scd30:148]:   CO2 'indoor CO2'
[10:27:24][C][scd30:148]:     State Class: 'measurement'
[10:27:24][C][scd30:148]:     Unit of Measurement: 'ppm'
[10:27:24][C][scd30:148]:     Accuracy Decimals: 1
[10:27:24][C][scd30:148]:     Icon: 'mdi:molecule-co2'
[10:27:24][C][scd30:149]:   Temperature 'indoor scd30 temp'
[10:27:24][C][scd30:149]:     Device Class: 'temperature'
[10:27:24][C][scd30:149]:     State Class: 'measurement'
[10:27:24][C][scd30:149]:     Unit of Measurement: '°C'
[10:27:24][C][scd30:149]:     Accuracy Decimals: 2
[10:27:24][C][scd30:150]:   Humidity 'indoor scd30 Rh'
[10:27:24][C][scd30:150]:     Device Class: 'humidity'
[10:27:24][C][scd30:150]:     State Class: 'measurement'
[10:27:24][C][scd30:150]:     Unit of Measurement: '%'
[10:27:24][C][scd30:150]:     Accuracy Decimals: 1
[10:27:24][C][mcp9808:037]: indoor temp:
[10:27:24][C][mcp9808:038]:   Address: 0x18
[10:27:24][E][mcp9808:040]: Communication with indoor temp failed!
[10:27:24][C][mcp9808:042]:   Update Interval: 5.0s
[10:27:24][C][mcp9808:043]:   Temperature 'indoor temp'
[10:27:24][C][mcp9808:043]:     Device Class: 'temperature'
[10:27:24][C][mcp9808:043]:     State Class: 'measurement'
[10:27:24][C][mcp9808:043]:     Unit of Measurement: '°C'
[10:27:24][C][mcp9808:043]:     Accuracy Decimals: 1
[10:27:24][C][sgp30:230]: SGP30:
[10:27:24][C][sgp30:231]:   Address: 0x58
[10:27:24][W][sgp30:235]: Communication failed! Is the sensor connected?
[10:27:24][C][sgp30:261]:   Update Interval: 5.0s
[10:27:24][C][sgp30:262]:   eCO2 sensor 'indoor eCO2'
[10:27:24][C][sgp30:262]:     Device Class: 'carbon_dioxide'
[10:27:24][C][sgp30:262]:     State Class: 'measurement'
[10:27:24][C][sgp30:262]:     Unit of Measurement: 'ppm'
[10:27:24][C][sgp30:262]:     Accuracy Decimals: 1
[10:27:24][C][sgp30:262]:     Icon: 'mdi:molecule-co2'
[10:27:24][C][sgp30:263]:   TVOC sensor 'indoor TVOC'
[10:27:24][C][sgp30:263]:     Device Class: 'volatile_organic_compounds'
[10:27:24][C][sgp30:263]:     State Class: 'measurement'
[10:27:24][C][sgp30:263]:     Unit of Measurement: 'ppb'
[10:27:24][C][sgp30:263]:     Accuracy Decimals: 1
[10:27:24][C][sgp30:263]:     Icon: 'mdi:radiator'
[10:27:24][C][sgp30:266]: Store baseline: YES
[10:27:24][C][sgp30:272]:   Compensation: No source configured
[10:27:24][C][hm3301.sensor:023]: HM3301:
[10:27:24][C][hm3301.sensor:024]:   Address: 0x40
[10:27:24][E][hm3301.sensor:026]: Communication with HM3301 failed!
[10:27:24][C][hm3301.sensor:029]:   PM1.0 'indoor PM1.0'
[10:27:24][C][hm3301.sensor:029]:     Device Class: 'pm1'
[10:27:24][C][hm3301.sensor:029]:     State Class: 'measurement'
[10:27:24][C][hm3301.sensor:029]:     Unit of Measurement: 'µg/m³'
[10:27:24][C][hm3301.sensor:029]:     Accuracy Decimals: 0
[10:27:24][C][hm3301.sensor:029]:     Icon: 'mdi:chemical-weapon'
[10:27:24][C][hm3301.sensor:030]:   PM2.5 'indoor PM2.5'
[10:27:24][C][hm3301.sensor:030]:     Device Class: 'pm25'
[10:27:24][C][hm3301.sensor:030]:     State Class: 'measurement'
[10:27:24][C][hm3301.sensor:030]:     Unit of Measurement: 'µg/m³'
[10:27:24][C][hm3301.sensor:030]:     Accuracy Decimals: 0
[10:27:24][C][hm3301.sensor:030]:     Icon: 'mdi:chemical-weapon'
[10:27:24][C][hm3301.sensor:031]:   PM10.0 'indoor PM10.0'
[10:27:24][C][hm3301.sensor:031]:     Device Class: 'pm10'
[10:27:24][C][hm3301.sensor:031]:     State Class: 'measurement'
[10:27:24][C][hm3301.sensor:031]:     Unit of Measurement: 'µg/m³'
[10:27:24][C][hm3301.sensor:031]:     Accuracy Decimals: 0
[10:27:24][C][hm3301.sensor:031]:     Icon: 'mdi:chemical-weapon'
[10:27:24][C][hm3301.sensor:032]:   AQI 'indoor AQI'
[10:27:24][C][hm3301.sensor:032]:     Device Class: 'aqi'
[10:27:24][C][hm3301.sensor:032]:     State Class: 'measurement'
[10:27:24][C][hm3301.sensor:032]:     Unit of Measurement: 'index'
[10:27:24][C][hm3301.sensor:032]:     Accuracy Decimals: 0
[10:27:24][C][hm3301.sensor:032]:     Icon: 'mdi:chemical-weapon'
[10:27:24][C][ethernet:119]: Ethernet:
[10:27:24][C][ethernet:230]:   IP Address: 192.168.x.x
[10:27:24][C][ethernet:231]:   Hostname: 'indoor'
[10:27:24][C][ethernet:232]:   Subnet: 255.255.255.0
[10:27:24][C][ethernet:233]:   Gateway: 192.168.x.x
[10:27:24][C][ethernet:244]:   DNS1: 0.0.0.0
[10:27:24][C][ethernet:245]:   DNS2: 0.0.0.0
[10:27:24][C][ethernet:248]:   MAC Address: xxxxxxxxx
[10:27:24][C][ethernet:249]:   Is Full Duplex: YES
[10:27:24][C][ethernet:250]:   Link Up: YES
[10:27:24][C][ethernet:251]:   Link Speed: 100
[10:27:24][C][ethernet:121]:   Power Pin: GPIO12
[10:27:24][C][ethernet:122]:   MDC Pin: 23
[10:27:24][C][ethernet:123]:   MDIO Pin: 18
[10:27:24][C][ethernet:124]:   Type: LAN8720
[10:27:24][C][mdns:084]: mDNS:
[10:27:24][C][mdns:085]:   Hostname: indoor
[10:27:24][V][mdns:086]:   Services:
[10:27:24][V][mdns:088]:   - _esphomelib, _tcp, 6053
[10:27:24][V][mdns:090]:     TXT: version = 2022.2.5
[10:27:24][V][mdns:090]:     TXT: mac = xxxxxxxx
[10:27:24][V][mdns:090]:     TXT: platform = ESP32
[10:27:24][V][mdns:090]:     TXT: board = esp32-poe-iso
[10:27:24][C][ota:085]: Over-The-Air Updates:
[10:27:24][C][ota:086]:   Address: 192.168.x.x:3232
[10:27:24][C][api:138]: API Server:
[10:27:24][C][api:139]:   Address: 192.168.x.x:6053
[10:27:24][C][api:143]:   Using noise encryption: NO
[10:27:37][VV][api.service:355]: on_ping_request: PingRequest {}
[10:27:37][VV][api.service:043]: send_ping_response: PingResponse {}
[10:27:39][VV][api.service:355]: on_ping_request: PingRequest {}
[10:27:39][VV][api.service:043]: send_ping_response: PingResponse {}
[10:27:48][VV][scheduler:186]: Running interval '' with interval=60000 last_execution=4294939908 (now=32616)
[10:27:52][VV][api.service:355]: on_ping_request: PingRequest {}
[10:27:52][VV][api.service:043]: send_ping_response: PingResponse {}
[10:27:54][VV][api.service:355]: on_ping_request: PingRequest {}
[10:27:54][VV][api.service:043]: send_ping_response: PingResponse {}
[10:28:07][VV][api.service:355]: on_ping_request: PingRequest {}
[10:28:07][VV][api.service:043]: send_ping_response: PingResponse {}
[10:28:09][VV][api.service:355]: on_ping_request: PingRequest {}
[10:28:09][VV][api.service:043]: send_ping_response: PingResponse {}
[10:28:22][VV][api.service:355]: on_ping_request: PingRequest {}
[10:28:22][VV][api.service:043]: send_ping_response: PingResponse {}
[10:28:24][VV][api.service:355]: on_ping_request: PingRequest {}
[10:28:24][VV][api.service:043]: send_ping_response: PingResponse {}
[10:28:37][VV][api.service:355]: on_ping_request: PingRequest {}
[10:28:37][VV][api.service:043]: send_ping_response: PingResponse {}
[10:28:39][VV][api.service:355]: on_ping_request: PingRequest {}
[10:28:39][VV][api.service:043]: send_ping_response: PingResponse {}
[10:28:48][VV][scheduler:186]: Running interval '' with interval=60000 last_execution=32612 (now=92613)
[10:28:52][VV][api.service:355]: on_ping_request: PingRequest {}
[10:28:52][VV][api.service:043]: send_ping_response: PingResponse {}
[10:28:54][VV][api.service:355]: on_ping_request: PingRequest {}
[10:28:54][VV][api.service:043]: send_ping_response: PingResponse {}
[10:29:07][VV][api.service:355]: on_ping_request: PingRequest {}
[10:29:07][VV][api.service:043]: send_ping_response: PingResponse {}
[10:29:09][VV][api.service:355]: on_ping_request: PingRequest {}
[10:29:09][VV][api.service:043]: send_ping_response: PingResponse {}

Additional information

Add-on version: 2022.2.5 You are running the latest version of this add-on. System: Home Assistant OS 7.4 (amd64 / qemux86-64) Home Assistant Core: 2022.2.9 Home Assistant Supervisor: 2022.01.1

4224 commented 2 years ago

I'm getting the same issue even when I remove the multiplexer and all the multiplexer attached devices. Running just the hm3301 directly off of two ESP32 pins I still have the issue.

Here's that config:

esphome:
  name: indoor
  platform: ESP32
  board: esp32-poe-iso

ethernet:
  type: LAN8720
  mdc_pin: GPIO23
  mdio_pin: GPIO18
  clk_mode: GPIO17_OUT
  phy_addr: 0
  power_pin: GPIO12
  manual_ip:
    static_ip: 192.168.x.x
    gateway: 192.168.x.x
    subnet: 255.255.255.0

i2c:
  - id: bus_b
    sda: 13
    scl: 16
    scan: True

# Enable logging
logger:
    level: VERY_VERBOSE
# Enable Home Assistant API
api:

ota:

sensor:
  - platform: hm3301
    i2c_id: bus_b
    pm_1_0:
      name: "indoor PM1.0"
    pm_2_5:
      name: "indoor PM2.5"
    pm_10_0:
      name: "indoor PM10.0"
    aqi:
      name: "indoor AQI"
      calculation_type: "CAQI"
    address: 0x40

Am I missing something obvious?

probot-esphome[bot] commented 2 years ago

Hey there @esphome/core, mind taking a look at this issue as it has been labeled with an integration (i2c) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

4224 commented 2 years ago

I believe this was a hardware issue related to cable lengths and not anything software related