TWCManager icon indicating copy to clipboard operation
TWCManager copied to clipboard

Adjust charge rate based on real-time pricing

Open ngardiner opened this issue 4 years ago • 9 comments

Based off of Amber: https://www.amberelectric.com.au/pricing

The idea is that instead of increasing/decreasing based on green energy generation, the charge rate could be increased/decreased based on proximity to a target maximum real-time wholesale price. This is more a generic concept rather than an actual implementation as amber do not yet have an exposed API, but a module template to do this would be useful as I am sure there are similar platforms globally.

ngardiner avatar Jul 01 '20 07:07 ngardiner

How frequently do you expect to adjust the charge rate?

AndySchroder avatar Jul 03 '20 03:07 AndySchroder

This particular provider changes the rate based on the prevailing wholesale rate for a given region on an hourly basis, although I could certainly foresee cases where the rate would be more real time than that, so it might be a matter of leaving polling interval to the individual interface

ngardiner avatar Jul 03 '20 03:07 ngardiner

IIRC, I saw a thread on Reddit where the provider gave pricing in 5-minute increments, published an hour in advance.

MikeBishop avatar Jul 08 '20 19:07 MikeBishop

What I am thinking as a starting point would be to add a module class (Pricing) which then obtains real-time pricing data from an API interface. Generally I would expect the two key values of interest would be Import and Export prices, with a cent per kWh rate for each. Since this involves currencies there is every chance it could be much more complex than I am envisaging, but the idea would be:

  • Track the import and export pricing
  • Make this available to the policy rules

Two examples of where this could be useful:

  • Reduce / stop charging rate as export rate rises (more efficient to export than to consume)
  • Reduce / stop charging rate for non-green energy as import rate rises

In some instances, the import rate has the capability to rise into the dollars per kWh range where grid demand is beyond supply. In such a case there could be a cut-off where we just stop communicating with all slaves to ensure no charging occurs during the excessive pricing period.

ngardiner avatar Jul 11 '20 06:07 ngardiner

I use amber and adjust my charging based on pricing... They also helpfully give a green-yellow-red rating on the current price vs upcoming prices. I can show you how I query their api

mattclar avatar Aug 31 '20 14:08 mattclar

Hi @mattclar - I'd certainly be interested in knowing more about interacting with the Amber API. It might make for a good framework as more providers offer flexible rates and real time APIs

ngardiner avatar Sep 02 '20 12:09 ngardiner

@ngardiner honestly it's really just a hack that I've reverse engineered! Hopefully they are working on a real API

mattclar avatar Sep 02 '20 12:09 mattclar

This is something that would be nice to get in place!

My provider tibber has this api to query for past, todays, tomorrows prices. Each hour has a dedicated price. https://developer.tibber.com/docs/overview They buy and sell at this same price.

There is a integration for home-assistant also https://www.home-assistant.io/integrations/tibber/

mattiasclaesson avatar Jan 08 '21 08:01 mattiasclaesson

I'll take a look, @mattiasclaesson. Thanks for the API reference!

ngardiner avatar Jan 09 '21 00:01 ngardiner