Same issue here, System sells to grid and comes to min SOC. Then it starts using the grid.
One of my mitigations which seems to work somewhat is to lower in DESS the battery capacity. I think the victron setup is too optimistic about the efficiency and discharges maybe more than it expect.
But the real solution is a differrent min soc for the DESS. It should not sell all the way until the regular min SOC, as in the greenmode it should favour self consumption. So if on a day I have excess, I want it to sell the excess (at the right time maxiumizing value), but it should not sell all the way to min soc, so I need to buy from the grid.
I think I got the desired behaviour by modifying /opt/victronenergy/dbus-systemcalc-py/delegates/dynamicess.py
I set the minsoc for selling 20% higher by changing this line (adding the + 20):
elif self.soc - self.discharge_hysteresis > max(w.soc, self._device.minsoc + 20)
So in my case, I have minimum soc at 15%, with this modification, DESS stops selling at 35%
# if flags are EXCESSTOGRID and MISSINGTOBAT, that means: keep a MINIMUM dischargerate, but allow to discharge more, if consumption-solar is higher.
# not allowed with bat2grid restriction
# so, we do some quick maths, if loads would require a higher discharge - then we let self consume handle that, over calculating a "better" discharg>
elif self.soc - self.discharge_hysteresis > max(w.soc, self._device.minsoc + 20) and excess_to_grid and missing_to_bat \
and not (int(restrictions) & int(Restrictions.BAT2GRID)):
self.update_chargerate(now, w.stop, self.soc, w.soc)
me_indicator = available_solar_plus - self.chargerate
if me_indicator < 0:
# missing, let self consume handle this over calculating a improved rate.
reactive_strategy = ReactiveStrategy.SELFCONSUME_INCREASED_DISCHARGE
else:
# excess, ensure the minimum discharge rate required to reach targetsoc as of "now".
self.override_chargerate = abs(self.chargerate) * -1
reactive_strategy = ReactiveStrategy.SCHEDULED_MINIMUM_DISCHARGE
Where can i find that piece of code?
Does it still work well for you?
@matthijsb as per the post, you can find that on your cerbo device in the file /opt/victronenergy/dbus-systemcalc-py/delegates/dynamicess.py
But this file is overwritten with every update. So you need to apply it every time again you update the firmware.
As I run the beta which updates a lot, I found that it is easier to set the Limit system feedin to something very low (50) using node-red (based on the SOC < 50%) is an easier way to archieve the same functionality.