Hi Wlcrs,
I was actually using @Emilv2 's integration which worked fine until now. So, I was not aware of your development . Anyway, I gave it a try, but I cannot connect to my inverter.
I get this:
Source: /usr/local/lib/python3.11/site-packages/huawei_solar/huawei_solar.py:175
First occurred: 9:49:00 PM (1 occurrences)
Last logged: 9:49:00 PM
Aborting client creation due to error.
Traceback (most recent call last):
File "/usr/local/lib/python3.11/asyncio/tasks.py", line 490, in wait_for
return fut.result()
^^^^^^^^^^^^
asyncio.exceptions.CancelledError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/backoff/_async.py", line 151, in retry
ret = await target(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/backoff/_async.py", line 151, in retry
ret = await target(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/huawei_solar/huawei_solar.py", line 339, in _do_read
response = await self._client.read_holding_registers(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pymodbus/client/base.py", line 231, in async_execute
resp = await asyncio.wait_for(req, timeout=self.params.timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/tasks.py", line 492, in wait_for
raise exceptions.TimeoutError() from exc
TimeoutError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/huawei_solar/huawei_solar.py", line 169, in create
await huawei_solar._initialize()
File "/usr/local/lib/python3.11/site-packages/huawei_solar/huawei_solar.py", line 104, in _initialize
self.time_zone = (await self.get(rn.TIME_ZONE)).value
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/huawei_solar/huawei_solar.py", line 229, in get
return (await self.get_multiple([name], slave))[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/huawei_solar/huawei_solar.py", line 264, in get_multiple
response = await self._read_registers(registers[0].register, total_length, slave)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/huawei_solar/huawei_solar.py", line 386, in _read_registers
return await _do_read()
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/backoff/_async.py", line 171, in retry
await _call_handlers(on_backoff, **details, wait=seconds,
File "/usr/local/lib/python3.11/site-packages/backoff/_async.py", line 37, in _call_handlers
await handler(details)
File "/usr/local/lib/python3.11/site-packages/backoff/_async.py", line 16, in f
return coro_or_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/huawei_solar/huawei_solar.py", line 298, in on_backoff_with_reconnect
if details.tries % 2 == 0:
^^^^^^^^^^^^^
AttributeError: 'dict' object has no attribute 'tries'
I saw that Emil did the same commit on his repository, but it is not working also. In case someone is using that one too.
Logger: homeassistant.components.sensor
Source: custom_components/huawei_solar/sensor.py:169
Integration: Sensor (documentation, issues)
First occurred: 10:06:25 PM (1 occurrences)
Last logged: 10:06:25 PM
Error while setting up huawei_solar platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 320, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/huawei_solar/sensor.py", line 169, in async_setup_platform
inverter = AsyncHuaweiSolar(
^^^^^^^^^^^^^^^^^
TypeError: AsyncHuaweiSolar.__init__() got an unexpected keyword argument 'host'