mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-05-29 06:16:49 +00:00

* Create enable_i2c.markdown * Update sensor.bme680.markdown * Update hassio_navigation.html * ✏️ Tweaks * ✏️ Tweaks
1.7 KiB
1.7 KiB
layout, title, description, date, sidebar, comments, sharing, footer
layout | title | description | date | sidebar | comments | sharing | footer |
---|---|---|---|---|---|---|---|
page | Enable HassOS i2c | Instructions on how to enable I2C on a Raspberry PI for Hass.io. | 2018-01-11 20:08 | true | false | true | true |
Hass.io is a managed environment, which means you can't use existing methods to enable the I2C bus on a Raspberry Pi.
If you're attempting to add an external sensor, you will have to enable the I2C interface in the Hass.io configuration using a USB stick.
{% linkable_title Step by step instructions %}
You will need:
- USB drive
- A way to add files to the USB drive
- A way to connect the drive to your Raspberry Pi
{% linkable_title Step 1 - Prepare the USB drive %}
Connect the USB drive to a device capable of adding and editing files to the USB drive.
Format a USB stick with FAT32/EXT4/NTFS and name the drive CONFIG
(uppercase).
{% linkable_title Step 2 - Add files to enable I2C %}
- In the root of the USB drive add a folder called
/modules
. - Inside that folder add a text file called
rpi-i2c.conf
with the following contents:i2c-bcm2708 i2c-dev
- In the root of the USB drive add a file called
config.txt
with the following contents:dtparam=i2c1=on dtparam=i2c_arm=on
{% linkable_title Step 3 - Load the new USB config %}
- Insert the USB drive into your Raspberry PI.
- Now go to your Home Assistant web interface, in the sidebar click Hass.io > System.
- Now click
Import from USB
. - This will restart your Hass.io instance, and load the new USB configuration.
When the service has restarted, you will have a working I2C interface.