-
Notifications
You must be signed in to change notification settings - Fork 144
Usage
Tom Goetz edited this page Jun 17, 2021
·
18 revisions
- Get help on all of the options by running
garmindb_cli.py --help
in a terminal. - Starting out: download all of your data and create your db by running
garmindb_cli.py --all --download --import --analyze
in a terminal. - Incrementally update your db by downloading the latest data and importing it by running
garmindb_cli.py --all --download --import --analyze --latest
in a terminal.
The source scripts are automated with Make. Run the Make commands in a terminal window. You may need to reconfigure the file and directory paths in the variables found in defines.mk
.
- You need
git
on your machine first. If you don't havegit
, install it. - Git clone GarminDB repo. Get the command from the green button on the project home page.
- Next you will need
make
. If you don't have it installed:- On MacOS, install it.
- On Ubuntu, install
make
:apt-get install make
.
- Run
make setup
get the scripts ready to process data. - Run
make create_dbs
to start exporting your daily monitoring data. You need to run this at least once to get some data into your DB. The import command in the next line can't calculate the dates to import until there s data in the DB. - Keep all of your local data up to date by running only one command:
make
. - Import your FitBit daily CSV files by downloading them and running
make fitbit
. I wrote this to get my historical FitBit data into the DB, I do not currently use FitBit and do not plan to do any more work in this area. - Import your Microsoft Health daily CSV files by downloading them and running
make mshealth
. I wrote this to get my historical MS Health data into the DB, I do not currently use MS Health or a MS Band and do not plan to do any more work in this area. - Rebuild the DB from downloaded files by running:
make rebuild_dbs
. - Run
make graphs
to generate some default graphs. - Run
make backup
to backup your DBs.
- On OSX, the Garmin Connect username and password will be loaded from the keychain if possible. If you have signed in to Garmin Connect in Safari and you answered 'yes' when asked about saving your username and password, then they are saved in the keychain. If you are using iCloud Keychain, then they are not available to the script and you need to make a copy of the saved credentials in the Login Keycahin. You can do this with Keychain Access.app. Search for the Garmin Connect entry in the iCloud Keychain and make a copy of it into the Login Keychain.