pulquero / dbus-i2c

Victron Venus D-Bus services for I2C devices
BSD 3-Clause "New" or "Revised" License
3 stars 1 forks source link

Raspberry Pi use both i2c-1 and i2c-0 #6

Closed GitBeagle closed 4 months ago

GitBeagle commented 5 months ago

I'm using an argon fan on my pi3 which uses i2c-1. I am also trying to use an INA226. Connecting both to i2c-1 works with short cables. Unfortunately, I need to use a ~1M cable for the ina226. Using a LTC4311 from Adafruit solves the longer cable issue but then the argon fan i2c does not work. Separating the two devices on the two i2c ports would solve my problem but I don't know how to get the DC System Aggregator to recognize i2c-0. I have enabled i2c-0 in config.txt and it shows up with address 0x50.

I am controlling the fan through node-red using i2cset. I just need dbus-i2c to use i2c-0 instead of i2c-1.

Is this possible with the current version of you software? Can you point me in the right direction?

pulquero commented 5 months ago

Yes, it is possible, in the json config files there should be a bus option that you can change.

GitBeagle commented 5 months ago

Thanks for the quick response. I found the json file at /data/setupOptions/dbus-i2c and changed the bus and other info to match my configuration. Waiting on a delivery to resume testing.