Connection to SolarEdge Modbus spontaneously refused

As of 9.00 PM yesterday evening, my connection to the SolarEdge Modbus has been refused according to the log file. No changes were made in HA so I guess it has something to do with the SolarEdge hardware. Is someone else also struggling with this issue as of yesterday?

2022-10-06 12:06:19.678 ERROR (MainThread) [pymodbus.client.sync] Connection to (, 1502) failed: [Errno 111] Connection refused

2022-10-06 12:06:19.685 ERROR (MainThread) [custom_components.solaredge_modbus] Error reading modbus data

Traceback (most recent call last):

  File "/config/custom_components/solaredge_modbus/", line 195, in async_refresh_modbus_data

    update_result = self.read_modbus_data()

  File "/config/custom_components/solaredge_modbus/", line 246, in read_modbus_data


  File "/config/custom_components/solaredge_modbus/", line 570, in read_modbus_data_inverter

    inverter_data = self.read_holding_registers(unit=self._address, address=40071, count=38)

  File "/config/custom_components/solaredge_modbus/", line 233, in read_holding_registers

    return self._client.read_holding_registers(address, count, **kwargs)

  File "/usr/local/lib/python3.10/site-packages/pymodbus/client/", line 114, in read_holding_registers

    return self.execute(request)

  File "/usr/local/lib/python3.10/site-packages/pymodbus/client/", line 106, in execute

    raise ConnectionException("Failed to connect[%s]" % (self.__str__()))

pymodbus.exceptions.ConnectionException: Modbus Error: [Connection] Failed to connect[ModbusTcpClient(]

I restarted HA and also the SolarEdge converter, but that didn’t help. There is a cabled TCP-IP connection and the SolarEdge app itself is receiving data, so the connection is not the problem.

Find the root of this problem. The SolarEdger converter changed DHCP IP address internally (while it was pre-reserved in my router) Now set to a fixed ip-address on the old ip-address and the integration is working again.
The error message is somewhat confusing in this case, “Connection refused” but in reality, it couldn’t connect due to the wrong ip-address!