Replies: 5 comments
-
Sidenote: I would also love something even more generic. my energy pricing is fully dynamic, so the most awesome solution for me would be some sort of plugin/scripting possibility to adjust the charging cost per geo-fence on a specifiable interval. e.g. "if charging and position = geo_fence_1 then get price info via http in interval x" (but I don't want to derail this specific issue…) |
Beta Was this translation helpful? Give feedback.
-
Same request as OP from myself being on the same tarrif. |
Beta Was this translation helpful? Give feedback.
-
I took a look at the database (charges, charging_process_id) tables to see how easily this could be done via SQL. Getting the data from the API (Octopus, or whatever) in to the database and having a set of charge prices by start_date in my opinion is the easy portion. Getting old charge data from the table might be a little more difficult as the positions in charges don't always land exactly on nice round numbers. I slapped together some SQL to associate the entries in charges with time periods (in a fake pricing table) and it looked a little bit like this:
It takes the min/max of charge_energy_added per section and takes a difference to get the charge_energy_added over the period Unfortunately I don't know what to do about the gap in between periods, something like the following where 2.51 is the max of the 04:00->04:30 period and 2.62 is the min of the 04:30->05:00 period and is currently uncounted (all 0.11kWh of it) and this happens for every change in price.
Sorry for the noise, just thinking out loud in here :) |
Beta Was this translation helpful? Give feedback.
-
I made a proper supported (by me) integration to do exactly this as part of my TeslaMateAgile integration for those on Octopus Agile. Not sure if Adrian wants to implement this natively or not - probably doesn't make sense to have support for everything in the world and just have little plugins like mine, so maybe this issue can be closed? |
Beta Was this translation helpful? Give feedback.
-
I would recommend everyone to try TeslaMateAgile. There are no plans to implement this supplier-specific functionality natively for the foreseeable future. From my point of view this issue can therefore be closed. |
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem? Please describe.
As a customer of Octopus on the Agile Rate Plan
I would like to have the half hourly rates for my region applied to the charging that occurred in that period
So that I can view accurate charge pricing in my dashboards
AND save me from having to keep track of this in a spreadsheet manually
https://octopus.energy/agile/
https://developer.octopus.energy/docs/api/
Here is a sample call that will return the rates for the relevant period specified:
https://api.octopus.energy/v1/products/AGILE-18-02-21/electricity-tariffs/E-1R-AGILE-18-02-21-J/standard-unit-rates/?period_from=2020-04-19T00:00:00&period_to=2020-04-19T23:59:59&page_szie=1000
Describe the solution you'd like
Ideally there's the ability for me to specify that I have Agile Octopus and to choose my region. Teslamate will then do a daily rate call (after 16:00 UK time) for the next day's rates and apply the rates to the relevant periods of time I charge so, for example, if I charged 4 kWh/30 minutes from 01:00-02:30 and the rates were 0100-0130 0.05, 0130-0200 0.06, 0200-0230 0.07 then the total shown for that charging period would be 0.20 + 0.24 + 0.28 = 0.72 total charging cost. Rates are available the day before so there wouldn't have to be any retroactive application to existing records.
Describe alternatives you've considered
Manually outside of Teslamate
Additional context
Right now I'm keeping track of my car's consumption manually by replicating the above process. Downloading the half hourly Agile rates, converting the JSON response to CSV, opening in Excel, then I extract my charge data from TeslaFi in CSV, break down the charging duration into half hourly periods and then align those with the half hourly rates. This enables me to accurately see my true cost of charging. This is very time consuming.
Beta Was this translation helpful? Give feedback.
All reactions