hoylabs / OpenDTU-OnBattery

Software for ESP32 to talk to Hoymiles/TSUN/Solenso Inverters, VE.Direct devices, battery management systems, and related peripherals
GNU General Public License v2.0
301 stars 63 forks source link

add Modbus Sunspec compatibility to opendtu-onbattery #1150

Open AloisKlingler opened 2 months ago

AloisKlingler commented 2 months ago

this implementation is (maybe only partially) modbus-sunspec compatibility to simulate a sunspec energy-meter.

to have calculation (especially self-consumption) correct for e.g. fronius solar web you need to either place a 300€ fronius smart meter before each "foreign" inverter.

With this PR it is possible to configure OpenDTU with it's IP-address as a "Smartmeter" on Fronius Gen24 or Fronius Symo inverter. so the Fronius Inverter is able to poll current production and overall production continuously like a from a real fronius-smartmeter.

necessary configuration on OpenDTU: image

configuration on an Gen24 Inverter: image

visualisation on an Gen24 inverter: image

visualisation of the additional "Smartmeter" in Fronius Solarweb as "Additional AC Source": image

visualisation of the "Smartmeter" data in Solarweb is available as common curve like other inverters are: image

for my OpenDTU (and also some other users of photovoltaikforum.com) this implementation is running now over a year (more or less) flawless.

to the PR: the tree conflicting files webapp_dist/* need to be resolved on merge. other conflicts I could solve.

spcqike commented 2 months ago

thanks for your effort.

another thing, it would be good, if your changes would be based on helgeerbe:development or :master, too.

right now, your changes are based on a fork of the upstream project, which makes it difficult to compare or include as there may be many more changes than you actually want to add.

On the other hand, it is now only "+278/-3", which is much less than the previous "+3,652/-2,191". So I think the developer can work with that.

AloisKlingler commented 2 months ago

thanks for your effort.

another thing, it would be good, if your changes would be based on helgeerbe:development or :master, too.

right now, your changes are based on a fork of the upstream project, which makes it difficult to compare or include as there may be many more changes than you actually want to add.

On the other hand, it is now only "+278/-3", which is much less than the previous "+3,652/-2,191". So I think the developer can work with that.

I am sorry for the confusion I recognized yesterday that the implementation is already a at least SunSpec meter compatible implementation. It looks like (at least) fronius inverters then only have additional checks for e.g. vendor to allow them beeing configured.

In a yet (in my repository) not commited change I created configuration for the necessary sunspec fields so it may be compatible with other inverters which do the same.

I will update this PR as soon as I have tested all the changes well enough.

AndreasBoehm commented 1 month ago

There are still a lot of unrelated changes, please make sure that you base your branch off of the OpenDTU-OnBattery development branch.

to the PR: the tree conflicting files webapp_dist/* need to be resolved on merge. other conflicts I could solve.

Please do not commit any file within webapp_dist/. This is done by the upstream project OpenDTU but within the OnBattery repo we don't do that, not sure why but i can imagine that its because of the conflicts that would arise constantly.