-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: incomplete charges #109
base: main
Are you sure you want to change the base?
Conversation
While these are usually charges that failed, they also include charges that are in progress. The client should be able to see these Charges and decide how to proceed. These charges were, at one point, real charges with relevant data. Reasons for failure: - Charging started, TeslaMate server or Tesla API went offline - Charging in progress (not actually failure, just incomplete charge data) This will also allow the user to know about the charge's existence and query (by ID) the Charge Details. Since the database stored the many charge detail objects, the user may be able to process some additional information about the charge. Especially if the charge is in progress. Example: 1. Charge is in progress. 2. Receive basic charge data, like start date and charge ID. 3. Query Charge Details to info like: start date, power over time, etc. However, even with access to this additional data that does exist, the user still will not be able to see data from when the charge went offline. Or in the case the charge is still occurring, the user can't see charge details that haven't happened yet. Therefore, Charge Details require an additional parameter `isCompleted:BOOL` so the user knows if an object is finalized. **The user will have to determine whether the charge is still in progress or corrupted, by seeing if there are any recent charges. If it's in progress, the user should consider refreshing that charge object in the future.** I chose to add this as a separate object on `Data` so that it will not affect existing API users. This will ensure incomplete charges are not treated as completed charges.
Finally got builds working on my local machine. Next few commits may to fix bugs from new code
This reverts commit 6a8554e.
Existing issue, chargesdata is null when empty. To check, set ?page=10 and see the response. An empty array is more useful and clear
Display incomplete charge data
SonarCloud Quality Gate failed. 0 Bugs No Coverage information |
@alecdoconnor, now you can specify the docker imager with Btw, something similar interesting for incomplete drives? |
Hey! I actually tested this with a local build, once I figured out how! It worked great for me. What did you mean by, "Btw, something similar interesting for incomplete drives?" |
Ok great!
I thought that it maybe could happen that even a drive is incomplete the same way as a charge. Therefore the question.. but oyu might not have experienced anything like that? |
If you want to generate a few incomplete charges, run this API call while
you're charging, or shut down TM after a charge started but before it
finishes, and start it back up after you unplug.
Good point about the drives! I have not experienced incomplete drives, but
I am curious if they could be created in a similar manner to how I created
the incomplete charges, as mentioned above.
In theory, it's possible to be missing drives if TM is down for some time.
It would be easy to detect, since we would just review the car's mileage
between drives. When I have some time, I'll do some research!
Thanks,
Alec
…On Mon, Oct 11, 2021 at 7:50 AM Tobias Lindberg ***@***.***> wrote:
Hey! I actually tested this with a local build, once I figured out how! It
worked great for me.
Ok great!
I will testrun it and see if I get the same thing. First I got to find
some charges that are not completed.. that's the first mission :P
What did you mean by, "Btw, something similar interesting for incomplete
drives?"
I thought that it maybe could happen that even a drive is incomplete the
same way as a charge. Therefore the question.. but oyu might not have
experienced anything like that?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#109 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE4CZXTZ4BAAP2FF62C5Y53UGLFQ5ANCNFSM5FYAOLOQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Hi @alecdoconnor, My wife went driving today while I was at the computer and checked.. there is no active drive ongoing when driving, so that seems to be inserted first when completed. Regards, |
Hi @alecdoconnor, My car is currently charging and I can't see an entry for the ongoing charge in the charges list and also when using the supposed to be added ID, it's not returning anything for me. Regards, |
Is this on the feature branch? As for the list, it should be part of a
separate array so it doesn't cause a conflict with existing API
deserializations. But why the detailed charge isn't working, I have no
idea! They both seem to still be working for me. When the charge finishes,
will you see if it shows up like normal and with the expected start time?
Alec
…On Mon, Nov 8, 2021 at 8:12 PM Tobias Lindberg ***@***.***> wrote:
Hi @alecdoconnor <https://github.com/alecdoconnor>,
My car is currently charging and I can't see an entry for the ongoing
charge in the charges list and also when using the supposed to be added ID,
it's not returning anything for me.
So I can't see to get the same issue as you got 🤔
Regards,
Tobias
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#109 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE4CZXSVD6F7APK5PY6X67TULBYQDANCNFSM5FYAOLOQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Feature to show incomplete charges and handle them slightly different.
Original PR: #93