question

mariusz-czarnomski avatar image
mariusz-czarnomski asked

SolarEdge + ModBusTCP + Meter Import/Export

Issue is related to ModbusTCP connection from CerboGX to SolarEdge.


I have used SolarEdge ModbusTCP over LAN, in my local management system integration, to read various PM data from SolarEdge.


Now I have got Victron MultiPlus with CerboGX and its "/opt/victronenergy/dbus-fronius/dbus-fronius" is constantly connected to my two SolarEdges inverters through modbus sunspec as well. It works perfectly well.


Problem is SolarEdge allows only one concurrent connection through modbus-tcp. I have reconfigured my local management system to read data from what Victron dbus and mosquito broker (mqtt) can output on pvinverters topic of 20 and 21, what corresponds to both SolarEdge inverters.


Unfortunately Victron reads only basic inverter modbus data without meters import/export power and energy. According to SolarEdge meters data are bit further from 40000 modbus address:

1st meter: 40000 + 121, 2nd meter: 40000+295, 3rd meter: 40000+496



Were you able somehow to force Victron cerbo to read SolarEdge meter data as well through modbus? Any help/hint would be very much appreciated.


BR,

Mariusz

Energy MeterModbus TCPpower metersolaredge
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

9 Answers
mariusz-czarnomski avatar image
mariusz-czarnomski answered ·

Update: looks like SolarEdge's meter riding is not implemented in Victron's dbus-fronius. At the same time SolarEdge confirmed there is no possibility to have second client through same or different interface (LAN,WiFi).

What about installation of modbus-proxy on cerboGX?

I was able to install modbus-proxy on Ubuntu and proxy CerboGX modbus successfully.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

mariusz-czarnomski avatar image
mariusz-czarnomski answered ·

I have installed modbus-proxy on my ubuntu node on proxmox and now Victron CerboGX and HomeAssistant are connected to SolarEdge's ModbusTCP through configured modpus-proxy. It works.. On CerboGX you cannot specify sunspec port. It has hardcode as 502. You can only "proxy" to one SolarEdge.



2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

belmont avatar image
belmont answered ·

Hi, i am interested this modbus proxy setup as I have SolarEdge and also Home Assistant that reads SolarEdge over modbus. As for setup, do you have the SolarEdge on the Victron AC out? What does the SolarEdge energy meter measure in your case? Grid point export/import meter or consumption meter? As for the Victron side, do you use physical meters ET112 to measure the SolarEdge production? Or only Modbus? I wonder one can eliminate buying ET112 this case when using only Modbus. Can you please share info how to install and configure modbus proxy on Ubuntu?

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

lasse-2 avatar image
lasse-2 answered ·

Intresting discussion regarding SolarEdge and Modbus, i have also being working with this at home, not with Victron, i have manage ro read out from head unit lots of values, but noting related to SolarEdge Batteries, like charging/discharging, percentage (%) etc...

anyone can shed some light on that?

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Harold Halewijn avatar image
Harold Halewijn answered ·

I had some problems too but were able to solve this by using Home Assistant with a running Modbus Proxy on it. I cleared all the modbus connections in VenusOS and pointed them to the new Modbus proxy. The proxy is then communicating with 2 SolarEdge inverters, one is connected to the SolarEdge Smart Meter. I can now read all registers and also write to registers. I have connected the beta DynamicESS through Nodered to the SolarEdge inverters to control export limits. I made a Youtube video about itand you can find the nodered flows on my website: www.haroldhalewijn.nl. Unfortunately it is done and written in Dutch but perhaps it can help you.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

dubsan avatar image
dubsan answered ·

Hi,

I can share a code that I developped to overcome this issue.

My config is Multiplus II GX with 3 x Pylontec US2000C and 3KW Solaredge PV on the AC input of the Multiplus. I had the Solaredge PV installed with a Solaredge grid meter before. When installing the Victron+BESS, I did not want to duplicate the grid meter and I have done some adjustment to the python code that Victron provides to establish Modbus TCP communication to the Carlo Gavazzi meters and other meters. Now the Multiplus reads permanently both the solaredge inverter and grid meter data and write them into the dbus so the values are available on the VRM and via modbus tcp on the Multiplus. The meter value provided by the solaredge meter is used directly by the ESS loop. I still need to do some fine tuning because the cumulated grid import and export energies on the VRM are wrong but this is due to the setup of the paths where I store values in dbus. However the power values are correct and ESS works fine. Sometimes, roughly once a day, the Solaredge reset the modbus TCP but I managed to have the Multiplus reestablishing the communication automatically so it does not go to passthru mode. This has been working for 4 months without any issue. If anyone is interested, I am happy to provide the code of the modules and some instructions how to use them. Just let me know.

Kind regards

JM

3 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

daniel615be avatar image daniel615be commented ·

Hi dubsan,

I'm interested !

I've a SolarEdge PVInverter with a meter that measure the Import/Export at grid. (Like you)
Currently I've the information of my PVInverter, but I wish to get the data of the meter into the dbus too.
Once on the bus, normally I will be able to retrieve these new values through MQTT.

My EV-plug is connected between the grid and the AC-In of my (3x) Multiplus-II.
With the SolarEdge metter, I will be able to calculate (more accurately) the consumption of the EV-plug.

Thank you.

0 Likes 0 ·
maikelk avatar image maikelk commented ·
@dubsan could you please share your code?
0 Likes 0 ·
Gonzalo chain avatar image Gonzalo chain commented ·
Hi JM, I have been reading and researching how to overcome the issue of Cerba GX with Pylontech and Solaredge and seems you got a great solution and your system seems to be like mine. I have also a solaredge grid meter for teh solaredge PV and now that I installed Victron, I installed a ET112 Carlo Gavazzi at GRID entrance to the house. I am still working through the installation process and what I cannot see is the Solaredge PV which seems you solved. Would it be too much to ask you for the code and some instructions as you offered on your post. Thanks!
0 Likes 0 ·
kyros32 avatar image
kyros32 answered ·

Hello everyone,

I wonder why power setpoint write variable is NOT implemented like it’s the case with Fronius. One ET340 and it works flawless with Fronius.


In Solaredge setup you will run into problems when:

- you want zero export limiting

- gpio can either have function of APS or external production limit - that being said you can not assign 2 functions to two different digital inputs of Solaredge - therefore when limiting export via gpio you have to turn on frequency shifting in normal grid tied mode and cross your fingers you have less then 50,2 Hz in your grid.

Lots of problem would be solved if Cerbo could natively throttle Solaredge over modbus - it can not at the moment. Someone managed to overcome this? Because if Cerbo uses the only one client slot for Modbus we cant even use BMS to solve this. Very troublesome.


Thank you.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

kyros32 avatar image
kyros32 answered ·

@mvader (Victron Energy) @Guy Stewart (Victron Community Manager) Guys, sorry to drag you like this into this topic, but it seems, that Power Throttling is not working when in on-grid mode via Modbus. I reported this on Github:

https://github.com/victronenergy/dbus-fronius/issues/6

On github, there is a mention, that Solaredge does not publish datapoints for power throttling on Modbus, but Solaredge definitely has this option quite intelligently integrated since 2018- please see the file: ramp-up_down_and_active_power_control_02-01-19.pdf

It is causing lots of issues for us, because we either don't have function with which a distributor can cut production or we have to set frequency shifting in on-grid mode - because Solaredge GPIO can not handle two functions (even though it has 4 digital inputs), which I have described also here:

https://community.victronenergy.com/questions/181198/ac-and-dc-coupled-grid-tied-system-pv-inverter-thr.html?childToView=242343#comment-242343


Could someone explain, why Power Throttling over Modbus is not integrated yet (like it is for Fronius)? If it is - then it did not work for me. If not, please please please add it on feature list - might be a simple fix and for us it saves lots of pain. When we deploy Victron BESS and we have large scale installation, then we need to use Solaredge, because it simplifies everything and by far is the safest solution regarding DC handling.


Thank you.


2 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

toastme avatar image toastme commented ·

Sorry I find slowly into the solaredge bus topics. But the missing import/Export data from the solaredge energy meter, are the same topic right? I read ever everywere "solaredge is Not providing import/Export data on modbus, but they are there

0 Likes 0 ·
Mark avatar image Mark commented ·

Hi,

I replied to your issue on github. I was able to extend dbus-fronius myself and make it work for solaredge inverters, maybe you could help with some testing as I only have access to my own system with a single solaredge inverter.

See this post if you are interested.

Regards,

Mark

0 Likes 0 ·
maikelk avatar image
maikelk answered ·

Hi guys,

i got a Modbus proxy running for sharing the connection to SolarEdge modbusTCP. Home assistant is still reading my SolarEdge but as soon as i add the ip in the PV inverter menu all readings stop. Home Assistant cant read the data anymore and so cant CASmodbusScanner.

Any clues about this? Running 3.14 on my RPI with VenusOS

1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Harold Halewijn avatar image Harold Halewijn commented ·
This is all due to SolarEdge not providing more than 1 modbus connection. It has nothing to do with Victron. You can only solve this by running a modbus proxy and let Victron as well as other services talk to that proxy. And you must absolutely make sure that no other device is communicating to your SolarEdge device or you will loose that one connection. switch them off and first start the proxy.

If you want throttling, you could use the RRCR interface on the SolarEdge inverters. That works. You can set up 4 points, let's say 0%, 10%, 50% and 100% by using the 2 Cerbo switches. If your want finer control, use Shelly relays instead.

0 Likes 0 ·

Related Resources

Integrating with SolarEdge

Additional resources still need to be added for this topic

Additional resources still need to be added for this topic

Energy Meter Selection Guide

Modbus TCP Basics