#Raspberry Pi 3 On-Board I2C

19 messages · Page 1 of 1 (latest)

vale summit
#

Is it possible to use an on-board I2C interface to directly read I2C sensors? I enabled i2c in home assistant, but cant find any example how to reach it. From what I'm finding i need another microcontroller with wifi that can interface i2c sensors and pass data to HA. This seems wasteful as there is an i2c interface already on raspberry pi3. So wondering if anyone already did that or its not worth the effort?

vale summit
#

But i already enabled i2c. It just dont show up on states or anywhere.. if i try to use it in configuration.yaml it says i2c not found. but in terminal i can see 4 i2c devices. just dont know how to interact with them. And they only have root permission. Probably that's why I can't run i2cdetect "Operation not permitted"

humble flume
#

When you say you "already enabled i2c" what do you mean by that?
What steps have you taken

vale summit
#

i used HassOS I2C Configurator and got them in /dev folder

humble flume
#

Hmmm... Is HA running while you are doing that? Might be locking the files

vale summit
#

yes i'm running terminal on HA 🙂 but cant figure out how to make those i2c accessible

humble flume
#

Hmmm the thing I linked seemed to imply you need to modify the files while HA was off, maybe a restart will have them show up?

vale summit
#

i think i2c configurator does exactly same thing thats why it makes you reboot rpi 2 times.. and then they appear.. but just without any permissions to HA

vale summit
humble flume
#

Hmmm

#

Well all I can say is that it should work... I had it working about 2 years ago before I moved ha off a pi

vale summit
#

it just feels like root dont have much permissions.. i even trying to do by official HA "Enable I2C via Home Assistant Operating System Terminal" to mount "mmcdlk0p1" i get "Permission denied"

#

also started to think maybe i need 32bit version (if there is such)

#
boot: A
boot_slots:
  A:
    state: booted
    status: good
    version: "14.1"
  B:
    state: inactive
    status: good
    version: null
data_disk: SS08G-0x534649e7
update_available: true
version: "14.1"
version_latest: 14.2.dev20250109
[core-ssh ~]$ ```
vale summit
#

it just looks that gpio and i2c was just scrapped long time ago

acoustic folio
#

I just went through the same exercise last week, trying to use gpio's and i2c on RPi4. HA ended integration support for all these hardware add-ons. They suggest to decouple this by using an additional controller like ESP32 to handle these add-ons and use MQTT for integration.