Closed purcell-lab closed 6 months ago
Mark, I implemented code that mapped 30m prices into 1 of 4 tariff rates to give to the powerwall and it wasn't a great outcome.
Only having 4 price bands where each has its own FIT proved too restrictive for 30m changes.
The TBC algorithm really struggled to do predictably sensible actions for me. The old Tesla API also had some rate limits that kicked in at the most inappropriate times.
What's needed is for Tesla to accommodate highly variable pricing with individual FITs.
@purcell-lab based on our previous conversations on TMC, I assume that's for Amber Electric? I plan on adding support for Amber soon, so if that's something you'd want to test send me a note to ziga@netzeroapp.io.
@rob0101 it's possible to configure tariffs with more than 4 price bands, Netzero is currently doing this for Octopus Energy, see Dynamic Electricity Pricing.
Ah, that's interesting. How frequently does Tesla allow you to update the tariff ?
@rob0101 it's possible to configure tariffs with more than 4 price bands, Netzero is currently doing this for Octopus Energy, see Dynamic Electricity Pricing.
Lightbulb.
teslapy.Battery.create_tariff() allows you to create more than four BatteryTariffPeriod() and more than four BatteryTariffPeriodCost(), in fact you can specify 48 periods which can be loaded into your powerwall using battery.set_tariff().
The FleetAPI also seems to support the same tariff endpoint.
Ah, that's interesting. How frequently does Tesla allow you to update the tariff ?
I'm not sure what the rate limits are, but for Octopus Energy at least, the tariffs only really need to be updated a few times a day: once when next day's rates are announced, and then a few minor updates throughout the day.
I imagine it would work with Amber in a similar way, but using forecasted rates.
I'll have a play. 4 bands was way too much of a restriction
I imagine it would work with Amber in a similar way, but using forecasted rates.
The Amber forecast rates can change every 5 minutes. I played with doing it every 15 minutes max, but mostly every few hours on average.
How frequently does Tesla allow you to update the tariff ?
When injecting a new tariff via the API it appears in the app immediately and there doesn't appear to be an obvious rate limit.
From previous experience the tariffs are only acted upon every 15 minutes, so there could be a delay there if you make a recent change.
The question of forcing exports with inflated prices may still be an issue for exports at peak rates, but I'll have a play over the next few days.
So far this evening it is looking reasonable.
I was getting rate limited over a long period, eg too many requests over a 24 hour period
I don't know if it was 24 hours or some other timeframe.
It's possible the new api has different rate limits.
Amber Electric integration is now available in the Netzero app.
Great work.
I see you are adding dynamic tariffs for Octopus which is nice, but of course doesn't work for everyone.
Could I suggest an improvement to be able to inject our own pricing via your API.
For example here is my pricing for the next 24 hours in 30 minute intervals, which I could easily POST via your API, which I presume you NetZero could then process and translate in a form suitable for upload into my powerwall utility rate plan via the FleetAPI.