Home Assistant using the Home Assistant Operating System is a managed environment, which means you can’t use existing methods to enable the I2C bus on a Raspberry Pi.
You will need:
- SD card reader
- SD card with Home Assistant Operating System flashed on it
Shutdown/turn-off your Home Assistant installation and unplug the SD card.
Plug the SD card into an SD card reader and find a drive/file system named
hassos-boot. The file system might be shown/mounted automatically. If not,
use your operating systems disk management utility to find the SD card reader
and make sure the first partition is available.
- In the root of the
hassos-bootpartition, add a new folder called
- In the
CONFIGfolder, add another new folder called
- Inside the
modulesfolder add a text file called
rpi-i2c.confwith the following content:
- In the root of the USB drive edit the file called
config.txtadd two lines to it:
- Insert the SD card back into your Raspberry Pi.
- On startup, the
hassos-config.servicewill automatically pickup the new
- Another reboot might be necessary to make sure the just imported
rpi-i2c.confis present at boot time.
The I2C devices should now be present under /dev.