DESS imports from the grid unexpectedly when it rains!

When the DESS plan assumes that PV will cover consumption, but then it rains, DESS starts importing from the grid. This happens because when DESS is in “idle” mode (no change in SoC planned) DESS disables battery discharging, so when PV falls below consumption import happens. This happens even though battery is >80%, current price is high and scheduled discharges are planned for later in the day.

This is one example of where the plan makes sense (based on forecasts), but DESS is not adjusting to actual conditions i the way you would expect. As a customer you expect DESS to be an extension of ESS (that adjusts to grid pricing), so it is unexpected when grid import happens in these cases.

See: dbus-systemcalc-py/delegates/dynamicess.py at master · victronenergy/dbus-systemcalc-py · GitHub

This “idle” implementation also means that import happens if a scheduled discharge completes before the relevant slot ends and there isn’t enough PV to cover consumption.


Today is very cloudy and DESS plan again assumes PV to cover loads when the reality (based on actual pv and loads) is that it can’t, and so “idle” mode is again importing! As we move into autumn and winter this will be more of an issue than in the summer resulting in importing at expensive rate during the day.

Given this, I’ve made some adjustments to dynamicess.py and am currently testing them, so far though I’m seeing a significant improvement.

What I don’t know yet, is if/how things will adjust to a lower SoC than expected. i.e. if it will re-plan and adjust to the new reality, or want to charge back up to expected SoC.

@dfaber Please review and share your thoughts: Use self consume as part of idle strategy when actual pv and/or consu… by dfeist · Pull Request #10 · victronenergy/dbus-systemcalc-py · GitHub

First day on DESS trade mode.
This is annoying, DESS is importing when SOC is at 100%


Was PV forecast > 1351Wh for that hour slot? If it’s the same scenario as me, you could try updated dynamicess.py I shared in link above and see how you get on.

I’ve looked ad dynamicess.py on github. Is it a matter of the red lines out, and the green lines in?

Forecast solar was 1.07 kWh for that slot. At the end is was only 0.23 kWh.

yes. Athough it might be easier to backup your existing file and then just grab the whole file with changes: https://raw.githubusercontent.com/dfeist/dbus-systemcalc-py/refs/heads/dfeist/idle-selfconsume/delegates/dynamicess.py

This doesn’t fix all the issue with trade-mode but does resolve the issue where:
i) No change in SoC scheuled (idle)
ii) PV > consumption was assumed but doesn’t transpire.

I don’t know if you’re seeing it too, but the other related issue is that is imports in a discharge slot, if the discharge completed before the end of the slot.

I’ve fiddled with a few other thing locally too, but I’m now finally getting full days with 0kWh import at high tarrif, even with reduced PV output vs forecast.

I will use your file later this evening (I’m selling now).
Will you notify in this thread that you’ve made changes to the github file?

So that was scarry.
When rebooted the status of the MP2 changed from off, in passthru, off etc etc.
Few moments later the status became discharging.
Target SOC is now set to - - -. Before file change it was 75% (after a discharge to 75.6%)
So looks like no import for now.
Will see what it will do at 21.00 hr.

What did you reboot, just cerbo? Also, you need to be on latest beta firmware to ensure no conflicts. The fixes I’ve currently uploaded only deal with pv<consumption during idle slots, so you might not see any difference until tommorow.

Yes just the cerbo. I’m not on beta, so this for now is not working for me.
I’m going to change back.