OctopusGo Saving Sessions

This is really just for @Timbones and @mjr 's amusement.

New piece of code for Octopus Saving Sessions. They are offering £2.25 per kWh that we save.

def checkBlockers(self, deviceInfos: DeviceInfos) -> Optional[bool]:

    blockers: Iterable[Predicate[DeviceInfos]] = [


def reasonWeShouldTurnOn():
    if OctopusGo.isSavingSessionSoon(calculationMoment,deviceInfos):
        # We're assuming it's cold because otherwise Octopus wouldn't need the saving session
        return "It will soon be time for a Saving Session so get the house warm in advance."    

Although, having written that I changed my mind because the blocker might just leave it on if it’s already on when the session starts. I’ve done this instead:

def reasonWeShouldTurnOff(calculationMoment: datetime.datetime, deviceInfos: DeviceInfos) -> Optional[str]:

    if OctopusGo.isSavingSession(calculationMoment,deviceInfos):
        return "The heating shouldn't be on during a Saving Session"

ofc I can test the future too:

bash test.sh --calculation-moment 2022-11-22T17:05:16

2022-11-21T22:46:45.118 DEBUG root Turning on so we can do some heating. It will soon be time for a Saving Session so get the house warm in advance. (Power → true from ManageSpaceHeatingPower.manage)

Gosh, using EmonCMS I can see that sometimes I use over 4kWh in the same hour as tomorrow’s window, it’s not my average though.

I haven’t automated the parsing of the email into the OctopusGo class yet :slight_smile:

I’m sure you are nudging things around using your automation too so it’d be fun to see what you decided to do.

1 Like

Yeah, I came up with something similar last week, though not nearly as tidy. I’ll need to be rewriting it tomorrow though I hadn’t anticipated it starting at the half-hour :smiley:

1 Like

I’ve stopped my heat pump turning off at peak and am leaving it two weeks to set a higher average before attempting to do anything with a saving session!

As I’ve written elsewhere, the scheme design is flawed, punishing people who were avoiding peak time altruistically and encouraging load-shifting into peak on non-saving days.


You’re quite right.

1 Like

Yes, this was part of the reason I avoided looking into it more: the principle of telling people to avoid the peaks and be paid £$€ is good. Paying you based on your previous 10 days use just encourages the wrong behaviour.

I thought about how it could be done better, and all I can think is to compare your use profile against the “typical domestic” use profile, scaled to total use, and pay you for the difference in the peak. That way, the nega-watts are more fairly calculated, and actual behaviour change is encouraged. Anyway, I’m off to light the candles for my slow-cooked dinner…

1 Like

It’s worse than you think.

Our house is cooking tea using gas instead of the oven this evening.

Anyway, the saving session lemur is out.