• General
  • Battery discharge logic bug report

I think there's a missing logic in the API commands that go out when WW decides that the timed discharge should not take place.

I have a daily smart timed charge in the early morning followed by a conditional timed discharge from 17:05 to 19:00 (peak selling time rate).

Today the battery performed as follows:

Based on the following (correct) decision pattern of WW:

The battery charged ok to the calculated 31% based on a 13.0 kWh solar prediction for the day.
The prediction was not the reality and the system only generated 1.8 instead of 13.0 kWh today - too bad, weather predictions remain predictions. (Usually however it works fine - which is why I did not yet encounter this bug before).

5 minutes before the planned timed export (17:00), WW ran the logic to verify whether discharge should take place and because the battery was only at 19% it correctly decided not to activate the discharge schedule, but it did send out two other API commands, and that's where it went wrong:

At 17:00:05 and API command was sent to disable DC discharge
At 17:00:06 the battery reserve % limit was changed from 4% to 20%

This caused the system to start pulling energy from the grid (at it's most expensive rate) and not using the available remaining battery capacity.

I discovered this and at 18:00:02 manually reset the battery % limit back to 4%. At that point (clearly visible in the graph) the house started pulling back from the battery.

Bottom line: when for whatever reason the battery ends up being lower than the target starting SOC for a timed discharge, WW should not touch the battery % limit which it reset each time at the end of a time discharge back to the original value. It did that in my case at 18:58:56 the previous day at the end of the timed discharge window (correctly):

@admin : kindly review this logic - this needs a fix

    JMA Thanks for reporting, we’ll look into that.

    • JMA likes this.

    JMA I see, this is a side effect of the disabling of the discharge schedule. As per @SilverArt post as well.

    We'll roll out a fix to drop that to 4% when the discharge schedule is being disabled.

    • JMA likes this.

    Should be fixed now from version v0.3.244 onwards. @SilverArt @JMA - thanks for reporting!

    • JMA replied to this.
    • JMA likes this.

      admin Thanks ! How did you fix it ? By hardcoding 4% in it or by leaving it at the value at which it was reset at the end of the last timed charge ?

        JMA Had to be hardcoded back to 4% for this specific scenario - snapshotting values etc. is something that we're looking at - especially because Giv is rather lacking in that area, but Octopus Agile integration is our current focus.

        • JMA replied to this.
        • JMA likes this.
          10 days later

          admin
          I've been monitoring the decision making process of WW for the last 1.5 weeks w/o making any changes and I've seen a number of possible permutations of SOC before charging, before discharging, with different PV predictions. It seems that WW is now really doing what I'm expecting it to do.
          Just reporting back here that all is fine. If I see anything unusual, I will report back.
          Once in a while I run into an inverter timeout - which I assume can happen.
          I'm now eagerly looking forward to your next development: SMART discharging ☺️

            JMA The timeouts are annoying yeah. We have a retry mechanism (try up to 3 times) with a backoff factor, but there's very little else we can do about those.

            Just wish the inverter APIs would be more resilient.

            • JMA likes this.

            Hi. I am quite new to WW. Discovered it googling for solutions to write to Growatt settings via Home Assistance. And it seems to do the job in a more safe way than I, fiddling with yaml and pyton. Thanks for that.

            Reg. growatt time-outs and other strange behavior, especially when trying to change parameters in settings. Their language and nomenclature does not help either.

            Currently I have a lot of questions reg. WW, but I will spare You and give it some time. I'll figure most of it out using it. I have a wish tough: Could You find the time to write suggestions how to set parameters given battery size and consumption? And perhaps how to preserve battery life?
            My setup:
            Growatt SPH10000
            ARK-2.5H 12.5 kWh
            6.4 kW cells

              perfrank Hi - hard to say. Are you looking at parameters for charging or discharging? And which values/settings in particular?

              Trying by doing is usually a good way of finding out, but let us know which settings specifically.

              On a side note - the Growatt Inverter Timeout unfortunately is not something we have control over. We come across that too. 😧

              In Denmark we have a 3 step model for transport tarif. Night is cheap, 0.15, and peak (17 to 21) is very expensive, 1,4 DKK. So grid charge is simpel: Only at night.

              Feed in prices are spot price -0.05. So my ambition is using as much as possible of the PV myself, not exporting.

              HA is controlling usage of energy (gas or el) for all loads with long time constants: Boiler, under floor heating and freezers. When exporting, more loads are switched on electricity in stead of gas. Yes, I know, not all have these possibilities, but I build much myself, and today I am very happy, that I spend the extra time and money (not much) in flexibility.

              What I whished I had was a sort of "Start-up guide". But WW is not that complicated and I more or less figured it out. I still wish some advice on LiFePO4 batteries. What is reducing life expectancy? How fast should you charge? To max? And how low should you go? Some of it is probably build into WW algoritmes, I guess. But I like to know more.

              Best, Per

                perfrank Thanks Per - Wonder Watt will try and spread out the charge over the window you have allocated, which means it will lower the charge rate.

                I've heard it's good to not always charge or discharge at max rate. Not sure whether there is any data out there or tests someone has done, but it kind of makes sense to me.