Error while setting up platform htu21d

Hi all,

I have been using home assistant since the releae of “HassOS Release-1 build 2 (RC)”.
I’m using the new rpi 3 b+.
When I configure the sensor htu21d I obtained tyhe following errors:

"Log Details (ERROR)
Sun Jul 15 2018 19:44:32 GMT+0200 (Ora legale dell’Europa centrale)

Error while setting up platform htu21d
Traceback (most recent call last):
_ File “/usr/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/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/lib/python3.6/asyncio/tasks.py”, line 358, in wait_for_
_ return fut.result()_
_ File “/usr/lib/python3.6/site-packages/homeassistant/components/sensor/htu21d.py”, line 53, in async_setup_platform_
_ bus = smbus.SMBus(config.get(CONF_I2C_BUS))_
_ File “/usr/lib/python3.6/site-packages/smbus/smbus.py”, line 56, in init_
_ self.open(bus)_
_ File “/usr/lib/python3.6/site-packages/smbus/smbus.py”, line 83, in open_
_ raise IOError(e.errno)_
OSError: 2"

Could you help me in understanding what is wrong?
I want to be just an user of this great software, I don’t know anything about programming.

Thanks for your help.

BE

It seems that the i2c module is not installed:
After typing cat /proc/modules, this is what I obtained:

“nf_conntrack_netlink 40960 0 - Live 0xffffffb2b9472000
nfnetlink 20480 2 nf_conntrack_netlink, Live 0xffffffb2b9467000
aes_neon_blk 24576 1 - Live 0xffffffb2b945c000
crypto_simd 16384 1 aes_neon_blk, Live 0xffffffb2b9454000
cryptd 32768 1 crypto_simd, Live 0xffffffb2b9446000
aes_arm64 16384 1 aes_neon_blk, Live 0xffffffb2b943e000
bnep 24576 2 - Live 0xffffffb2b9433000
hci_uart 40960 1 - Live 0xffffffb2b9422000
btbcm 20480 1 hci_uart, Live 0xffffffb2b9418000
serdev 20480 1 hci_uart, Live 0xffffffb2b940d000
bluetooth 397312 24 bnep,hci_uart,btbcm, Live 0xffffffb2b9394000
ecdh_generic 24576 1 bluetooth, Live 0xffffffb2b9389000
brcmfmac 274432 0 - Live 0xffffffb2b927b000
brcmutil 16384 1 brcmfmac, Live 0xffffffb2b9260000
cfg80211 696320 1 brcmfmac, Live 0xffffffb2b8f8d000
snd_bcm2835 40960 0 - Live 0xffffffb2b8f7c000 ©
snd_pcm 126976 1 snd_bcm2835, Live 0xffffffb2b8f50000
snd_timer 36864 1 snd_pcm, Live 0xffffffb2b8f41000
snd 90112 3 snd_bcm2835,snd_pcm,snd_timer, Live 0xffffffb2b8f02000
rfkill 32768 4 bluetooth,cfg80211, Live 0xffffffb2b8ef3000
sdhci_iproc 16384 0 - Live 0xffffffb2b8eeb000
vchiq 352256 1 snd_bcm2835, Live 0xffffffb2b8e87000 ©
uio_pdrv_genirq 16384 0 - Live 0xffffffb2b8e7f000
uio 24576 1 uio_pdrv_genirq, Live 0xffffffb2b8e69000
sch_fq_codel 20480 3 - Live 0xffffffb2b8e60000”

Any idea?
I’m using the latest release of HASSOS 1.7 (64bit)

Thanks.

BE

Hi all,

I tried the 32bit version; same issue.
No one knows what is going wrong?

Thanks

BE

So, no one knows if i2c works.
It’s a pity, in order to use hassos, in my opinion, embedded hardware should work out of the box.
Thanks.

Hi Everyone,

I got the same error using HassOS 1.7, anyone manage to make it work?

ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform htu21d
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/site-packages/homeassistant/components/sensor/htu21d.py”, line 53, in async_setup_platform
bus = smbus.SMBus(config.get(CONF_I2C_BUS))
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)