I’ve followed some instructions around, i.e.created files:
‘/mnt/boot/config.txt’
with entry:
dtparam=i2c1=on
dtparam=i2c_arm=on
And /etc/modules-load.d/rpi-i2c.conf’’ with:
i2c-bcm2708
i2c-dev
Also with ‘/config/configuration.yaml’ with:
# Temperature/humidity/pressure
- platform: bme280
name: THP sensor
i2c_address: 0x77
operation_mode: 2 # forced mode
time_standby: 5
oversampling_temperature: 4
oversampling_pressure: 4
oversampling_humidity: 4
delta_temperature: -0.5
monitored_conditions:
- temperature
- humidity
- pressure
scan_interval: 40
But I’m getting errors:
Error while setting up platform bme280
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/smbus/smbus.py", line 81, in open
self._fd = os.open(path, os.O_RDWR, 0)
FileNotFoundError: [Errno 2] No such file or directory: '/dev/i2c-1'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 150, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
return fut.result()
File "/usr/src/homeassistant/homeassistant/components/bme280/sensor.py", line 86, in async_setup_platform
bus = smbus.SMBus(config.get(CONF_I2C_BUS))
File "/usr/local/lib/python3.7/site-packages/smbus/smbus.py", line 56, in __init__
self.open(bus)
File "/usr/local/lib/python3.7/site-packages/smbus/smbus.py", line 83, in open
raise IOError(e.errno)
OSError: 2
Not sure what I should do next.