Where I am, the only supercharger nearby is inside of a garage where there is no cell/wifi signal. In this case, the car is offline while charging. This leads to the Teslamate thinking that the trip to the charger and back is a single trip rather than a trip, charge, and another trip.
This results in drive details which encompass the charge duration and skewed metrics. Attached are the summaries and one detailed view of a charge for reference.
If a car goes offline and gains a significant amount in SoC it should be considered a charge session that begins when the car went offline and ends when it came back online. In addition, the previous drive should be stopped when the charge session began (or the car went offline) and a new drive should begin.
That's an interesting corner case.
If a car goes offline and gains a significant amount in SoC it should be considered a charge session that begins when the car went offline and ends when it came back online. In addition, the previous drive should be stopped when the charge session began (or the car went offline) and a new drive should begin.
I like that solution.
Glad I was able to find it. I suppose I should learn Elixer so I can help you out.
Oh, I'd love to see pull requests!
I'm gonna try to fix it myself soon. Real-world testing will be difficult though. You'll need to verify then if it's really fixed.
So I have a similar edge case. In my office the parking is in the basement (it's in downtown) - a few floors down with no network connectivity. So when I enter there is connectivity and at the end of the day when I leave it thinks the car has been driving all that time.
So if we adding a option to detect SoC we can also perhaps add distance or something.
I know edge case and probably not useful for many so please feel free to ignore too. 馃
I know edge case and probably not useful for many so please feel free to ignore too. 馃
There are already two of you. Reason enough to fix it ;) I just pushed a fix to the dev branch which should already handle your case: when the car comes back online and notices that it was offline for at least 15 minutes, the previous drive is properly logged.
I'll let you know when the next release is available.
Awesome thank you. Happy to test it out.
v1.6.0 is available. Please test it out.
Awesome thank you. Will pull later today. Would the existing data stay as is when I update the container? Sorry not sure on the specifics on that front.
Yep, the docker-compose.yml specifies a few "volumes" which are the docker mechanism for persisting data generated / used by Docker containers.
Thanks, I'll pull it today, but likely won't be able to test this edge case for a couple days (currently fully charged 馃槀).
@bahree any updates on this front? :) Does v1.6 handle your case correctly? I still couldn't test it myself.
I can confirm that v1.6 does correctly does create two separate drives and a charging session in this case. Thanks for the fix!
The only thing I noticed which was a bit off was the detail view of a charge there is a data point when the charging session is started, but not when it ends (i.e. only one data point). This isn't high priority at all and not even sure if the majority of people would like to see it this way. See the screenshot below for clarification.
Still spending some time to learn Elixir, expect to see pull requests from me in the future.

Great! There should be two data points. I bet the seconds one becomes visible if you zoom out a few seconds.
You're right! I wonder why it gets cut off.
Closing as it seems the issue is resolved.
Most helpful comment
There are already two of you. Reason enough to fix it ;) I just pushed a fix to the dev branch which should already handle your case: when the car comes back online and notices that it was offline for at least 15 minutes, the previous drive is properly logged.
I'll let you know when the next release is available.