Huawei Solar - unexpected error

Hi all,

I am trying to fix/connect the huawei invertor to my home assistant. I’ve done all the testing/troubleshooting, I have the installer password, modbus unrestricted is enabled, I can ping/telnet on 502 port but somehow it doest work. I have installed the second HA, I bought the second dongle but I am having the same result. Any ideas?

Logger: custom_components.huawei_solar.config_flow
Source: custom_components/huawei_solar/config_flow.py:537
integration: Huawei Solar (documentation, issues)
First occurred: 5:41:05 PM (1 occurrence)
Last logged: 5:41:05 PM

Unexpected exception while connecting via ModbusTCP
Traceback (most recent call last):
  File "/config/custom_components/huawei_solar/config_flow.py", line 537, in async_step_setup_network
    info = await validate_network_setup(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<4 lines>...
    )
    ^
  File "/config/custom_components/huawei_solar/config_flow.py", line 205, in validate_network_setup
    bridge = await create_tcp_bridge(
             ^^^^^^^^^^^^^^^^^^^^^^^^
    ...<3 lines>...
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/huawei_solar/bridge.py", line 693, 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 726, in _create
    model_name_result = await client.get(rn.MODEL_NAME, slave_id)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/huawei_solar/huawei_solar.py", line 261, in get
    return (await self.get_multiple([name], slave_id))[0]
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/huawei_solar/huawei_solar.py", line 305, in get_multiple
    response = await self._read_registers(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<3 lines>...
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/huawei_solar/huawei_solar.py", line 442, 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 389, 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 201, in execute
    raise ModbusIOException(txt)
pymodbus.exceptions.ModbusIOException: Modbus Error: [Input/Output] No response received after 3 retries, continue with next request
  • Installation methodHome Assistant OS
  • Core2025.12.3
  • Supervisor2025.12.3
  • Operating System16.3
  • Frontend20251203.2
  • huawei Solar 1.6.0
  • invertor v200R001C00SPC151

Please post your [formatted] yaml.

Using port 6607?

6607 it is not open - cannot telnet from my device or HA

what exactly to post and how to format it as yaml?

In top bar click preformatted text <> symbol and paste the code

Hello,
sorry let’s start from the beginning.
From the logs you posted you are using the following integration is it correct?

what huawei inverter model do you have?
If is quite recent usually it should be using port 6607

How are you connected? which way of the several described?
You are referring to a dongle is the " Via the IP of your SDongle" following way you are using?

the log is showing an error in creating the connection so clearly something is wrong in the setup.

EDIT:
Sorry I just realized you have posted your inverter is a SUN2000L series, correct?
What Slave ID’s are you setting? Have you tried AUTO?
Line 537 of the config_flow.py is about the Slave ID’s detection, as far as I understand.

Hi AutoDIY, thank you for reply.

  • indeed, I am using Huawei solar integration available on HACS for HA
  • sun2000 4ktl-l1 is the invertor
  • I am using SDongleA-05, I tried WIFI and UTP cable connections
  • I configured static IP, also reserverved the IP on DHCP
  • I tried using the auto and slave 1 or 2
  • I am able to telnet only on 502 and not 6607 - no idea why 6607 is not enabled.
  • I am out of ideas…

It would be helpful if you could describe your network layout and components that you use.
I also have a Huawei inverter (SUN2000-3KTL-L1) plus power meter integrated into HA using the huawei_solar integration.
But i’m not using the dongle to connect the inverter to HA but the inverter internal wifi client to connect to a wifi ap in my network.
The modbus connection uses port 6607 in my setup.

I’ve tried to connect on the dongle ip on port 502 using modbus poll app on the laptop and I got the following error
Modbus exceptions are errors returned from the server device.
The data address received in the query is not an allowable address for the server. More specifically, the combination of reference number and transfer length is invalid. For a controller with 100 registers, the PDU addresses the first register as 0, and the last one as 99. If a request is submitted with a starting register address of 96 and a quantity of registers of 4, then this request will successfully operate (address-wise at least) on registers 96, 97, 98, 99. If a request is submitted with a starting register address of 96 and a quantity of registers of 5, then this request will fail with Exception Code 0x02 “Illegal Data Address” since it attempts to operate on registers 96, 97, 98, 99 and 100, and there is no register with address 100.

One hint, you can’t have more than one connection active to the inverter. So close any app, telnet, etc. before you connect HA to the inverter.

Have you set unrestricted mode in the inverter via the app?

because from your dongle manual:

““If the MODBUS TCP function is disabled, customer devices cannot access the network.
If the restriction function is enabled, you must configure a trustlist IP address (currently, only one trustlist IP address is supported) so that only the client devices with the trustlist IP address can access the network.
If unrestricted is enabled, all client devices on the same LAN can access the network, but only one client device can access the network at a time.””