evcc icon indicating copy to clipboard operation
evcc copied to clipboard

SolarEdge inverter Modbus TCP timeouts and transaction mismatches

Open thwien opened this issue 1 year ago • 13 comments

Describe the bug

Daily EVCC loose connection to TCP modbus port maybe after running daily inverter isolation test. Increasing timeouts or intervals or using watchdog does not resolve the problem.

My SolarEdge configuration worked over one year without any problem. But after an inverter software update (4.24.9) the described problem begun. I talked to the technical support of our PV installation, but they could not find any reason or error event on the inverter hardware.

Maybe the inverter causes the problem, but maybe EVCC can handle this connection and mismatch errors in another way.

Thanks alot for this great open source project. Keep up your good work.

I would appreciate any suggestion to understand and solve this issue.

Steps to reproduce

Evcc is configured with SolarEdge inverter and connected successfully to communicate with Modbus via TCP on port 502. Everything works many hours and sometimes days as expected until in EVCC it shows errors like "connection refused", "connection timeout" and "response transaction id does not match request". Not always but mostly it is happens while or after daily automated isolation test of the inverter.

If connection is successful, "evcc detect" shows two entries:

sunspec  │ {"IP":"192.168.221.22","Port":502,"ModbusResult":{"SlaveID":1,"Model":1,"Point":"Mn","Value":"SolarEdge "}}

inverter │ {"IP":"192.168.221.22","Port":502,"ModbusResult":{"SlaveID":1,"Model":103,"Point":"W","Value":28945}} 

If connection fails, "evcc detect" shows just one entry:

sunspec │ {"IP":"192.168.221.22","Port":502,"ModbusResult":{"SlaveID":1,"Model":1,"Point":"Mn","Value":"SolarEdge "}

If connection fails, neither restart of EVCC or reboot solves the problem. I have to remove all SolarEdge configuration and wait multiple hours before reconfigure SolarEdge. After multiple hours it works again as expected.

I tested many different timeouts, intervals and watchdog but without any success.

Configuration details

meters:
- type: template
  template: solaredge-hybrid
  id: 1  
  host: 192.168.221.22  
  port: 502  
  usage: grid  
  modbus: tcpip  
  name: grid1
  watchdog: 60s
- type: template
  template: solaredge-hybrid
  id: 1  
  host: 192.168.221.22  
  port: 502  
  usage: pv  
  modbus: tcpip  
  name: pv2
  watchdog: 60s
- type: template
  template: solaredge-hybrid
  id: 1  
  host: 192.168.221.22  
  port: 502  
  usage: battery  
  modbus: tcpip  
  name: battery3
  capacity: 13.8
  watchdog: 60s

site:
  title: Home
  meters:
   grid: grid1
   pv:
   - pv2
   battery:
   - battery3

Log details

evcc[20901]: 2025-11-18 18:49:40.671937886 +0100 CET m=+124365.672457258 !!   2ms add[0]: model 103 block 0 point DCW: dial tcp 192.168.221.22:502: connect: connection refused

evcc[20901]: 2025-11-18 18:49:48.050008393 +0100 CET m=+124373.050527765 !! 3003ms add[0]: model 103 block 0 point DCW: dial tcp 192.168.221.22:502: i/o timeout

evcc[20901]: 2025-11-18 18:50:49.784421582 +0100 CET m=+124434.784940954 !! 1545ms read failed: modbus: response transaction id '56559' does not match request '56561'

What type of operating system or environment does evcc run on?

Linux

External automation

  • [x] I have made sure that no external automation like HomeAssistant or Node-RED is active or accessing any of the mentioned devices when this issue occurs.

Nightly build

  • [x] I have verified that the issue is reproducible with the latest nightly build

Version

evcc version 0.209.8

thwien avatar Nov 20 '25 10:11 thwien

But after an inverter software update (4.24.9) the described problem begun.

Since you can point point it talk to SE, sounds like a firmware issue.

Maybe the inverter causes the problem, but maybe EVCC can handle this connection and mismatch errors in another way.

After each error, evcc already closes the connection. Seems that SE doesn't recognize that internally. Unless there is a specific suggestion (and prototype) of what evcc should do differently, not much we can do...

andig avatar Nov 20 '25 12:11 andig

Thank you for your quick reply.

Watching traffic between EVCC and inverter with tcpdump I also guess the inverter part is causing these problems. I hope the technicians contacted SE already, but I will ask again to contact SE support.

I will get back to you when I have new insights.

thwien avatar Nov 20 '25 13:11 thwien

Look in the discussions you find similar problems there. I had contact with SE and they set back the firmware. Open a support ticket!

Coernel82 avatar Nov 20 '25 17:11 Coernel82

I got the same issue SE firmware 4.24.16. Happens daily at 21 CET according to my observation. Disabling and Reenabling Modbus TCP on the inverter required to get Modbus working again. Also have a ticket with SE. Let‘s see.

linuspfeiffer avatar Nov 20 '25 21:11 linuspfeiffer

Thanks a lot for your feedbacks.

I watched the working and non working connections between EVCC and the inverter with tcpdump.

On a working connection a TCP stream to Modbus port of inverter is started by handshake and stays connected without a FIN-ACK sequence. Each Modbus response id fits to its query.

On a non working connection I can confirm that each Modbus request is a unique TCP stream with just one Modbus query and response. But the response id does not fit to its query id. See screenshot.

Therefore I suppose an error in the inverter firmware, too.

Image

@linuspfeiffer And version SE firmware 4.24.16 has the same issue? :( Did you get any reply by SolarEdge support?

To improve EVCC I suggest an error tolerance. If Modbus connection is not possible, EVCC cannot start any more. What about an error handling like "onerror: disable" to ignore PV configuration on error?

thwien avatar Nov 26 '25 08:11 thwien

Any updates regarding this? I'm also getting this errors. Only solution is to enable and disable Modbus TCP on inverter?

zigad avatar Jan 14 '26 07:01 zigad

@zigad Firmware version 4.24.9 and 4.24.20 have the same problems at my inverter. As @linuspfeiffer mentioned it seems that firmware version 4.24.16 have the same issue. I asked SolarEdge to downgrade to version 4.22.44 and now it works.

thwien avatar Jan 14 '26 07:01 thwien

@zigad Firmware version 4.24.9 and 4.24.20 have the same problems at my inverter. As @linuspfeiffer mentioned it seems that firmware version 4.24.16 have the same issue. I asked SolarEdge to downgrade to version 4.22.44 and now it works.

Thanks for the clarification! How did you contact SolarEdge? The general ContactUs form on their website?

I do see my Inverter was updated 2 since the problems began:

CPU was updated from 4.22.44 to 4.24.20 and again to latest available: 4.24.22 DSP2 was updated from 2.19.2000 to 2.19.2001

I guess I need to tell them to revert it back to 4.22.44

zigad avatar Jan 14 '26 07:01 zigad

@zigad Because of the warranty, I asked my installer to contact support.

thwien avatar Jan 14 '26 07:01 thwien

My inverter was downgraded by SolarEdge, they acknowledged the issue and are working on a fix.

image

zigad avatar Jan 29 '26 09:01 zigad

That‘s good news, thank you!

andig avatar Jan 29 '26 09:01 andig

I also have SolarEdge CPU version 4.22.44 that works fine except that it disconnects once a day for a minuter early in the morning, which is non-critical. However, this bothers me now and would like to know if the rest have similar issue and when newer firmware will be available. I guess this will be post 4.24.20+ version.

kosl avatar Feb 03 '26 09:02 kosl

I ordered an update for my SolarEdge inverter (SE17K-RW0T0BNN4) to firmware-version 4.24.25 at the 27.05.2026. After that firmware-update I do not have any communication-losses at EVCC.

karo01 avatar Jun 14 '26 11:06 karo01