Comments (10)
Hi @nottheedge, it looks to be a fairly simple API to use and implement, I've added in the API quickly and published a pre-release version for your testing to see if it's working as you expect.
I anticipate there will be a problem with VAT as the API does not include prices with VAT. Is this something that you would require?
If so, what is the VAT calculation for electricity in the region this energy provider operates in, presumably Germany only?
You can access the pre-release version with docker tag v1.7.0-rc.2
(edit: just updated to rc.2 to fix a bug around not getting all the required price data)
Refer to the guide in the README on how to force TeslaMateAgile to recalculate charges for testing.
Let me know if you run into any troubles. This looks to hopefully be a quick win 😄
from teslamateagile.
Hey @nottheedge - just checking in, did you manage to try this out? I am waiting on your feedback before releasing this properly to make sure it's all good 😄
from teslamateagile.
My apologies I didn’t recognise that you send me a message 6 days ago. Will have a look next days.
from teslamateagile.
No worries, cheers!
from teslamateagile.
I got it installed but I assume I can't recalculate charges at my home as the prices per hour are only valid for next 24h. A backward calculation is impossible. My car is plugged in and it will charge tomorrow 2-4am for (7,5ct at 2am, 7,35ct at 3am and 7,45ct at 4am). Let see what's gonna happen.
Related to your question about VAT calculation you only need to multiply with 1,19 as we have 19% per kWh. Probably you could set it as parameter inside docker-compose to be flexible?
Regards,
Joerg
from teslamateagile.
Hey @nottheedge, just checking in again to see if you managed to give it a go?
Thanks for the info about VAT, I'll add an option specifically for this provider which has a default VAT rate of 19% if not set but you will be able to override it. This is because the other providers automatically include VAT in their prices so it is not something we need to worry about and it may confuse users if we add an option to add VAT to Octopus Agile prices when they are already included for example.
Hopefully everything (other than the lack of VAT) is working correctly for you?
from teslamateagile.
I have now pushed a new release candidate v1.7.0-rc.4
with the the VAT multiplier option added, it is Awattar__VATMultiplier
and it is set by default to 1.19
so you shouldn't generally need to set it at all unless you claim the VAT back or something but it's there just in case.
Could you please try out this new version and make sure everything is nice and happy and then we can properly release v1.7.0
😄
from teslamateagile.
So far it looks good. As I charge the car over several hours there are different prices each hour. How do you cumulate it? Is there kind of database which stores the prices if charging is in progress? It's just to check if it cumulates correctly.
from teslamateagile.
Yeah so it's actually pretty complicated but essentially TeslaMate samples the current charging state during a charge every 5 seconds or so so we know at any particular point how much power was being drawn and can calculate it over a particular datetime range, which TeslaMateAgile uses to calculate for each price from the aWATTar API relevant to your charging session.
You can calculate it roughly by knowing your normal charge rate (e.g. 7.2kW) and multiplying it by the current cost per hour divided by how much of that hour it was charging
So for example if your charge was from 00:30 to 02:00 and it was 5p/kWh for 00:00-01:00 and 10p/kWh for 01:00-02:00 and you were charging at 7kW: For the first hour you'd basically go 7/60*30=3.5kWh
then 5p*3.5kWh=17.5p
for the first hour, then for the second hour that would be 7/60*60=7kWh
as its a full hour and then 10p*7kWh=70p
and then just add them together to get a rough charge cost of 87.5p
This is essentially how TeslaMateAgile calculates it but on a much smaller timestep for more accuracy so if you compare the two outputs it should be within a few pennies (or cent or whatever)
Hope that makes sense!
from teslamateagile.
v1.7.0
has now been released with aWATTar support, so I will close this. If there are any issues with the implementation please raise a new issue! Cheers
from teslamateagile.
Related Issues (20)
- Error calculating costs with Tibber provider HOT 3
- Feature Request: Octopus Intelligent HOT 7
- UTC time issue HOT 4
- Multiple providers? HOT 2
- Feature request? Generic input of dynamic pricing HOT 2
- Calculation fails when the end time of a charge is very close to the beginning of the hour HOT 3
- Unable to calculate cost of some charges HOT 11
- Create REST endpoint to get price at specific datetime HOT 3
- Failed to update prices - System.ArgumentException: totalHours HOT 6
- Failed to calculate charging cost / energy for charging process HOT 6
- Enhancement / Feature Upgrade - integration of EMS evcc HOT 2
- Unable to download docker image HOT 2
- Feature request - Make available in Home Assitant hassio HOT 15
- Feature request: Day of week in FIxedPricing
- Updating price from Home Assistant fails because "The input string 'unavailable' was not in a correct format." HOT 3
- Tibber "Failed to calculate charging cost" HOT 8
- Feature Request: Fixed Pricing Based on Day of Week HOT 2
- TeslaMateAgile.PriceHelper Tibber fails HOT 6
- No data available if multiple homes exist HOT 10
- Feature request : Show the energy prices in a dashboard HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from teslamateagile.