question

toastme avatar image
toastme asked

Why Cerbo gx/Venus not read all data from Solaredge Modbus tcp? Imort, export, grid, consumption

Hello to All out there!

I think I know why it is not possible yet. But why can't victron implement it? The data is available on the modbus (see pic)

On my Cerbo I can only see solar production.

Yes, I read alot about workarounds. But beside that I have not enough space for a second energy meter and not able to programm modus proxy servers and things -it seems so easy to me that Victron read that parameters as standard.

Should I raise a idea for that. Or is it really technical not possible for the cebro/venus to read "everything" over modbus from the Solaredge Inverter?

Thanks for hints and regards!



screenshot-20231227-092531-solarmon-try.jpg

cerbo gxVenus OSEnergy MeterModbus TCPsolaredge
2 |3000

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

5 Answers
matt1309 avatar image
matt1309 answered ·

Hi @Toastme


I dont own a solar edge inverter but just to understand what you're looking for. The PV data is provided to gx device without issue I gather?

But what you want is for the grid data also to be passed to gx device so you dont need to install a second grid meter? Is that correct?


I suppose the argument is going to be use Victron as the main system and change the solaredge meter with a victron compatible one. Given solar edge probably doesnt need the data whereas victron does (to balance charge/discharge to get grid setpoint to 0 or whatever you set it to)


Quite a niche scenario you've got there where you want the system that is supposed to be a secondary system (ac coupled PV system, I'm assuming solar edge system doesnt have battery when i say this) to provide what is seen as the primary system (the battery/off grid system) the data it needs to function.


I was going to say it's probably an easy tweak to the gx device (venus os) drivers to setup but I've had a look in venus os and cant find the driver responsible for solaredge data.


For someone more familiar with venus os i imagine it would be an easy feature to add. I'm probably looking in the wrong place. I was looking under dbus-modbus-client but that might be modbus-rtu rather that tcp connections.

Anyway what i imagine someone would need to do is atm victron have got solaredge entering data in pvinverter dbus path. They would just need to set it up to also send data to grid meter dbus enter and pass that modbus value through as well. Once gx device has that info the rest of the info in your diagram is calculatable from within gx device


If you can find the driver on venus os that does the solaredge -> pvinverter part I'm happy to help tweak it to get the functionality you're looking for.


You may get more responses to this query in modifications section.

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 answered ·

Hi @matt1309,

thanks for your detailed explanations!

- Yes, I can see data from the inverter on cerbo but not the grid data

- changing the meter is no option. Solaredge technicians are hardly not available and expensive. And with an other electrician I expect I'll lose warranty on the system. I would like to have a separate running storage system

- I see the ESS as secondary system. relaying on date from the inverter/grid meter it is charging or discharging. Is that wrong?

So I'll try to place that (what you described about drivers) in de mod-section. Sadly not understand everything and not able to "search source code about my problem". Maybe the problem is that for Solaredge the "fronius driver" is used -I read something about that.

By searching infos about my problem I thought a lot of people have the same problem. But maybe it is a German problem or not enough people try to solve that scenario without a second energy meter or solution over a third computer.

regards,

toastme

2 |3000

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

matt1309 avatar image
matt1309 answered ·

HI @Toastme


Who is installing the ESS system? Could get them to add an additional meter either before or after solar edge one. You could just to ET112 -> solar edge meter -> consumer unit. That's probably the easiest and wont impact either systems warranty (tbh I'd be surprised if removing a meter that is purely for data, assuming it is purely for data will void warranty).


Normally you would say ESS is primary system as it handles critical and non critical loads, how much to charge/discharge the battery to balance grid usage to 0 (or whatever grid setpoint is). The solaredge system (assuming there's no battery) is just providing solar power. It doesn't really control anything just converts DC PV to AC.

I'm not familiar with solar edge but if there's no battery then the meter in my opinion is likely just for data recording, and if you've installed ESS that data will now be wrong as it's not aware of the battery being installed. So solar edge is likely calculating house usage the same way victron would ie solar produced - grid meter data = house usage.

However now you've got ess, the solar edge calculation isnt going to be aware of the battery so it's calculations will be wrong (as it's missing the battery data). it'll end up showing house usage to be equal to solar production (assuming battery isnt full).



I've just had a look the fronius driver is written in c++ rather than python (so would need to be edited and recompiled). A bit more involved than I expected. It also looks much harder to navigate the code to me (but my c++ is even worse than my python, very much a beginner):

victronenergy/dbus-fronius: Venus OS driver for Fronius PV Inverters as well as other Sunspec ModbusTCP compliant inverters (github.com)



An easier option might just be to make a custom driver from scratch in python. There's some decent examples out there you could start with and just tweak. Shelly ones are probably a good starting point.

dbus-shelly-3em-smartmeter/dbus-shelly-3em-smartmeter.py at main · fabian-lauer/dbus-shelly-3em-smartmeter (github.com)


You'd need to tweak the getShellyData function. Shelly devices provide data via http endpoint whereas it sounds like solaredge uses modbus tcp data. Once you've got that all you'd do is tweak the meter_data so it's in the same format as shelly and the rest would just work.


The only downside then is half the data would be received via c++ fronius driver (the solar elements) and then the meter elements would come from the python driver.


EDIT:

Here's an example of reading solaredge modbus data in python. I believe you're using modbustcp so you would need to replace the shelly get data functions with elements of the below

GitHub - nmakel/solaredge_modbus: SolarEdge Modbus data collection library



2 |3000

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

matt1309 avatar image
matt1309 answered ·

Hi @Toastme


I've done some more reading. I would suggest creating a meter similar to the carlo gavazzi script that's used by gx device to get data for em24 energy meter and tweak it to work with Solaredge.


I'd offer to help write this but i dont have a solar edge inverter to test it on. You'd essentially have to edit the register addresses in this link (and rename it to something like solaredge), so that it would get the updated data. Then you'd include solaredge.py in the dbus-modbus-client.py file for it to be loaded.

https://github.com/victronenergy/dbus-modbus-client/blob/0230e0c4a35404b3db6b279a3a4939d3535c0bbf/dbus-modbus-client.py

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 answered ·

Wow, thanks for your effort and that sounds very good -but I don't understand it. I even haven't known that it is possible to enter the cerbo file system... and that is more than I can do between work and kids. I'll try to get into this but don't expect a respond within weeks. Sorry

I hoped that victron gives a kind of support and implement that in future.

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.

matt1309 avatar image matt1309 commented ·

No worries, if i get around to making a draft i'll let you know. (I'd pretty much just be copying the EM24 code but swapping resigters from carlo EM24 energy meter to whatever registers seem to be the equivalent on solaredge modbustcp.


Just read another topic on here looks like solaredge only allow one connection to their modbus network (and the C++ PV inverter code will be said connection, so my above comment on writing it in python wont work)

0 Likes 0 ·