argon40: I still cannot get I2C enabled.

I still cannot get I2C enabled. I followed the instructions above and created the file rpi-i2c.conf in the /etc/modules-load.d folder and edited config.txt, but it still says it cannot set up Argon40. When I went to edit the config.txt, I did not find a line that said #dtparam=i2c1=on. So, I added it without the #. I still get the following in the logs. Any ideas?

`Logger: homeassistant.setup Source: custom_components/argon40/init.py:64 First occurred: 11:41:33 PM (1 occurrences) Last logged: 11:41:33 PM

Error during setup of component argon40 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 “/config/custom_components/argon40/init.py”, line 34, in async_setup bus = SMBus(1) 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

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/setup.py”, line 193, in _async_setup_component result = await asyncio.wait_for(task, SLOW_SETUP_MAX_WAIT) File “/usr/local/lib/python3.7/asyncio/tasks.py”, line 442, in wait_for return fut.result() File “/config/custom_components/argon40/init.py”, line 64, in async_setup address, UnboundLocalError: local variable ‘address’ referenced before assignment`

_Originally posted by @digitalMedic in https://github.com/Misiu/argon40/issues/1#issuecomment-661614210_

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 18 (8 by maintainers)

Most upvoted comments

I followed the instructions on the new HA docs. Not sure what the difference was from before, but it worked this time.

The method in the HA docs worked for me.