Comments (14)
Just committed updates with the device ids for the Garmin Instinct.
I suggest] that you use the source version until we work through any remaining issues and it is working for you
from garmindb.
If you want to keep using the binary release, here is a new one with support for creating and updating DBs from a USB mounted Garmin device: https://github.com/tcgoetz/GarminDB/releases/tag/v1.0.2
from garmindb.
If you use the source version, you can create your DBs by copying data files from your USB mounted device with make create_copy_dbs
and update your DBs with data copied from your USB mounted watch with update_copy_dbs
.
Let me know if you have any problems with the code for copying data files from the device.
from garmindb.
Thanks for your incredible fast reply. I tried to use the source version.
To this end I renamed the previous GarminDB folder to GarminDB-old_2019_06_11:
$ mv GarminDB GarminDB-old_2019_06_11
Then:
git clone https://github.com/tcgoetz/GarminDB.git
then:
$ cd GarminDB
copied the GarminConnectConfig.json edited yesterday. to be on the safe side I past below the content (replacing user id and password with xxx and yyyy):
$ cat GarminConnectConfig.json
{
"credentials" : {
"user" : "xxxx",
"password" : "yyyy"
},
"data" : {
"weight_start_date" : "06/01/2019",
"sleep_start_date" : "06/01/2019",
"rhr_start_date" : "06/01/2019",
"monitoring_start_date" : "06/01/2019",
"download_days" : 31,
"download_latest_activities" : 10,
"download_all_activities" : 1000,
"download_days_overlap" : 3
},
"copy" : {
"mount_dir" : "/Volumes/GARMIN"
}
}
I did connect the instinct watch to the Mac.
In the GarminDB folder created today I ran:
$ make create_copy_dbs
and obtained this python message I assume to be an error:
python garmin.py --all --copy --import --analyze
Traceback (most recent call last):
File "garmin.py", line 9, in
from download_garmin import Download
File "/Users/claushultschig/GarminDB/download_garmin.py", line 14, in
import GarminDB
File "/Users/claushultschig/GarminDB/GarminDB/init.py", line 1, in
from GarminDB import *
File "/Users/claushultschig/GarminDB/GarminDB/GarminDB.py", line 7, in
from HealthDB import *
File "/Users/claushultschig/GarminDB/HealthDB/init.py", line 3, in
from DB import *
File "/Users/claushultschig/GarminDB/HealthDB/DB.py", line 20, in
from Fit import Conversions
ImportError: No module named Fit
make: *** [copy_garmin] Error 1
In this folder I could not find any garmin.log file
=====
In parallel I did try to use the 1.02 version. I extracted the zip archive to a folder I called
GarminDB_Darwin_102
I the first step I was not really clear what to do. I still do not quite get what the scripts are doing and where (which folder) a database file is created
I a first step (without the watch mounted to the Mac)
I ran:
$ ./download_create_dbs.sh
that prompted:
Creating new DBs by downloading from Garmin Connect
Geting activities: '/Users/claushultschig/HealthData/FitFiles/Activities' (1000)
100% (26 of 26) |#########################################################################################################################################| Elapsed Time: 0:00:00 Time: 0:00:00
unzip_files: /Users/claushultschig/HealthData/FitFiles/Activities
100% (11 of 11) |#########################################################################################################################################| Elapsed Time: 0:00:12 Time: 0:00:12
100% (11 of 11) |#########################################################################################################################################| Elapsed Time: 0:00:16 Time: 0:00:16
unzip_files: /Users/claushultschig/HealthData/FitFiles/Monitoring/2019
Traceback (most recent call last):
File "garmin.py", line 324, in
File "garmin.py", line 314, in main
File "garmin.py", line 99, in download_data
File "GarminDB/GarminDB.py", line 30, in init
File "HealthDB/DbVersionObject.py", line 27, in table_version_check
RuntimeError: DB: garmin table devices version mismatch. Please rebuild the garmin DB. (1 vs 2)
After conneting the watch to the Mac, I ran the same command again and obtained the same error message again.
Here (in the GarminDB_Darwin_102 folder ) I could find a garmin.log. I attach it.
garmin.log
Not really clear to to proceed.
I will shut the Mac down soon. It is 22:12 hrs (Central European summer time)
from garmindb.
When you use the source version you need to run make setup
before using it.
For the binary version, you have tables from before I added the Instinct ids. After adding the new ids the tables need to be regenerated ("Please rebuild the garmin DB. (1 vs 2)").
Run garmin --delete_db
to delete the old tables and run download_create_dbs.sh again.
from garmindb.
Sorry for forgetting the "make setup" in the source version.
When running this I did run into permission issues with pip:
for example
"The directory '/Users/claushultschig/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/claushultschig/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.".
However, this step (and the other steps where I ran into this issue)was completed successfully:
"Requirement already up-to-date: sqlalchemy in /usr/local/lib/python2.7/site-packages (1.3.4)"
Ultimately I think the make was successfully.
After running into yesterday error message for the binary version 1.02 I ran:
$ python garmin.py --delete_db
and then:
$ make create_copy_dbs
this command completed without any errors.
Where(folder/ storage location) is the sql to anslyze the data?
from garmindb.
I have seen pip install errors before on MacOS. Looks like it worked though.
Your data directory is defined here:
Line 10 in 3fca2ff
Should be /Users/claushultschig/HealthData/DBs
from garmindb.
Thanks for your rapid reply. I am very impressed.
I did find the data - I feel stupid that I did not find them myself.
What is the command to download from the watch directly?
would it be something like
make update_copy_dbsmake ?
At the moment there is Garmin Express installed on this Mac copying data from the watch directly to the Garmin page. But I would like to know since I plan to move most things to Linux where I will (can) not use any Garmin programs.
from garmindb.
The latest version of the binary release has two extra scripts: copy_create_dbs.sh
and copy_update_dbs.sh
.
The source release has make commands copy_garmin
and copy_garmin_latest
.
Both sets of commands are jus for ease of use. You can run garmin.py
from the source release or garmin
from the binary release directly. When you run the scripts/commands I mentioned earlier you will see those calling garmin[.py] and the arguments they use.
I have started adding some graphing support in the last day or so.
from garmindb.
Sorry English is not my mother tongue and so far I did not use any make commands in combination with python code.
Does you previous statement mean for the source release:
To copy latest data from the watch I have to enter:
$ make copy_garmin_latest
Did I understand this correct?
from garmindb.
yes
from garmindb.
thnanks for this clarification
from garmindb.
Is this working now?
from garmindb.
Sorry for being late in my reply.
I was busy for the last week I will give it a try on Linux since Garmin Express is installed on this MAC and it will automatically sync to the cloud.
from garmindb.
Related Issues (20)
- trouble to run garmindb_cli HOT 5
- Yearly summaries for non-monitoring years HOT 4
- Long Term Progression in Swim/Run Times HOT 2
- GarminConnectConfig.json not found HOT 7
- No sleep data in database HOT 10
- Getting time for each length in swimming HOT 5
- Raspberry pi installation problems HOT 2
- Class field `default_display_activities` is overridden to be a class method which then references itself HOT 2
- Location of the most detailed HR data from Activities
- Activities analyze gives TypeError HOT 11
- Failed to login problem HOT 4
- Password escaping issue HOT 4
- `bash` path doesn't work on macOS HOT 2
- sqlalchemy.exc.ArgumentError: Textual SQL expression 'CREATE VIEW IF NOT EXISTS...' should be explicitly declared as text('CREATE VIEW IF NOT EXISTS...') HOT 7
- Can't login when installing via Source HOT 2
- No module named 'PyInstaller.__main__' HOT 2
- [Question]Run commands/analysis on already downloaded activities.csv file from Garmin Connect HOT 1
- Error: No module named 'numpy.core._multiarray_umath' HOT 1
- no name value in field 'activities.name' if subsport is cardio HOT 4
- Cannot use garmindb_cli.py HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from garmindb.