Custom component / I2c Setup, Please Help!

I am trying to convert from Home assistant to Hassio. The issue I am having is with Custom components / I2c. Is I2c enabled by defualt on Hassio? Is it an issue that I am running Hassio on the same Rpi that has these tophats?

Any assistants would be appreciated. I’ve asked about this months ago but figured I’d give it a try after my previous version of homeassisant failed its update and left me with nothing now.

The problem I have is I can not run my IO Pi cards.
I’ve followed the instructions and copied the files from here: https://github.com/abelectronicsuk/abelectronics-home-assistant-custom-components

This is the error I get:

Tue Jul 24 2018 21:49:15 GMT-0500 (Central Daylight Time)

Error while setting up platform iopiinputssensor
Traceback (most recent call last):
File “/usr/local/lib/python3.6/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/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 129, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/local/lib/python3.6/asyncio/tasks.py”, line 358, in wait_for
return fut.result()
File “/usr/local/lib/python3.6/asyncio/coroutines.py”, line 212, in coro
res = func(*args, **kw)
File “/config/custom_components/binary_sensor/iopiinputssensor.py”, line 62, in async_setup_platform
bus = smbus.SMBus(1)
File “/usr/local/lib/python3.6/site-packages/smbus/smbus.py”, line 56, in init
self.open(bus)
File “/usr/local/lib/python3.6/site-packages/smbus/smbus.py”, line 83, in open
raise IOError(e.errno)
OSError: 2

Hi,

I have got a similar issue, i2c does not seem to be enabled.
Unfortunately no one has answered so far.

I tried enabling i2c in config.txt adding
dtparam=i2c_arm=on
after this the “lsmod |grep i2c” command shows:
i2c_bcm2835 16384 0
and cat /proc/modules |grep i2c command shows
i2c_bcm2835 16384 0 - Live 0x7f085000

but at the end the error
FileNotFoundError: [Errno 2] No such file or directory: ‘/dev/i2c-1’
is still there.

Someone can help, please?
BR

Unfortunately I ended up having to go back to Home Assistant again rather than running Hassio. I would really like to convert to Hassio but everything I control is off my I2C

Temporarily I hooked up my i2c devices to a spare raspberry pi running old ResinOS Hass.IO, and sharing them via eventstream. Not a clean fix, so I really hope that i2c support is added soon.

Hope this can help: How to enable I2C on hass.io / resin.io

Is possible to enable SPI driver also?
MArco