Closed tdamsma closed 5 years ago
As the ESP32 supports 2 hardware i2c buses I think that is causing the issues. In principle you could do software i2c but that probably (apparently) is not supported.
@tdamsma Correct, ESP32 only has two hw i2c buses, and I don't think porting some sw i2c solution to the ESP32 would be worth the effort, it might be interesting though to integrate i2c bus expanders (should be possible due to the modular design of I2CDevice).
Sounds like maybe the i2c component could use some additional input validation to restrict the list to at most two bus definitions?
@brandond Correct, problem is that's not really possible right now (MULTI_CONF
makes it impossible to validate the full conf struct, including the length of the values in i2c block).
Operating environment/Installation (Hass.io/Docker/pip/etc.):
Docker
ESP (ESP32/ESP8266, Board/Sonoff):
ESP-WROOM-32
Affected component:
I2C / BME280
Description of problem:
I configured 3 i2c buses, and all seems to work. On closer inspection however the readings for K1 (on bus 1) are almost identical to the readings from K3. K1 and K2 are next to each other, and temp should be about 20 degrees. K3 is somewhere else, and it's temperature is much higher. So for some reason the values that are read for K1 are actually those of K3.
I tried the following:
Still K3 values on K1 bus
I checked the generated code, and I couldn't spot any obvious errors (but I am not familiar with C++). Of note, The same three buses worked fine with a micropython based experiment
Problem-relevant YAML-configuration entries:
Logs (if applicable):
Additional information and things you've tried: