esphome / issues

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

2024.10.0 breaks i2c on Emporia Vue2 devices #6335

Open KodinLanewave opened 2 days ago

KodinLanewave commented 2 days ago

The problem

Upgrading my Emporia Vue2 to 2024.10.0 broke my device; it would constantly throw i2c timeouts:

[17:50:30][E][emporia_vue:048]: Failed to read from sensor due to I2C error 3
[17:50:30][E][emporia_vue:048]: Failed to read from sensor due to I2C error 3
[17:50:30][E][emporia_vue:048]: Failed to read from sensor due to I2C error 3
[17:50:30][E][emporia_vue:048]: Failed to read from sensor due to I2C error 3
^C[17:50:30][E][emporia_vue:048]: Failed to read from sensor due to I2C error 3
[17:50:30][D][api.connection:199]: ESPHome Logs 2024.10.0 (192.168.0.254) requested disconnected

I've tried flashing via home assistant integration as well as manually uploading via docker image remote OTA, and 2024.10.0 has consistent results; Downgrading back to 2024.9.2 resolved the i2C issues.

Anything change with your i2c implementation in the latest release?

Which version of ESPHome has the issue?

2024.10.0

What type of installation are you using?

Docker as well as HomeAssistant addon (HASS 2024.10.2)

Which version of Home Assistant has the issue?

No response

What platform are you using?

ESP32

Board

Emporia Vue2

Component causing the issue

i2c

Example YAML snippet

No response

Anything in the logs that might be useful for us?

[17:50:30][E][emporia_vue:048]: Failed to read from sensor due to I2C error 3
[17:50:30][E][emporia_vue:048]: Failed to read from sensor due to I2C error 3
[17:50:30][E][emporia_vue:048]: Failed to read from sensor due to I2C error 3
[17:50:30][E][emporia_vue:048]: Failed to read from sensor due to I2C error 3
^C[17:50:30][E][emporia_vue:048]: Failed to read from sensor due to I2C error 3
[17:50:30][D][api.connection:199]: ESPHome Logs 2024.10.0 (192.168.0.254) requested disconnected

Additional information

Other users are seeing similar behavior per the following discussion (near the bottom; the issues are conflated, as the initial report was due to a hardware issue, whereas the more recent reports are due to software update)

https://github.com/emporia-vue-local/esphome/discussions/108

feisley commented 2 days ago

Just to add here this 2024.10 seems to impact more than just Emporia Vue: https://community.home-assistant.io/t/display-not-working-any-more-after-update-to-esphome-2024-10-0/783022

g8ry commented 2 days ago

Yeah, i2c is broken on Emporia Vue2 for me too on 2024.10, so had to downgrade to 2024.9. Same error as first posted.

craigwitter commented 2 days ago

I had the same i2c error too. Reverting the firmware to the last 2024.9 version has no problem.

Paul0372 commented 2 days ago

also breaks i2c with BME680 [21:31:58][I][i2c.arduino:096]: Results from i2c bus scan: [21:31:58][I][i2c.arduino:098]: Found no i2c devices! [21:31:58][C][template.sensor:022]: Template Sensor 'BME680 Indoor Air Quality' [21:31:58][C][template.sensor:022]: State Class: 'measurement' [21:31:58][C][template.sensor:022]: Unit of Measurement: ''

clydebarrow commented 2 days ago

try setting the i2c clock speed to something lower.

agoode commented 2 days ago

I was finally able to resolve this by increasing the clock speed and also setting timeout:

  frequency: 400kHz  # recommended range is 50-200kHz
  timeout: 1ms

Either one alone would not completely solve the problem.

genehand commented 2 days ago

Nice, 400kHz plus the 1ms timeout fix the emporia-vue-local component for me as well.

KodinLanewave commented 1 day ago

That said - why has this changed in 2024.10.0 to require a different frequency?

thenoid commented 1 day ago

Ditto, busted here too

wingrunr21 commented 1 day ago

That said - why has this changed in 2024.10.0 to require a different frequency?

This looks to be the only related I2C change: espressif/esp-idf#4999

Looks like ESP-IDF 4.4.8 included this back port (which was included in ESPHome 2024.10). I didn't fully read through the code to validate that's what it was though.

@agoode Did you try it keeping the frequency at 200 kHz but adding the timeout?

agoode commented 1 day ago

I did try 200 kHz with even the max timeout (13 ms) but it did not work.

garylankford8 commented 22 hours ago

Encountered the same issue with 10.0 and came here for a solution... 400kz and 1ms worked for me, too...

Thank you all!

weapons commented 21 hours ago

Hi Guys. I'm having the same issue with my Emporia Vue. Where should I make the frequency and timeout changes to fix the problem? TIA

Nevermind. I found it in the yaml. Problem solved with the edit. Thank you.

feisley commented 16 hours ago

So just to summarize:

Emporia Vue 2 has a workaround by setting the i2c frequency to 400 kHz and 1 ms timeout.

Emporia Vue 3 works as long as the frequency is 200 kHz and the timeout can be left at the esp-idf default of 100 us (The only other frequencies i have tested are 100 kHz and 150 kHz, both of which do not work, but 150 kHz was working in 2024.09)

dmtalon commented 14 hours ago

I applied these changes after experiencing the problem OP did, and this seems to have corrected mine as well. Thanks a ton. I was about to restore to the previous version.

veenstrahiem commented 7 hours ago

Same here, I can confirm this worked for me too: setting the i2c frequency to 400 kHz and 1 ms timeout

aminorjourney commented 5 hours ago

Works after a fashion. I'm not getting all my sensors populating properly from one of my Vue 2s even with the suggested values - rolling back to see if they re-appear.

kbrint commented 3 hours ago

Downgrade to 2024.9.2 worked for me. New values (frequency and timeout) also worked, both on 2024.9.2 and now back on 2024.10.0.

burnski666 commented 1 hour ago

Same problem, 400khz / 1ms also resolved!