Replies: 1 comment 2 replies
-
Setting to 400Khz led to a bunch of I2C errors for me:
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'd suggest updating the vue3 recommendations to 400kHz/1ms as well.
I tried 400kHz/1ms on my vue3 as suggested here esphome/issues#6335 (comment) and that stopped the occasional errors I saw. I had spent some time last month poking around to debug the error. I added more logging to the sensor update callback. Specifically with 200kHz/default,
EmporiaVueComponent::update()
occasionally aborts becausesensor_reading.end != 0
. I'm guessing this is a race condition? While the I2Cread()
always returns success, the databuffer occasionally has different kinds of garbage in it.The hexdump is the contents of the databuffer array. Sometimes it's complete, sometimes it isn't. The counters in the log message I added are:
total
, is a count of how many timesEmporiaVueComponent::update()
has been called,good
is a count of how many timessensor_read.end == 0
was true, andnew
is a count of how many times!sensor_reading.is_unread
.Beta Was this translation helpful? Give feedback.
All reactions