tcgoetz / GarminDB

Download and parse data from Garmin Connect or a Garmin watch, FitBit CSV, and MS Health CSV files into and analyze data in Sqlite serverless databases with Jupyter notebooks.
GNU General Public License v2.0
1.1k stars 138 forks source link

Data is missing #214

Open atusiniida opened 10 months ago

atusiniida commented 10 months ago

Dear colleagues,

when I downloaded data spaning several month, I found that data is a part of the period is missing. for example, whien I download data from 2023-07-31, day summery data from 2023-09-09 to 2023-09-24 is missing in the sql table. I found dailysummary***.json files but the values in the files are null. I comfimed that in Garmin Gonnect record, the data is correectly recored in that period. Could you give me help ? (If neccesay, I can share my account for debugging)

Best, Atsushi

tcgoetz commented 9 months ago

If you redownload the data for that period, is it still null? There are options for redownload.

atusiniida commented 9 months ago

Thank you for your responce.

you mean that there are comand options for redownload?
could you give an example of the command?

I tired download reveral times and comfirm the phenomenon is reproducible.

atusiniida commented 9 months ago

I am getting the data by vivosmart 5. when I was getting data by vivosmart 4, I am not face such a problem. it is possible that the problem is dependent on the device type?

tcgoetz commented 9 months ago

`orion:GarminDB_develop tgoetz$ garmindb_cli.py --help usage: garmindb_cli.py [-h] [-v] [-t TRACE] [-b] [-d] [-c] [-i] [--analyze] [--rebuild_db] [--delete_db] [-e EXPORT_ACTIVITY] [--basecamp-activity BASECAMP_ACTIVITY] [-g GOOGLE_EARTH_ACTIVITY] [-A] [-a] [-m] [-r] [-s] [-w] [-l] [-o]

optional arguments: -h, --help show this help message and exit -v, --version print the program's version -t TRACE, --trace TRACE Turn on debug tracing

Modes: -b, --backup Backup the database files. -d, --download Download data from Garmin Connect for the chosen stats. -c, --copy copy data from a connected device -i, --import Import data for the chosen stats --analyze Analyze data in the db and create summary and derived tables. --rebuild_db Delete Garmin DB db files and rebuild the database. --delete_db Delete Garmin DB db files for the selected activities. -e EXPORT_ACTIVITY, --export-activity EXPORT_ACTIVITY Export an activity to a TCX file based on the activity's id --basecamp-activity BASECAMP_ACTIVITY Export an activity to Garmin BaseCamp -g GOOGLE_EARTH_ACTIVITY, --google-earth-activity GOOGLE_EARTH_ACTIVITY Export an activity to Google Earth

Statistics: -A, --all Download and/or import data for all enabled stats. -a, --activities Download and/or import activities data. -m, --monitoring Download and/or import monitoring data. -r, --rhr Download and/or import resting heart rate data. -s, --sleep Download and/or import sleep data. -w, --weight Download and/or import weight data.

Modifiers: -l, --latest Only download and/or import the latest data. -o, --overwrite Overwite existing files when downloading. The default is to only download missing files.`

You need the --download flag and the --overwrite flag. The harder parts is specifying a limited date range. You can redownload only monitoring data with --monitoring. So:

garmindb_cli.py --monitoring --download --overwrite

atusiniida commented 9 months ago

I ried redownload by "garmindb_cli.py --monitoring --download --overwrite". However, the data for that period, is it still null. Thank you for your more help.

tcgoetz commented 9 months ago

If you look at the file dates after the redownload, were the data files in question replaced?

atusiniida commented 9 months ago

Yes, time created indicated that the data files is replaced.