Skip to content
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

How can I force a full history data download? #67

Closed
teodorch85 opened this issue Sep 20, 2024 · 7 comments
Closed

How can I force a full history data download? #67

teodorch85 opened this issue Sep 20, 2024 · 7 comments

Comments

@teodorch85
Copy link

Hi!
I am trying to force a full history download but I can't get it to work.
I tried to change in monitor.py
line 289

FROM
from_month = now # default only get the current month statistics

TO
from_month = now - relativedelta(months=4)

but it didn't work.

Any ideas?
Thank you

@ZuinigeRijder
Copy link
Owner

I assume you question is about the daily stats.

Which car do you have?
Which region?

In Europe only about 3 months of history is stored on the (Kia Connect or Bluelink) server. For Hyundai USA only the last 4 trips are stored. For other regions I do not know.

Note that other information is just a snapshot of the latest cached server information, so each time you ask for it, it is stored if it differs. So you have to build up this history, but still you can miss changed data.

@teodorch85
Copy link
Author

Ioniq 5
EU
I bought the car on the 04th of July, so all data is still in the Bluelink android app.

I am trying to do a full history download for the first time and then I will update every day.

@ZuinigeRijder
Copy link
Owner

ZuinigeRijder commented Sep 20, 2024

You can delete (or rename for backup) monitor.dailystats.csv and monitor.tripinfo.csv, then monitor.py tries to get the history data from 3 months back. You do not need to make changes for that in monitor.py.

@teodorch85
Copy link
Author

teodorch85 commented Sep 20, 2024

I run those commands after deleting the files you mentioned with original monitor.py

python monitor.py
python summary.py sheetupdate
python dailystats.py sheetupdate

and I get
image

while in Bluelink the day trips start from 04/07/2024

image

@teodorch85
Copy link
Author

Managed to get all data in monitor.tripinfo.csv with a change in line 289
from_month = now - relativedelta(months=3)

image

Now the problem is that monitor.dailystats.csv goes back only until 22/08/2024
I changed in dailystats.py line 37
MAX_QUEUE_LEN = 2000

but still it stops at 22/08

@ZuinigeRijder
Copy link
Owner

ZuinigeRijder commented Sep 20, 2024

The Bluelink API for getting the dailystats info only gets the last 24 days or something around that number. The API for trip info gives the opportunity to go back about 3 months. So that is why there is a difference. I do not know how to get back more dailystats results, but that would be something to be asked at hyundai_kia_connect_api.

Note that MAX_QUEUE_LEN is only for limiting the number of entries in the spreadsheet, not the standard output, that contains everything.

@ZuinigeRijder
Copy link
Owner

Discussion continues here:
Hyundai-Kia-Connect/hyundai_kia_connect_api#633

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants