Git Product home page Git Product logo

Comments (13)

IMgoRt avatar IMgoRt commented on June 19, 2024 1

Thanks Matt, closed due to poor eyesight

from teslamateagile.

IMgoRt avatar IMgoRt commented on June 19, 2024 1

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 🙂

I tried that originally, but it wasn't working for the lack of an underscore

from teslamateagile.

IMgoRt avatar IMgoRt commented on June 19, 2024 1

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.

IMgoRt avatar IMgoRt commented on June 19, 2024 1

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!

Thanks Matt, tested and all working

Thanks for your great work and support

from teslamateagile.

MattJeanes avatar MattJeanes commented on June 19, 2024

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.

MattJeanes avatar MattJeanes commented on June 19, 2024

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.

IMgoRt avatar IMgoRt commented on June 19, 2024

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.

IMgoRt avatar IMgoRt commented on June 19, 2024

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.

MattJeanes avatar MattJeanes commented on June 19, 2024

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.

IMgoRt avatar IMgoRt commented on June 19, 2024

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.

MattJeanes avatar MattJeanes commented on June 19, 2024

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.

MattJeanes avatar MattJeanes commented on June 19, 2024

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.

MattJeanes avatar MattJeanes commented on June 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.