Hi. I have this integration for almost one year, no problem setting it to retrieve data at one second.
Suddenly, I have a lot of disconnections:
This is the part of log:
2025-06-04 14:11:22.322 DEBUG (MainThread) [huawei_solar.huawei_solar] Sleeping for 0.049643 seconds before making next call
2025-06-04 14:11:22.372 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32064 with length 52 from slave 0
2025-06-04 14:11:22.373 DEBUG (MainThread) [pymodbus.logging] send: 0x1 0xd 0x0 0x0 0x0 0x6 0x0 0x3 0x7d 0x40 0x0 0x34
2025-06-04 14:11:22.395 DEBUG (MainThread) [pymodbus.logging] recv: 0x1 0xd 0x0 0x0 0x0 0x6b 0x0 0x3 0x68 0x0 0x0 0x2 0x91 0x9 0x3e 0x0 0x0 0x0 0x0 0x4 0x8b 0x0 0x2 0x0 0x0 0x0 0x0 0xa 0xa3 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x17 0x70 0x0 0x0 0x2 0x81 0xff 0xff 0xff 0xff 0x3 0xe8 0x13 0x8a 0x26 0x24 0x1 0x68 0xb 0xb8 0x2 0x0 0x0 0x0 0x68 0x3f 0xd7 0xfe 0xff 0xff 0xff 0xff 0x0 0x0 0x2 0x80 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0xf 0xd0 0x8 0x0 0x10 0x33 0x1d 0x68 0x40 0x54 0x5 0x0 0x0 0x0 0xf 0x0 0x0 0xc 0xa1 old_data: addr=None
2025-06-04 14:11:22.395 DEBUG (MainThread) [pymodbus.logging] Processing: 0x1 0xd 0x0 0x0 0x0 0x6b 0x0 0x3 0x68 0x0 0x0 0x2 0x91 0x9 0x3e 0x0 0x0 0x0 0x0 0x4 0x8b 0x0 0x2 0x0 0x0 0x0 0x0 0xa 0xa3 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x17 0x70 0x0 0x0 0x2 0x81 0xff 0xff 0xff 0xff 0x3 0xe8 0x13 0x8a 0x26 0x24 0x1 0x68 0xb 0xb8 0x2 0x0 0x0 0x0 0x68 0x3f 0xd7 0xfe 0xff 0xff 0xff 0xff 0x0 0x0 0x2 0x80 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0xf 0xd0 0x8 0x0 0x10 0x33 0x1d 0x68 0x40 0x54 0x5 0x0 0x0 0x0 0xf 0x0 0x0 0xc 0xa1
2025-06-04 14:11:22.395 DEBUG (MainThread) [pymodbus.logging] decoded PDU function_code(3 sub -1) -> ReadHoldingRegistersResponse(dev_id=0, transaction_id=0, address=0, count=0, bits=[], registers=[0, 657, 2366, 0, 0, 1163, 2, 0, 0, 2723, 0, 0, 0, 0, 0, 6000, 0, 641, 65535, 65535, 1000, 5002, 9764, 360, 3000, 512, 0, 26687, 55294, 65535, 65535, 0, 640, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 53256, 16, 13085, 26688, 21509, 0, 15, 0, 3233], status=1)
2025-06-04 14:11:22.395 DEBUG (MainThread) [pymodbus.logging] Frame advanced, resetting header!!
2025-06-04 14:11:22.396 DEBUG (MainThread) [custom_components.huawei_solar] Finished fetching HV22A0307429_inverter_data_update_coordinator data in 0.254 seconds (success: True)
2025-06-04 14:11:22.932 DEBUG (MainThread) [huawei_solar.bridge] Batch update of the following registers: meter_status, grid_A_voltage, active_grid_A_current, power_meter_active_power, power_meter_reactive_power, active_grid_power_factor, active_grid_frequency, grid_exported_energy, grid_accumulated_energy, grid_accumulated_reactive_power
2025-06-04 14:11:22.932 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 37100 with length 25 from slave 0
2025-06-04 14:11:22.933 DEBUG (MainThread) [pymodbus.logging] send: 0x1 0xe 0x0 0x0 0x0 0x6 0x0 0x3 0x90 0xec 0x0 0x19
2025-06-04 14:12:29.787 DEBUG (MainThread) [custom_components.hacs] Nothing in the queue
2025-06-04 14:15:14.143 ERROR (MainThread) [custom_components.huawei_solar] Timeout fetching HV22A0307429_inverter_data_update_coordinator data
2025-06-04 14:15:14.169 ERROR (MainThread) [homeassistant] Error doing job: Fatal error: protocol.data_received() call failed. (None)
Traceback (most recent call last):
File "/usr/local/lib/python3.13/asyncio/selector_events.py", line 1019, in _read_ready__data_received
self._protocol.data_received(data)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/usr/local/lib/python3.13/site-packages/pymodbus/transport/transport.py", line 304, in data_received
self.datagram_received(data, None)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/pymodbus/transport/transport.py", line 338, in datagram_received
cut = self.callback_data(self.recv_buffer, addr=addr)
File "/usr/local/lib/python3.13/site-packages/pymodbus/transaction/transaction.py", line 192, in callback_data
self.response_future.set_result(pdu)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^
asyncio.exceptions.InvalidStateError: invalid state
2025-06-04 14:15:14.193 ERROR (MainThread) [huawei_solar.huawei_solar] Modbus client is not connected to the inverter
NoneType: None
2025-06-04 14:15:14.194 INFO (MainThread) [backoff] Backing off _do_read(...) for 1.0s (huawei_solar.exceptions.ConnectionInterruptedException: Modbus client is not connected to the inverter)
2025-06-04 14:15:14.933 ERROR (MainThread) [custom_components.huawei_solar] Timeout fetching HV22A0307429_power_meter_data_update_coordinator data
2025-06-04 14:17:35.909 ERROR (MainThread) [custom_components.huawei_solar] Timeout fetching HV22A0307429_inverter_data_update_coordinator data
2025-06-04 14:17:36.099 ERROR (MainThread) [custom_components.huawei_solar] Timeout fetching HV22A0307429_power_meter_data_update_coordinator data
2025-06-04 14:18:18.029 ERROR (MainThread) [pymodbus.logging] No response received after 3 retries, continue with next request
2025-06-04 14:18:18.030 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry SUN2000-6KTL-L1 for huawei_solar
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 749, in __async_setup_with_context
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/huawei_solar/__init__.py", line 96, in async_setup_entry
primary_bridge = await create_tcp_bridge(
^^^^^^^^^^^^^^^^^^^^^^^^
...<3 lines>...
)
^
File "/usr/local/lib/python3.13/site-packages/huawei_solar/bridge.py", line 658, in create_tcp_bridge
return await _create(await AsyncHuaweiSolar.create(host, port, slave_id), slave_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/huawei_solar/bridge.py", line 684, in _create
product_info = await HuaweiSolarProductInfo.retrieve_from_device(client, slave_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/huawei_solar/bridge.py", line 67, in retrieve_from_device
) = await client.get_multiple(
^^^^^^^^^^^^^^^^^^^^^^^^^^
...<8 lines>...
)
^
File "/usr/local/lib/python3.13/site-packages/huawei_solar/huawei_solar.py", line 292, in get_multiple
response = await self._read_registers(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<3 lines>...
)
^
File "/usr/local/lib/python3.13/site-packages/huawei_solar/huawei_solar.py", line 429, in _read_registers
return await _do_read()
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/backoff/_async.py", line 151, in retry
ret = await target(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/backoff/_async.py", line 151, in retry
ret = await target(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/huawei_solar/huawei_solar.py", line 377, in _do_read
response = await self._client.read_holding_registers(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<3 lines>...
)
^
File "/usr/local/lib/python3.13/site-packages/pymodbus/transaction/transaction.py", line 164, in execute
raise ModbusIOException(txt)
pymodbus.exceptions.ModbusIOException: Modbus Error: [Input/Output] No response received after 3 retries, continue with next request
2025-06-04 14:18:26.261 ERROR (MainThread) [homeassistant.components.mobile_app.notify] Error sending notification to https://mobile-apps.home-assistant.io/api/sendPush/android/v1: ClientConnectorError(ConnectionKey(host='mobile-apps.home-assistant.io', port=443, is_ssl=True, ssl=True, proxy=None, proxy_auth=None, proxy_headers_hash=None), OSError(101, "Connect call failed ('151.101.1.195', 443)"))
2025-06-04 14:18:38.240 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
File "/config/custom_components/freeds/coordinator.py", line 179, in error_websocket
self.async_set_update_error(Exception(err))
^^^
NameError: name 'err' is not defined
2025-06-04 14:18:56.773 ERROR (MainThread) [homeassistant.helpers.event] Error while processing template: Template<template=({{ (state_attr(config.entity, 'current') | int) > 0 }}) renders=128>
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 644, in async_render
render_result = _render_with_context(self.template, compiled, **kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2934, in _render_with_context
return template.render(**kwargs)
~~~~~~~~~~~~~~~^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/jinja2/environment.py", line 1295, in render
self.environment.handle_exception()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/jinja2/environment.py", line 942, in handle_exception
raise rewrite_traceback_stack(source=source)
File "<template>", line 1, in top-level template code
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2434, in forgiving_int_filter
raise_no_default("int", value)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1972, in raise_no_default
raise ValueError(
...<2 lines>...
)
ValueError: Template error: int got invalid input 'None' when rendering template '{{ (state_attr(config.entity, 'current') | int) > 0 }}' but no default was specified
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 761, in async_render_to_info
render_info._result = self.async_render( # noqa: SLF001
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
variables, strict=strict, log_fn=log_fn, **kwargs
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 646, in async_render
raise TemplateError(err) from err
homeassistant.exceptions.TemplateError: ValueError: Template error: int got invalid input 'None' when rendering template '{{ (state_attr(config.entity, 'current') | int) > 0 }}' but no default was specified
I must remind that almost ONE year worked very well. I did not updated to 1.5.4, because this was the same behavior when I’ve updated, so I had to downgrade to 1.5.3, which worked very well.
What’s wrong?
HAOS 15.2
Core: 2025.5.3
Huawei Solar version: 1.5.3
Huawei inverter: SUN2000L 6ktl l1
with latest firmware - updated when it was released and worked very well till today.