I2C on Raspberry Pi 5 & HAOS - /boot/CONFIG gets removed automatically

I followed the instructions on Home Assistant web page linked here:

to enable i2c access on a raspberry pi 5. Everything was working great! I could access my attached devices and built a few custom add-ons.

I don’t know if this is exactly the cause, but I recently updated HA Core and HA Supervisor and now the /boot/CONFIG folder gets erased every boot. Further, I am getting permission errors trying to access the I2C bus (I assume because the modules aren’t getting loaded).

What can I do to either stop the directory getting removed or enable I2C modules via some other method?

Yup, it will.
You are probably adding things to the SSH container and not root for one. For 2 even if you add it to root it won’t survive a version update.
You need to find an App or an integration that will do that for you properly, or use the container install method so you can access the actual OS instead of trying to Hack a closed OS. (HAOS)

1 Like

Got it all working again. Learned a couple of things:

  • Double check your I2C device DOESNT have pull-ups before you connect it to a 5v supply or you’ll fry your Raspberry Pi / ESP pins.
  • The modifications to the CONFIG/modules may not be necessary? The directory gets wiped each reboot, but that’s OK so long as the config.txt changes persist.
  • For building custom addons that access the i2c busses: rebuilding the addon doesn’t fully load any new config.yaml changes. You need to uninstall/reinstall the addon. (For instance, if you change the i2c bus you’re using)