Comments (13)
Thanks Matt, closed due to poor eyesight
from teslamateagile.
Glad I could help! As an additional tip you only actually need 2 price configurations for this scenario as the times can go beyond midnight, in your case it could be:
- FixedPrice__Prices__0=23:30-20:30=13.8 - FixedPrice__Prices__1=20:30-23:30=4.5It will work perfectly fine how you have it now just an fyi 🙂
I tried that originally, but it wasn't working for the lack of an underscore
from teslamateagile.
Hmm, I'm assuming this is probably a timezone issue (https://xkcd.com/1883/ 😁)
The charging times there are marked as UTC, which would make them 20:46 -> 23:02 BST, which makes the charge completely within the range of the 4.5p/kWh cost but it looks like it's calculating it as if your cost is 19:46 -> 22:02 BST which would result in approximately that cost.
Would you be able to export the relevant data from the charging_processes and charges tables for this charging session and send it to me? Check out the troubleshooting section of the README for a little more info on how to access the database if you're not sure. I also noted in this comment how to do it as well #17 (comment)
There is no personal information in those tables as location data for example is stored in a different table but be sure to read the output before sending it over just in case!
I'll use the data to replicate the issue and prepare a fix, and if you're happy include it in the unit tests for this project.
Sent, more than happy to help/give back to the community
from teslamateagile.
Thank you very much! I have tracked down the issue and fixed it, now released with version v1.5.1
Please update your TeslaMateAgile, and set the
cost
for this charge (and any other affected charges) in thecharging_process
table toNULL
and it should pick them back up within 5 minutes!With your provided data I calculated a cost of 75.5p with 16.78kWh of energy, which comes out to 4.5p/kWh.
Let me know how it goes, fingers crossed everything works perfectly!
Thanks Matt, tested and all working
Thanks for your great work and support
from teslamateagile.
You look to only have one underscore in the environment variable for EnergyProvider so TeslaMateAgile is defaulting to Octopus Agile integration, it should be TeslaMate__EnergyProvider
from teslamateagile.
Additionally the prices configuration should wrap all the way around 24 hours so set that last one to 00:00 instead of 23:59 🙂
from teslamateagile.
You look to only have one underscore in the environment variable for EnergyProvider so TeslaMateAgile is defaulting to Octopus Agile integration, it should be
TeslaMate__EnergyProvider
So it was just luck that it worked previously ;-)
from teslamateagile.
Additionally the prices configuration should wrap all the way around 24 hours so set that last one to 00:00 instead of 23:59 🙂
I wasn't sure
from teslamateagile.
Glad I could help! As an additional tip you only actually need 2 price configurations for this scenario as the times can go beyond midnight, in your case it could be:
- FixedPrice__Prices__0=23:30-20:30=13.8
- FixedPrice__Prices__1=20:30-23:30=4.5
It will work perfectly fine how you have it now just an fyi 🙂
from teslamateagile.
OK, something's gone horribly wrong, i get the cost calculation returning the following:
Calculating cost for charges 04/13/2021 19:46:13 UTC - 04/13/2021 22:02:46 UTC
Calculated cost 125.29 and energy 16.78 kWh for charging process 275
Which gives an effective rate of 7.467/kWh
That's using:
- FixedPrice__Prices__0=23:30-20:30=13.8
- FixedPrice__Prices__1=20:30-23:30=4.5
from teslamateagile.
Hmm, I'm assuming this is probably a timezone issue (https://xkcd.com/1883/ 😁)
The charging times there are marked as UTC, which would make them 20:46 -> 23:02 BST, which makes the charge completely within the range of the 4.5p/kWh cost but it looks like it's calculating it as if your cost is 19:46 -> 22:02 BST which would result in approximately that cost.
Would you be able to export the relevant data from the charging_processes and charges tables for this charging session and send it to me? Check out the troubleshooting section of the README for a little more info on how to access the database if you're not sure. I also noted in this comment how to do it as well #17 (comment)
There is no personal information in those tables as location data for example is stored in a different table but be sure to read the output before sending it over just in case!
I'll use the data to replicate the issue and prepare a fix, and if you're happy include it in the unit tests for this project.
from teslamateagile.
Thank you very much! I have tracked down the issue and fixed it, now released with version v1.5.1
Please update your TeslaMateAgile, and set the cost
for this charge (and any other affected charges) in the charging_process
table to NULL
and it should pick them back up within 5 minutes!
With your provided data I calculated a cost of 75.5p with 16.78kWh of energy, which comes out to 4.5p/kWh.
Let me know how it goes, fingers crossed everything works perfectly!
from teslamateagile.
That's great to hear! By the way I'll be publishing another new version shortly as all of this has reminded me to upgrade to .NET 5!
from teslamateagile.
Related Issues (20)
- Costs not calculated after upgrade to 1.8.0 HOT 6
- Specifying an invalid GeofenceID does not throw errors HOT 4
- Configured geofence 'Home' (id: 1) has a cost per unit set which will prevent TeslaMateAgile from working properly HOT 5
- Entsoe transparency API provider support HOT 4
- Very short top-up charges don't get costed. HOT 5
- Some Crashing Entries HOT 5
- Provider feature request : EDF Tempo French Provider HOT 2
- 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
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.