Fine grained control of discharge time and level

11 comments started 2024-11-18 last 2024-11-18
Home AutomationHome Assistant
W
#1 Weasel

Hi
I have a 13.5AIO + GW system that is behaving exactly as I expect and I am keen to experiment on ways to maximise the return. My system excludes two high-power circuits in the house

  • The cooker
  • A large studio in the garden that has a heat pump plus a 10l hot water tank with a 2kW element

so in the event of grid failure and the AIO going into island mode, I lose these 2 circuits. I also have solar panels and a 3kW inverter. I am on the Cosy Octopus tariff with fixed export at 15p/kWh

My desire now is to be able to force discharge when I am using the cooker so that my stored electricity is used in preference to importing at peak rates.

I am thinking of a simple (initially time based) automation that sets the discharge limit to 2.5Kw and then does a manual export for a defined period. I am hoping that this would mean that I am exporting enough to cover my cooker consumption and the rest can be exported at 15p/unit. This would hopefully avoid me being charged 36.46p/kWh for cooking my evening meal. In reality, this is more of an academic exercise rather than a financial necessity, but its the sort of thing that intrigues me.

Does this sound feasible/plausible? If so I am guessing that I need to study the predbat API in order to be able to set the required overrides. On the other hand, maybe I should simply set up the inverter discharge limit as a permanent thing and simply do a timed export from 5pm-7pm to keep things simple.

If I can automate through a HA time-based trigger, then I would be tempted to install a power-monitoring breaker on the cooker circuit and use the power-draw to trigger the discharge etc

D
#2 DD

Weasel On the other hand, maybe I should simply set up the inverter discharge limit as a permanent thing and simply do a timed export from 5pm-7pm to keep things simple.

If you have plenty of battery to get you through the day, this would certainly be a straightforward approach. And exporting excess to the grid around this time is certainly helpful to the grid, even if you don't benefit financially from it. (Though avoiding import does help you, of course.)

I'm not a user of predbat, but I think its focus is on predicting power requirements, whereas arguably you want something more responsive. Also, predbat probably wants to see the consumption, whereas (I assume) it simply doesn't register on the givenergy stats. But I'd think you can configure it in ways to force it to behave as you want, such as telling it the export price is, say, 50p/kWh during the period you want to cook, to encourage it to export then. But just GivTCP on home assistant may be enough to give you what you need.

(Are you already a user of home assistant / predbat ?)

One approach I've heard of is to get a Shelly power-monitoring device - basically a CT clamp with a wifi interface ? - which would let you measure grid activity. That could not only let you detect when you start/stop cooking, but also let you fine-tune the discharge power. (That could presuambly also feed into HA and let you adjust the output power.) That wouldn't require any wiring changes - doing it as a breaker would be more accurate, but is more intrusive.

W
#3 Weasel

Hi DD and thanks for the thoughts - I already use HA and predbat, so I would prefer to leverage those rather than simply use the GivEnergy web portal. I can imagine that using both together might confuse predbat a bit.

As for measuring power usage on the circuit. The studio already has a power monitoring breaker and I assume that this is more accurate than a CT clamp and it I am happy to let a qualified sparky install/swap the breaker. The studio and cooker are on a separate consumer unit that has its own isolator switch, so I don't even need to lose grid power (although I could and simply use the battery).

I can easily (I hope) set a limit for the discharge limit - although I have not yet looked into it and I know I can manually set some discharge periods in predbat, so I may well almost be there.

Predbat currently estimates that I will have about 94% capacity at 17:00. so I could export 6kWh between 17:00 and 19:00 and still have enough left to make it until 22:00 (my next cozy period)

G
#4 geoffreycoan

Weasel As DD says, Predbat is more about predicting battery usage and managing the inverter activity accordingly.

You can turn it into read only mode if you want to manually override the inverter activity, and you can manually change the inverter settings but the next 5 minute run of Predbat will change the inverter settings back to what the plan says so this latter isn’t a permanent solution.

In terms of detecting the oven load, as @DD says, use a Shelly EM monitor. They’re expensive for what they are but basically they are a wifi connected device that has two CT clamps that you put around the cable in the fusebox. I gave three of them, monitoring 6 circuits including my ASHP, FIT array (not otherwise integrated to HA) and my Oven. You basically get a live power sensor and a ‘total energy’ sensor; wrap a utility meter around the latter and you’ve got a ‘energy today’ sensor.
There’s a 50A and a 20A variant of the CT clamps. I think my oven uses the 20A variant.

Probably the best way to manipulate Predbat’s behaviour is to set select.predbat_manual_force_discharge to the ‘now’ time slot and this will force Predbat to do a discharge for the 30 minute period. If your cooking time is predictable then you could automate this, or use a trigger mechanism. As well as the CT clamp EM1, Shelly also do a bluetooth button (would need an ESP32 bluetooth wifi node), or zigbee buttons also available - the idea being pressing the button starts the automation to change Predbat mode

Lots of ways to do this.

W
#5 Weasel

geoffreycoan thanks for the thoughts. I have set up manual discharge slots in PredBat for this evening and will see if that works simply by looking at the GE app to make sure it is discharging (and at the rate that I set)

I can live with fixed discharge slots for the moment ie. until I change the RCB for a "smart" one, but if the principle works with fixed slots, I will take your suggestion on board and build a triggered automation based on a spike in the circuit load

W
#6 Weasel

Well that didn't go as planned. I set up some timed discharge slots in PredBat, and nothing happened so I was left scratching my head.

Then the penny dropped. I currently have PredBat set to control charge only, so my efforts to use it for discharge would of course be ignored. How silly did I feel?

My choice now is to either use the timed discharge slots in the GE portal or else in PredBat, set my export rate to zero, set it to control charge AND discharge and attempt some timed discharge slots in PredBat again

C
#7 CW

Weasel My choice now is to either use the timed discharge slots in the GE portal or else in PredBat

I'm sure I read somewhere that the warranty on the battery is affected in someway if third party applications control it (I can't find the post on here, but thought I would flag it anyway for awareness)

W
#8 Weasel

CW noted thanks

G
#9 geoffreycoan

Weasel Then the penny dropped. I currently have PredBat set to control charge only, so my efforts to use it for discharge would of course be ignored. How silly did I feel?
Doh ! 🤦

My choice now is to either use the timed discharge slots in the GE portal or else in PredBat, set my export rate to zero, set it to control charge AND discharge and attempt some timed discharge slots in PredBat again

If you are using Predbat and set a timed discharge slot in the GE portal then I’m pretty confident that Predbat will override any commands you put in the GE portal. If it finds the inverter isn’t doing what it expects the plan to say then it will reset the inverter back to the plan, i.e. Eco mode.

I wouldn’t recommend setting the export rate to zero, I’ve never tried it but I suspect that Predbat still wouldn’t export because there is no financial advantage to do so. Predbat is a cost optimisation engine so exporting has to have a financial benefit whereas preserving the SoC for use by the house clearly avoids import costs so retaining the SoC would be beneficial if export=0.

You could (in an automation) set Predbat to charge and discharge mode just before your timed export period, then set it back to charge mode only afterwards

CW I'm sure I read somewhere that the warranty on the battery is affected in someway if third party applications control it (I can't find the post on here, but thought I would flag it anyway for awareness)

I think the wording is that there is a warranty exclusion if you participate in “automated electricity trading” (or something similar). So things like Octopus Intelligent Flux where you are not in control of your battery would take you outside the warranty conditions.
GivEnergy allow you to control the battery via third party apps or API’s, after all they publish the API’s on their website!

V
#10 Vestas

geoffreycoan So things like Octopus Intelligent Flux where you are not in control of your battery would take you outside the warranty conditions.

Which is interesting given Octopus still installed GE systems at the time the warranty T&Cs changed. It was around the same time they spammed everyone for Axle Energy if anyone needs a reminder.

W
#11 Weasel

geoffreycoan changing the PredBat mode sounds just like what might be needed. I will try that