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

[Request] DPL inverter set/get compensation #1314

Open gitisgreat2023 opened 5 hours ago

gitisgreat2023 commented 5 hours ago

Is your feature request related to a problem? Please describe.

See the issue in this discussion. In DPL, when the set limit value for the inverter doesn't match the actual value, the target value isn't reached.

Describe the solution you'd like

A set/get compensation for each inverter.

Describe alternatives you've considered

I implemented a set/get compensation in a Shelly script, added the difference between the set limit and actual produced inverter power. Every 5 seconds I update that value, thereby avoiding oscillations due to the response time of the inverter setting a new limit. This solution works perfectly fine now for four weeks, applying it on two inverters individually working parallel on a shared battery.

As I currently anyway already need the Shelly script to distribute the power on the two inverters, I'm happy with my current solution. But others could profit from having it available in OpenDTU-OnBattery itself, for example if there is for some reason an asymmetry in the inverter strains (not equal cable lengths etc) which typically causes a set/get mismatch.

Additional context

The DPL convergences to the target value if and only if the get (read) value from the inverter is indeed accurate. If for example cable losses between the output of the inverter and the meter are substantial, the target value won't be reached accurately. I also didn't change the 5 secs over the 4 weeks period, it might be for these relative small changes (say max 100 W) the timescale the inverter reacts is shorter. I didn't study that.