Is anyone using Timed Discharge successfully?

44 comments started 2023-01-08 last 2023-01-15
BugsCloud Portal
M
#1 MattWhitfield

Hello all

Following on from a previous post - I don't think 'Timed Discharge' in the inverter settings on the portal works at all. I think if you have 'Timed Discharge' enabled, then the system will just drain the battery whenever it feels like it.

On the portal, the modes are 'Eco', 'Timed Export' and 'Timed Discharge'. The inverter registers that seem to be involved are called 'Eco' and 'Enable DC Discharge'.

Portal 'Eco' mode is enabled if the 'Eco' register is switched on.
Portal 'Timed Discharge' is enabled if the 'Eco' register is switched on and the 'Enable DC Discharge' register is on.
Portal 'Timed Export' is enabled if the 'Eco' register is switched off and the 'Enable DC Discharge' register is on.

So, in 'Timed Discharge' mode, the 'Eco' mode is always enabled. And, if the 'Eco' mode is enabled, then the system just tries to meet demand from the battery whenever it feels like it, and ignores the start and end times defined in the 'Discharge 1 Settings' registers.

So, I think 'Timed Discharge' actually doesn't work at all, seeing as it will just ignore the times and acts the same as regular 'Eco' mode.

Is anyone actually using 'Timed Discharge' successfully?

R
#2 Rubikcube

The only 2 use cases I can think of for timed discharge, are TOU export or storage transfer.
I have a fixed export tariff and only 1 battery storage system, so I have no need to use timed discharge.

T
#3 Tim

MattWhitfield You don't say what sort of inverter you have and you may have uncovered a bug. My understanding of how the modes were designed to work is:

  • ECO - minimise grid import and export by supplying house load from PV or battery and diverting any surplus PV to battery. If there is surplus PV and battery is at 100% SoC, export up to G98/99 limit.
    -
  • Timed Charge - at the start of the charge window, if the SoC is below the Charge to %, charge to the Charge to % at the Battery Charge Power until SoC is reached, then hold the battery at that level until the end of the charge window. If the SoC is above the Charge to % at the start of the timed charge window, supply house load until SoC = Charge to %, then hold battery level at that level until the end of the charge window.
    -
  • Timed discharge - hold the battery at the SoC it was at when the timed discharge window was set although if below 100%, allow battery to charge from surplus PV and house load to be supplied from PV (hybrid only). When the timed discharge window starts, supply house load from PV/battery until the timed discharge finishes, then hold the battery at that SoC until the next timed discharge window.
    -
  • Timed export - same as timed discharge except that the inverter discharges the battery at the battery discharge power until SoC is 4% or timed export window closes, whichever comes first.

These descriptions are not facts, just my understanding of how I would expect them to work. If your inverter doesn't behave in this way, it either has a bug, or my understanding is flawed. If the latter and anyone else has better knowledge, then it would help everyone to have my description above corrected, so we can all tell whether our inverter is mis-behaving or bugged.

M
#4 MattWhitfield

Tim Thanks for the reply - could you explain a bit more about what you mean by 'hold the battery at the SoC it was at when the timed discharge window was set' from the timed discharge description you wrote? Because I thought Timed Discharge meant 'do not supply any house load from the battery unless within the time window specified'. But, like you said, I would expect it to charge from excess PV if, say, I had set a timed charge to finish at 50%.

My inverter is a HY5.0 (1st Gen).

T
#5 Tim

MattWhitfield we have the same inverter and I’ve never used timed discharge or timed export because I’m not on a tariff that makes that worthwhile. However, having been reading posts on the forum for over a year, and having been corrected more than once on my misinterpretation of some posts, my understanding of how timed discharge and timed export work (whether by design or not) is that when those modes are enabled, the inverter stops supply the house as though ECO mode has been disabled. During the timed window, the inverter either supplies house load (discharge) or supplies house load and exports to grid (export) until the period ends or the battery is depleted and then stops. If the battery is at say 80% SoC when timed discharge/export is enabled, the battery will be held at that level until the timed period starts. The only caveat might be that the inverter may discharge the battery slightly to keep itself ticking over while it waits.

Eco mode seems to be disabled whenever timed discharge and timed export is enabled. Only for timed charge does ECO operate outside the timed period.

D
#6 Davegreen1

As a follow on question to this discussion; I have set my inverter to:

ECO Mode disabled
Timed charge (charge rate 66%
Timed discharge (discharge rate 66%)
I have done this for battery health reasons as my understanding is that it is not good to leave the battery drained for long periods and there is virtually nothing coming from my PV panels..

Initially, for a couple of weeks, the system functioned as I had set it to function, charging during the night, retaining the charge through the day and discharging in the evening. However, for the last several days (about a week), like Matt I am seeing the battery discharge as soon as a load is put onto the system. What I find, if I return to the inverter settings page, is that ECO Mode has been enabled and Timed discharge disabled. The Timed charge function remains enabled and works as advertised.

I have, repeatedly, reset the inverter (and successfully submitted the settings) to what I want to achieve and it repeatedly reverts to ECO Mode and does its own thing. Yesterday, for instance, I reset the inverter in the morning, checked the settings at 22.30 and confirmed that they were as I had set them in the morning; when I got up this morning the battery was already half discharged, ECO Mode was enabled and Timed discharge disabled.

My question is: is this a software glitch or can there be another explanation for the inverter settings changing without my intervention?

Inverter model: GIV-HY3.6
Software version: D0.490-A0.451

M
#7 MattWhitfield

Davegreen1 Today I am trying out a new thing - which is basically setting the end time of my 'Timed Charge' period to when I want discharge to start. I set the charge target at 95%, there is actually a bit of sun today, which has topped up the battery to 100%. So I'll know later if it starts discharging when I actually want it to...

FWIW, I have had it before where the inverter settings have been reset - but it hasn't happened to me this week πŸ‘

M
#8 MattWhitfield

Tim So what I'm seeing is that eco mode is disabled when 'Timed Export' is enabled, but not when 'Timed Discharge' is enabled. Do you happen to know a good route for reporting bugs?

A
#9 Andygoody

I have starting playing around with this setting, noticed that the wording on the app and on the online portal are different and when i originally set it on the app it didn't work as expected. Upon looking on the inverter on the online portal you need to have the 'Eco Mode' disabled and your 'Timed discharge' enabled.

As with Davegreen1 i have noticed that even with this set it doesn't seem to stick and will have often reset back to the standard 'ECO mode'

M
#10 MattWhitfield

Andygoody I don't think it's possible to have 'Timed Discharge' enabled and 'Eco' disabled. Every time I set it that way, and re-load the portal Web page, it shows as 'Timed Discharge' disabled and 'Timed Export' enabled. First post explains why I think that.

(Edit - at least, that is the case on a HY5. 0 - don't know about other types)

A
#11 Andygoody

This must be a bug then? I would have thought only one option would be available at any time. either Eco or timed discharge.
Is there any GivEnergy Admin on these chats that might be able to help clarify?

A
#12 Andygoody

Dropped the team a chat, this is what they have come back with.
"Sorry for the wait. There is a known issue at the moment concerning eco mode and timed discharge, when both are on, eco mode still allows for the battery to discharge outside of the timed hours. If only timed discharge is on, then the battery will discharge to the grid rather than keeping it for the house load.
13:35
I'm afraid the only workaround at the moment is to turn the discharge power of the battery down to 0 outside of the timed discharge hours and then turning it back up for the time window"
Currently no expected fix date

M
#13 MattWhitfield

Andygoody awesome - thanks for the reply. At least I am not going crazy 🀣

Well, time to bust out the api then, I guess. I will try and integrate it with the octopus agile rates, solcast forecast and see what I can do 😁

Thanks for following up with the team, really appreciate it.

S
#14 stevelewis

MattWhitfield Solcast versus forecast consumption and GE API calls already done in Python if you fancy modifying / adding a module for Agile, give it a go! Code at: www.github.com/salewis38/palm.

G
#15 gonzodad

MattWhitfield did this work? - I was having exact same problems as you and was going to try something similar to beat the system !

M
#16 MattWhitfield

gonzodad 'kind of' 🀣

I had the charge target at 95% and excess solar did charge it up to 100% but then the battery would kick in and Eco it would discharge it back down to 95%. So it sort of worked...

M
#17 MattWhitfield

stevelewis I will have a look - thanks. I am a c# guy by trade, though, so will probably do something in WPF so I can make fancy visualisations...

G
#18 gonzodad

MattWhitfield cool - good, to know. don't think I'm going to be generating any excess pv this time of year, so I'm going to set the timed charged to finish when I want discharge to start and see how that goes.

S
#19 stevelewis

MattWhitfield Nice. My code runs headless to do the sums, set daily charging targets and send commands to the GivEnergy API. Automating the optimal charging regime on an Agile tariff adds another dimension to the puzzle.

#20 TheDragon (GivEnergy)

Please submit a bug report, I see the same on 535 and also on the Beta.

Timed discharge when outside the window, is eco, when the window is reached, it exports at full throttle. So sent in a bug report with screen shots

M
#21 MattWhitfield

stevelewis I'll be interested to see how you went about solving that. It is 100% the most interesting part of it... It is a shame I suck at python because it would be really interesting to bounce back and forth on it.

S
#22 stevelewis

MattWhitfield I always find it easier to read code than to write it!

The approach is to model the battery charge for each 30-minute interval throughout the day, using yesterday's consumption profile and a weighted Solcast forecast. Then reduce the overnight charge target so that the battery charge peaks at 100%, subject to not dipping below a minimum value in the morning.

Optimising for Agile is trickier and would involve selecting one of 3 states (charge/hold/discharge) for each time interval, based on battery charge, generation, consumption, and pricing (downloadable - see https://octopus.energy/dashboard/developer/).

M
#23 MattWhitfield

Yeah, it's an interesting puzzle. How responsive have you found the inverter to register changes? I was wondering how granular the control could be... I am only two days in to Octopus Agile but already I can see that you would need to do it half hour by half hour to optimize it properly...

But the more I think about it, the more I find it interesting. Overnight charge to cover the morning hours, charge from the sun to get back to 100% for the evening peak.

I am glad the EPG applies to Agile, though - I feel a lot more comfortable experimenting!

S
#24 stevelewis

MattWhitfield I write to the registers on the server, which in turn communicates with the inverter. The app controls the inverter using the same method... controlling every 30 minutes is feasible.


D
#25 Davegreen1

All very interesting πŸ˜† but well outside the skill set of the average 76 yr old joe!!

I set my:

Timed Charge to: 01.00 - 06.00
Timed Discharge: Disabled
ECO: Enabled
Battery Discharge Rate: Zero

This morning there has been absolutely nil timed charge and the battery has discharged to 3%. So, I reset the:

Timed Charge to: 10.00 - 15.00
Timed Discharge: 17.00 - 21.00
ECO: Disabled
Battery Discharge Rate: Zero

It is now 10.26 and the battery is Discharging at 2W from its 3% base.

I'm beginning to think that this system was not one of my better investments!!!

T
#26 Tim

TheDragon (GivEnergy) Timed discharge when outside the window, is eco, when the window is reached, it exports at full throttle.

Really? Should this be timed export or does Timed discharge really export at full chuff within the window?

G
#27 gonzodad

MattWhitfield - setting timed charge to a longer period (to 17:00) also worked for me over last couple of days. so load shifting as I want it (charge in Econ7 period, then discharge later in day after PV generation stopped) goes into eco after 17:00 and starts to discharge.

G
#28 gonzodad

update to post above - ECO mode is my nemesis !
as soon as I went out of the elongated timed charge period (17:00) Eco took over and promptly discharged some battery, but then around 21:00 charged it back up again (1kWh at higher octopus rate) and also trickled 0.11kWh back to the grid (I'm not on any export tariff yet!) - I understand some balancing occurs from bat to grid, but every Watts a prisoner as far as I'm concerned..
going to disable ECO and set timed discharge from 17:01 to 23:59 - see how that goes.
BTW I do have a manual tariff setup with ECon7 period and high period, but its a manual givernegy one as could not get the correct one from octopus API (tried key regen, delete / recreate etc) - I wonder if lack of any automation on that tariff is making ECO be a bit pants?

G
#29 gonzodad

.....the circle is complete and now coming up against the issue @MattWhitfield first logged, in that its impossible to have eco off and timed discharge on. system automagically puts it to timed export instead or flicks eco back on.
makes load shifting with ECON7 very difficult.
going to try and reduce discharge power down to a baseline level equal to my lowest load in the evening (around 400W) and hope that will discharge to home from 17:00 to 24:00, fully drain the bat and not push any to grid.
going to log feedback and hope get some movement to resolve.

M
#30 MattWhitfield

Yeah, it kinda sucks. Some sort of app control seems to be the way to go. I am writing my app at the moment, but it will be a while before it is ready for the prime time...

S
#31 stevelewis

gonzodad if you could describe the behaviour you expect for each hour of the day (charge at full power, Eco mode, hold charge, force discharge at full power, etc), I'll see if I can write this into a schedule in Python. Shouldn't take very long, the offer's there 😁

G
#32 gonzodad

stevelewis thanks for the offer Steve, really appreciate it πŸ˜„
I'll see if I can crack it configuring the settings available (today im trying the baseline low charge all day) and see what results I get. May take you up on it IF I get defeated!

L
#33 lee

This is interesting to read. I am having similar issues with timed discharge simply not working although it will if set to full export. I have resorted to limiting battery discharge power manually. Ran into a problem with this though as during a power cut it then caused the system to fault due to the EPS load being greater than discharge limit (EPS load usually <100W so well within the actual limits of the system). The system does not seem easy to optimise with the agile tariff which is what I am ultimately aiming to do.

C
#34 cgoodfellow

lee Yes same here - I simply want to charge my battery during cheap Octopus Agile pricing periods and discharge when expensive. Happy to do this "roughly" by timed charge (e.g. 23:30 to 06:00) and timed discharge (e.g. 15:00 to 20:00), but as said on this thread, the system doesn't lock in those values and moves it to timed export, which I don't want to do. I am trying the "standalone battery" automation under the Smart Tariff section to see if that works better.

M
#35 MattWhitfield

FWIW, I currently have my system set to Timed Charge 01:30 -> 16:00 and Eco, so it just discharges in the evening. Solar generation in the day reduces import and then gets exported. But, because I can't do funky things with it (unless I'm on the portal constantly messing with stuff), I'm also writing some software to control it (basically because I'm a programmer by trade so it's an interesting challenge and I don't use Python πŸ˜‚).

S
#36 stevelewis

MattWhitfield eagerly waiting to see the first cut of your generic scheduler which combines 1/2-hourly tariff data with forecast generation and consumption!
BTW, it's never too late to move to the dark side and dispense with all of those redundant braces and semicolons ;-)

M
#37 MattWhitfield

stevelewis I think it will be a couple of weeks - but I'm building it here: https://github.com/mattwhitfield/Solarverse

I'm trying to find a balance between engineering for simplicity and flexibility. I keep asking questions like 'but what if someone wants to run this in a Docker container in the future' and 'should I engineer it so that it can run on a NAS and communicate with a UI that might be desktop or might be on the web?'. So just trying to get to a point where I can run it as a prototype first.

S
#38 stevelewis

MattWhitfield you've been busy!

I've been pondering how to make my scheduler. The timed periods in Octopus Go are a subset of the Agile solution where the relative value and timing of cheap periods changes daily. Then there's Agile Export to throw in the mix. Running a look ahead with Solcast and forecast load, followed by a best fit charge profile still works best.

I've also found with the various 3rd party APIs is the importance of defensive coding. For example, carbonintensity.org has a year rollover bug so forecasts stop at midnight on Dec 31st when asking for a full day of data.

M
#39 MattWhitfield

stevelewis ...not to mention the GE data - their servers are down pretty often, so I wrote a bunch of code to interpolate the results from the history. I'm going to ignore export for the first pass. I think my strategy is going to be to mark periods where we want to support it with the battery, and aim for the battery to be at the lower discharge threshold at the end of those periods. So then I will work back and see what the charge needs to be in an ideal world at the start of the expensive times. Then, I'll mark any periods which will definitely 'charge' (i.e. price below threshold). Then I should be able to pick the periods with the lowest costs to charge up to what's required. So then, I will have some periods with 'discharge' and some periods with 'charge'. Then, for those that aren't set, I will charge when prices are lower and the projected battery percentage is able to support the extra charge, and discharge in the others.

Still not formed that plan 100%. One thing I do know for sure is it will turn out to be less simple when I start coding that bit!

S
#40 stevelewis

MattWhitfield similar lines of thought here. Any periods with a negative price go in as "AC Charge" before the first pass. There's also a "Hold" state if import cost is flat but you still want to avoid PV export (treat as a timed charge to the current SoC).

S
#42 stevelewis

MattWhitfield For the full list, I think there should 6 states (as charge/discharge at full rate are mutually exclusive):

State 1: Charge Full Power [to target SoC] # Charge (maybe name β€œImport” for consistency?)
State 2: Discharge Full Power [to target Reserve] # Export
State 3: # All within bounds of target SoC and Reserve
State 3a: Charge Eco, Discharge Eco # Eco Mode
State 3b: Charge Eco, Discharge Off # Not implemented – suggest naming as β€œCharge”?
State 3c: Charge Off, Discharge Eco # Discharge
State 4: Charge Off, Discharge Off # Hold

M
#43 MattWhitfield

stevelewis I'm not sure there's a 'Charge Off' is there? If the PV exceeds the domestic demand and the battery isn't fully charged I was under the impression that it would also route that power to the battery. I suppose you could set max charge power to 0 - but not sure what the use case would be?

S
#44 stevelewis

MattWhitfield It could be useful with Agile Export if rates are high and the battery has sufficient charge already and is there for completeness. In reality, it's probably a corner case.