again is losing connection, and it’s not wifi/network problem
i’ve just restarted the integration, and started to work
PS: HA is about 4 meters from Inverter, and connected with fixed IP Address to Inverter’s AP
found this in logs:
Logger: huawei_solar.huawei_solar
Source: /usr/local/lib/python3.11/site-packages/huawei_solar/huawei_solar.py:184
First occurred: 09:53:57 (5 occurrences)
Last logged: 09:56:13
Aborting client creation due to error.
Traceback (most recent call last):
File "/usr/local/lib/python3.11/asyncio/tasks.py", line 500, in wait_for
return fut.result()
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/locks.py", line 213, in wait
await fut
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/huawei_solar/huawei_solar.py", line 178, in create
await huawei_solar._initialize()
File "/usr/local/lib/python3.11/site-packages/huawei_solar/huawei_solar.py", line 107, 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 241, in get
return (await self.get_multiple([name], slave))[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/huawei_solar/huawei_solar.py", line 276, 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 396, in _read_registers
async with self._communication_lock():
File "/usr/local/lib/python3.11/contextlib.py", line 204, in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/huawei_solar/huawei_solar.py", line 145, in _communication_lock
raise err
File "/usr/local/lib/python3.11/site-packages/huawei_solar/huawei_solar.py", line 141, in _communication_lock
await asyncio.wait_for(self._client.connected_event.wait(), WAIT_FOR_CONNECTION_TIMEOUT)
File "/usr/local/lib/python3.11/asyncio/tasks.py", line 502, in wait_for
raise exceptions.TimeoutError() from exc
TimeoutError
Logger: custom_components.huawei_solar
Source: helpers/update_coordinator.py:306
Integration: Huawei Solar (documentation, issues)
First occurred: 09:57:48 (1 occurrences)
Last logged: 09:57:48
Timeout fetching HV2240421156_data_update_coordinator data
Logger: huawei_solar.huawei_solar
Source: /usr/local/lib/python3.11/site-packages/huawei_solar/huawei_solar.py:143
First occurred: 09:53:57 (12 occurrences)
Last logged: 09:59:33
Timeout while waiting for connection. Reconnecting...
Traceback (most recent call last):
File "/usr/local/lib/python3.11/asyncio/tasks.py", line 500, in wait_for
return fut.result()
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/locks.py", line 213, in wait
await fut
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/huawei_solar/huawei_solar.py", line 141, in _communication_lock
await asyncio.wait_for(self._client.connected_event.wait(), WAIT_FOR_CONNECTION_TIMEOUT)
File "/usr/local/lib/python3.11/asyncio/tasks.py", line 502, in wait_for
raise exceptions.TimeoutError() from exc
TimeoutError
Logger: custom_components.huawei_solar
Source: helpers/update_coordinator.py:300
Integration: Huawei Solar (documentation, issues)
First occurred: 10:00:32 (1 occurrences)
Last logged: 10:00:32
Unexpected error fetching HV2240421156_data_update_coordinator data: 'NoneType' object has no attribute 'write'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 300, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/huawei_solar/__init__.py", line 314, in _async_update_data
return await self.bridge.update()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/huawei_solar/bridge.py", line 169, in update
result = await self._get_multiple_to_dict(INVERTER_REGISTERS)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/huawei_solar/bridge.py", line 162, in _get_multiple_to_dict
return dict(zip(names, await self.client.get_multiple(names, self.slave_id)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/huawei_solar/huawei_solar.py", line 276, 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 398, in _read_registers
return await _do_read()
^^^^^^^^^^^^^^^^
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 351, in _do_read
response = await self._client.read_holding_registers(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pymodbus/client/base.py", line 193, in async_execute
self.transport_send(packet)
File "/usr/local/lib/python3.11/site-packages/pymodbus/transport/transport.py", line 404, in transport_send
self.transport.write(data) # type: ignore[attr-defined]
^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'write'