huawei_solar: [Bug]: doesnt work wit actual HA 2024.2.0 and 2024.2.1

Describe the issue

Hello,

after update from HA 2024.1.6 the Huawei integration doesnt work wit actual HA 2024.2.0 and also not with 2024.2.1

Bescribe your Huawei Solar Setup

Inverter Type: Sun 2000 8KTL M1 and 2x Sun 2000 10 KLT M1 Inverter Firmware version: actual official latest SDongle present: yes and actual official latest Power meter present: three phase Battery: LUNA2000 15kWh Battery Firmware version: actual official latest

How do you connect to the inverter?

Please select your connection method

Upload your Diagnostics File

Drag & Drop your Diagnostics File here.

Upload your relevant debug logs

huawei_solar.exceptions.ReadException: Failed to read register 43006 after 6 tries
2024-02-09 13:32:13.287 DEBUG (MainThread) [pymodbus.logging] Connecting to 192.168.178.34:502.
2024-02-09 13:32:13.288 DEBUG (MainThread) [pymodbus.logging] Connecting comm
2024-02-09 13:32:13.289 DEBUG (MainThread) [pymodbus.logging] Connected to comm
2024-02-09 13:32:13.290 DEBUG (MainThread) [pymodbus.logging] callback_connected called
2024-02-09 13:32:13.290 DEBUG (MainThread) [huawei_solar.modbus] Waiting for 1500 milliseconds after connection before performing operations
2024-02-09 13:32:13.290 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 43006 with length 1 from slave 17
2024-02-09 13:32:13.290 DEBUG (MainThread) [pymodbus.logging] send: 0x0 0x1 0x0 0x0 0x0 0x6 0x11 0x3 0xa7 0xfe 0x0 0x1
2024-02-09 13:32:13.290 DEBUG (MainThread) [pymodbus.logging] Adding transaction 1
2024-02-09 13:32:13.292 DEBUG (MainThread) [pymodbus.logging] -> transport: received eof
2024-02-09 13:32:13.292 DEBUG (MainThread) [pymodbus.logging] Connection lost comm due to None
2024-02-09 13:32:13.292 DEBUG (MainThread) [pymodbus.logging] Getting transaction 1
2024-02-09 13:32:13.292 DEBUG (MainThread) [pymodbus.logging] Wait comm 1000000 ms before reconnecting.
2024-02-09 13:32:13.293 ERROR (MainThread) [huawei_solar.huawei_solar] Could not read register value, has another device interrupted the connection?
2024-02-09 13:32:13.293 INFO (MainThread) [backoff] Backing off _do_read(...) for 1.0s (huawei_solar.exceptions.ConnectionInterruptedException: Could not read register value, has another device interrupted the connection?)
2024-02-09 13:32:13.293 DEBUG (MainThread) [huawei_solar.huawei_solar] Received <class 'huawei_solar.exceptions.ConnectionInterruptedException'>: backing off reading for 1.0 seconds after 1 tries
2024-02-09 13:32:14.301 ERROR (MainThread) [huawei_solar.huawei_solar] Modbus client is not connected to the inverter.
NoneType: None
2024-02-09 13:32:14.302 INFO (MainThread) [backoff] Backing off _do_read(...) for 2.0s (huawei_solar.exceptions.ConnectionInterruptedException: Modbus client is not connected to the inverter.)
2024-02-09 13:32:14.302 DEBUG (MainThread) [huawei_solar.huawei_solar] Received <class 'huawei_solar.exceptions.ConnectionInterruptedException'>: backing off reading for 2.0 seconds after 2 tries
2024-02-09 13:32:16.305 ERROR (MainThread) [huawei_solar.huawei_solar] Modbus client is not connected to the inverter.
NoneType: None
2024-02-09 13:32:16.306 INFO (MainThread) [backoff] Backing off _do_read(...) for 4.0s (huawei_solar.exceptions.ConnectionInterruptedException: Modbus client is not connected to the inverter.)
2024-02-09 13:32:16.306 DEBUG (MainThread) [huawei_solar.huawei_solar] Received <class 'huawei_solar.exceptions.ConnectionInterruptedException'>: reconnecting and backing off reading for 4.0 seconds after 3 tries
2024-02-09 13:32:16.306 DEBUG (MainThread) [pymodbus.logging] Connecting to 192.168.178.34:502.
2024-02-09 13:32:16.306 DEBUG (MainThread) [pymodbus.logging] Connecting comm
2024-02-09 13:32:16.308 DEBUG (MainThread) [pymodbus.logging] Connected to comm
2024-02-09 13:32:16.308 DEBUG (MainThread) [pymodbus.logging] callback_connected called
2024-02-09 13:32:16.308 DEBUG (MainThread) [huawei_solar.modbus] Waiting for 1500 milliseconds after connection before performing operations
2024-02-09 13:32:16.312 DEBUG (MainThread) [pymodbus.logging] -> transport: received eof
2024-02-09 13:32:16.312 DEBUG (MainThread) [pymodbus.logging] Connection lost comm due to None
2024-02-09 13:32:16.312 DEBUG (MainThread) [pymodbus.logging] Wait comm 1000000 ms before reconnecting.
2024-02-09 13:32:20.309 ERROR (MainThread) [huawei_solar.huawei_solar] Modbus client is not connected to the inverter.
NoneType: None
2024-02-09 13:32:20.310 INFO (MainThread) [backoff] Backing off _do_read(...) for 8.0s (huawei_solar.exceptions.ConnectionInterruptedException: Modbus client is not connected to the inverter.)
2024-02-09 13:32:20.310 DEBUG (MainThread) [huawei_solar.huawei_solar] Received <class 'huawei_solar.exceptions.ConnectionInterruptedException'>: backing off reading for 8.0 seconds after 4 tries
2024-02-09 13:32:28.317 ERROR (MainThread) [huawei_solar.huawei_solar] Modbus client is not connected to the inverter.
NoneType: None
2024-02-09 13:32:28.317 INFO (MainThread) [backoff] Backing off _do_read(...) for 16.0s (huawei_solar.exceptions.ConnectionInterruptedException: Modbus client is not connected to the inverter.)
2024-02-09 13:32:28.317 DEBUG (MainThread) [huawei_solar.huawei_solar] Received <class 'huawei_solar.exceptions.ConnectionInterruptedException'>: backing off reading for 16.0 seconds after 5 tries
2024-02-09 13:32:44.318 ERROR (MainThread) [huawei_solar.huawei_solar] Modbus client is not connected to the inverter.
NoneType: None
2024-02-09 13:32:44.318 ERROR (MainThread) [backoff] Giving up _do_read(...) after 6 tries (huawei_solar.exceptions.ConnectionInterruptedException: Modbus client is not connected to the inverter.)
2024-02-09 13:32:44.319 ERROR (MainThread) [huawei_solar.huawei_solar] Aborting client creation due to error.
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/backoff/_async.py", line 151, in retry
    ret = await target(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/backoff/_async.py", line 151, in retry
    ret = await target(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/huawei_solar/huawei_solar.py", line 349, in _do_read
    raise ConnectionInterruptedException(message)
huawei_solar.exceptions.ConnectionInterruptedException: Modbus client is not connected to the inverter.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/huawei_solar/huawei_solar.py", line 178, in create
    await huawei_solar._initialize()
  File "/usr/local/lib/python3.12/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.12/site-packages/huawei_solar/huawei_solar.py", line 241, in get
    return (await self.get_multiple([name], slave))[0]
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/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.12/site-packages/huawei_solar/huawei_solar.py", line 398, in _read_registers
    return await _do_read()
           ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/backoff/_async.py", line 159, in retry
    await _call_handlers(on_giveup, **details, exception=e)
  File "/usr/local/lib/python3.12/site-packages/backoff/_async.py", line 37, in _call_handlers
    await handler(details)
  File "/usr/local/lib/python3.12/site-packages/backoff/_async.py", line 16, in f
    return coro_or_func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/huawei_solar/huawei_solar.py", line 327, in backoff_giveup
    raise ReadException(f"Failed to read register {register} after {details['tries']} tries")
huawei_solar.exceptions.ReadException: Failed to read register 43006 after 6 tries

Please confirm the following:

  • I’m running the latest release of Home Assistant.
  • I’m running the latest release of this integration.
  • I did not find an existing issue describing this problem.
  • I did upload the diagnostics-file that I could retrieve from the ‘Devices & Services Page’
  • I did upload the relevant debug logs (via ‘Enable Debug Logging’-feature or by manually configuring HA logging)

About this issue

  • Original URL
  • State: closed
  • Created 5 months ago
  • Reactions: 1
  • Comments: 28 (1 by maintainers)

Most upvoted comments

I checked the log, its every time I try the same error: huawei_solar.exceptions.ReadException: Failed to read register 43006 after 6 tries

Bevor up to HA 2024.1.6 it runs without any trouble.

Still the same issue here, it’s not starting, constantly initializing…, rebooting does not solve the issue