Closed tiimsvk closed 4 months ago
change adresse 40
self._ina219 = INA219(addr=0x40)
solved me problem
Same error for me. But changing address to 0x40 did not help. Any suggestions how to find actual address without installing a toons of addons? I use HASSOS.
P.S. Looks like my address is 0x42, but now I see a bunch of errors... And the sensor was created, but not available.
Error doing job: Task exception was never retrieved 15:17:21 – (ERROR) ina219_ups_hat (custom integration) - message first occurred at 15:17:20 and shows up 2 times Error while setting up ina219_ups_hat platform for binary_sensor 15:17:20 – (ERROR) Binary Sensor Error adding entities for domain binary_sensor with platform ina219_ups_hat 15:17:20 – (ERROR) Binary Sensor Error adding entities for domain sensor with platform ina219_ups_hat 15:17:20 – (ERROR) Sensor Error while setting up ina219_ups_hat platform for sensor 15:17:20 – (ERROR) Sensor Error fetching ina219_ups_hat data: Error updating data: type NoneType doesn't define round method 15:17:20 – (ERROR) ina219_ups_hat (custom integration)
Hi together, I have the same problems. Changing to adress 0x42 created the sensors but "not available". Testing the UPS Hat with "normal" OS on another Raspi with the waveshare Demo code gives the right output. Any idea?
My error is a little bit different:
Error while setting up ina219_ups_hat platform for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 350, in _async_setup_platform await asyncio.shield(awaitable) File "/config/custom_components/ina219_ups_hat/sensor.py", line 57, in async_setup_platform coordinator = INA219UpsHatCoordinator(hass, config) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/ina219_ups_hat/coordinator.py", line 29, in init self._ina219 = INA219(addr=0x41) ^^^^^^^^^^^^^^^^^ File "/config/custom_components/ina219_ups_hat/ina219.py", line 63, in init self.bus = smbus.SMBus(i2c_bus); ^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/smbus2/smbus2.py", line 280, in init self.open(bus) File "/usr/local/lib/python3.12/site-packages/smbus2/smbus2.py", line 310, in open self.fd = os.open(filepath, os.O_RDWR) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: '/dev/i2c-1'
some ideas ?
Thanks to everyone who chimed in on this error, I was seeing the same thing. Took me a while to figure out which file the line "self._ina219 = INA219(addr=0x41)" was in: homeassistant/custom_components/ina219_ups_hat/coordinator.py. For me, changing from 0x41 to 0x40 (and restarting hass) didn't help, but 0x42 did the trick. Hopefully this helps makes it easier for others to solve.
If you check the "HassOS I2C Configurator" add-on log you can see available I2C devices:
brw-rw---- 1 root disk 254, 2 Jan 25 00:45 zram2
/dev/i2c-1
/dev/i2c-0 /dev/i2c-1 /dev/i2c-10 /dev/i2c-22
Found i2c access! Nothing to do! You can remove this add-on
I'll move addr
option to config
Hi, when I installed the addon to HA and added the sensors to the configuration, the log says this. Where is the problem? well thank you
I enabled the i2c interface according to this: https://www.home-assistant.io/common-tasks/os/#enable-i2c