TWCManager
TWCManager copied to clipboard
Adjust charge rate based on real-time pricing
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.
How frequently do you expect to adjust the charge rate?
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
IIRC, I saw a thread on Reddit where the provider gave pricing in 5-minute increments, published an hour in advance.
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.
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
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 honestly it's really just a hack that I've reverse engineered! Hopefully they are working on a real API
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/
I'll take a look, @mattiasclaesson. Thanks for the API reference!