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

Monitor + HRV data not found #75

Closed
spelya opened this issue Aug 18, 2020 · 13 comments
Closed

Monitor + HRV data not found #75

spelya opened this issue Aug 18, 2020 · 13 comments

Comments

@spelya
Copy link

spelya commented Aug 18, 2020

I installed IQ application Heart Monitor + HRV from fbbbrown, but I cannot find in any table the additional data created by the app. I have an appointment with my cardio doctor and I would like to submit that data.

Is there a target I should add to the Makefile? Or should I add another URL corresponding to QI somewhere in a module ?

Note that I am quite new to both Makefile and Python.

Thanks for any help.

@tcgoetz
Copy link
Owner

tcgoetz commented Aug 18, 2020

I haven't used that app, but the FIT files should be parsed correctly. The rest depends on what kind of data the app generates. If it generates standard heart rate and heart rate variance data, then that data should appear in the heart rate and heart rate variance tables. If you don't find it there, then the best thing to do would be to share a FIT file from the app with me and I will see what I can do with it.

@spelya
Copy link
Author

spelya commented Aug 19, 2020

Hi Tom,
Thanks for your reply. I will dig further in the coming days and update with any information I might find.
Regards

@spelya spelya closed this as completed Aug 19, 2020
@spelya
Copy link
Author

spelya commented Sep 2, 2020

Hi Tom,
For your information, I located the data in the activity_details.json file, each additional field values appearing under as an array "AppID..., developperFieldNumber99 ... , Value" (See attached file for details
Monitor+HR Data.txt.

@spelya spelya reopened this Sep 2, 2020
@spelya spelya closed this as completed Sep 2, 2020
@mkffl
Copy link

mkffl commented Jan 3, 2021

@tcgoetz I have a similar question as I use custom apps to access HRV statistics. How can I parse custom fields?

In @spelya 's example, it could be developerFieldNumber20 or developerFieldNumber21. I can see all the data I need were downloaded in the activity_details_*.json files but the developer fields are not pushed to sqlite.

Should I write my own class in import_garmin_activities.py? For example, the GarminJsonActivityData class has a _process_common method that lists fields ending up in sqlite.

The application is very well thought through so I am just keen to get your input before hacking together a solution that may not leverage existing utilities you already built.

@tcgoetz
Copy link
Owner

tcgoetz commented Jan 3, 2021

@mkffl I'm looking into adding a CustomDb and a CustomTable class that could be used to make table with any fields (including developer). Please add your feedback to this discusion: #95

@tcgoetz
Copy link
Owner

tcgoetz commented Jan 3, 2021

@mkffl I have a first pass done on this. Do you have a example file you can send me and the mapping of fields to db cols you need?

@tcgoetz tcgoetz reopened this Jan 3, 2021
@mkffl
Copy link

mkffl commented Jan 4, 2021

Hi Tom,
Please find example json downloaded by GarminDB on this link - https://drive.google.com/file/d/1xdBRHTVpIqIvEJiWCqfsavOkoez0ygS2/view?usp=sharing

Thanks
Michel

@tcgoetz
Copy link
Owner

tcgoetz commented Jan 4, 2021

@mkffl I can't access that link. It says I don't have permission.

@mkffl
Copy link

mkffl commented Jan 4, 2021

I can't access that link.

Sorry, that's strange. The content of activity_details_00011222.jsonis

{
"activityId": 6045269283, "activityUUID": {"uuid": "c205cfd7-efac-4114-8580-3670b1031c7f"}, 
"activityName": "Test HRV", 
"userProfileId": 76393725, 
"isMultiSportParent": false, 
"activityTypeDTO": {"typeId": 11, "typeKey": "indoor_cardio", "parentTypeId": 29, "sortOrder": 19, "isHidden": false},
 "eventTypeDTO": {"typeId": 9, "typeKey": "uncategorized", "sortOrder": 10}, 
"accessControlRuleDTO": {"typeId": 2, "typeKey": "private"}, 
"timeZoneUnitDTO": {"unitId": 159, "unitKey": "Europe/London", "factor": 0.0, "timeZone": "Europe/London"}, 
"metadataDTO": {"isOriginal": true, "deviceApplicationInstallationId": 879109, "agentApplicationInstallationId": null, "agentString": null, "fileFormat": {"formatId": 7, "formatKey": "fit"}, "associatedCourseId": null, "lastUpdateDate": "2021-01-03T09:24:31.0", "uploadedDate": "2021-01-03T09:24:30.0", "videoUrl": null, "hasPolyline": false, "hasChartData": true, "hasHrTimeInZones": true, "hasPowerTimeInZones": false, "userInfoDto": {"userProfilePk": 76393711, "displayname": "9b1f50da-ffab-42fa-b50d-65bef4b4b1bd", "fullname": "Michel", "profileImageUrlLarge": null, "profileImageUrlMedium": "https://s3.amazonaws.com/garmin-connect-prod/profile_images/2f2597d4-76bb-4d3d-8387-afebf0bac455-76393725.png", "profileImageUrlSmall": "https://s3.amazonaws.com/garmin-connect-prod/profile_images/bf8c589e-e8b8-408a-8ffa-a93cc12eab32-76393725.png", "userPro": false}, "chartAvailability": {}, "childIds": [], "childActivityTypes": [], "sensors": [{"manufacturer": "GARMIN", "serialNumber": 3967682981, "sku": "006-B2327-00", "sourceType": "ANTPLUS", "antplusDeviceType": "HEART_RATE", "softwareVersion": 3.4}], "activityImages": [], "manufacturer": "GARMIN", "diveNumber": null, "lapCount": 1, "associatedWorkoutId": null, "isAtpActivity": null, "deviceMetaDataDTO": {"deviceId": "3316616446", "deviceTypePk": 34696, "deviceVersionPk": 879109}, "hasIntensityIntervals": false, "hasSplits": false, "manualActivity": false, "autoCalcCalories": false, "favorite": false, "trimmed": false, "personalRecord": false, "gcj02": false, "elevationCorrected": false}, "summaryDTO": {"startTimeLocal": "2021-01-03T09:18:00.0", "startTimeGMT": "2021-01-03T09:18:00.0", "distance": 0.0, "duration": 180.095, "movingDuration": 0.0, "elapsedDuration": 180.095, "averageSpeed": 0.0, "calories": 4.0, "averageHR": 61.0, "maxHR": 70.0, "minActivityLapDuration": 180.095}, "connectIQMeasurements": [{"appID": "0bdc0e75-etc", "developerFieldNumber": 0, "value": "51.0"}, {"appID": "0bdc0e75-etc", "developerFieldNumber": 7, "value": "47.568603515625"}, {"appID": "0bdc0e75-etc", "developerFieldNumber": 1, "value": "76.7947769165039"}, {"appID": "0bdc0e75-etc", "developerFieldNumber": 11, "value": "25.414365768432617"}, {"appID": "0bdc0e75-etc", "developerFieldNumber": 12, "value": "64.0884017944336"}]
}

Example of information I would use is {"appID": "0bdc0e75-etc", "developerFieldNumber": 12, "value": "64.0884017944336"}.

Thanks

@mkffl
Copy link

mkffl commented Jan 4, 2021 via email

@tcgoetz
Copy link
Owner

tcgoetz commented Jan 5, 2021

Hi Attached the fit and corresponding json files. Best Michel

Maybe I'm missing something, but I don't see where the files are attached. If your referring to the Google Drive link, then I requested access with my email.

@tcgoetz
Copy link
Owner

tcgoetz commented Jan 5, 2021

I've changed course a bit. I've changed my implementation to be a plugin interface. Plugins implemented in python will be placed into a plugins directory. All plugins will be loaded at application start. One type of plugin will be a activity file type plugin that will also be keyed on activity id, developer id, developer fields, or similar. Under matching conditions the plugin will be activated and its _write_record_entry function will be called for each record message. The plugin function will save all fields of interest to an additional DB table.

@spelya
Copy link
Author

spelya commented Jan 19, 2021

Hello Tom,
I looked into your hrv_plugin.py, and I am sure it meets the expectations had a few months ago. Though I followed this thread, I felt I lacked expertise to add any two cent comment. Thanks for your work and the participation of Michel.
Regards

@tcgoetz tcgoetz closed this as completed Jan 24, 2021
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

3 participants