Welcome to Apnea Board !
As a guest, you are limited to certain areas of the board and there are some features you can't use.
To post a message, you must create a free account using a valid email address.
Login or Create an Account
OSCAR: Questions regarding a potential import for Garmin data
Hi
I am currently considering writing an importer for data from Garmin devices into OSCAR.
In the first development step, I would get the data from Garmin Connect as a JSON file via a Python script and an importer integrated into OSCAR would import the JSON file.
Later, the data could then be downloaded from Garmin Connect directly from within OSCAR.
After looking through the source code a bit, I have a few questions.
1) When checking the ChannelID, I found the following existing channels that are relevant for Garmin devices:
OXI_Pulse, OXI_SPO2
Journal_Weight
ZEO_SleepStage, ZEO_ZQ, ZEO_TotalZ, ZEO_TimeInWake, ZEO_TimeInREM,
ZEO_TimeInLight, ZEO_TimeInDeep, ZEO_Awakenings,
POS_Movement
The loader_plugin only implements one MachineType at a time. But I had ChannelID from different MachineType.
What is the best way to deal with an import that imports a wide range of channels?
If I see it right, no import supports this scope so far.
2) The data is provided in different frequencies.
While measurement values for pulse are available every 2 minutes, time frames are always given for the sleep level, which can sometimes be 1 1/2 hours long.
Can the data structures in OSCAR handle this if the measured values are available in different time intervals and types (measured values at time X vs. time ranges).?
3) Some Garmin data is only available for the sleep time (sleep level) while others are available for the whole day (pulse).
A few tests with CVS files showed that it can lead to strange effects when measurements are suddenly available for the whole day. My guess is that OSCAR is actually designed so that only measurements for the sleep time should be imported.
What would you recommend? Is there a way to determine the sleep time based on the CPAP so that I don't import the pulse outside of these times, for example?
I think that's enough questions for the first round.
RE: OSCAR: Questions regarding a potential import for Garmin data
#1. I believe you would need to create the additional channel declarations to address this.
#2. & #3. If each observation is timestamped, then it would be easy to parse the data to compare against a sleep session. Otherwise, that could be a biddy.
Have you looked at the Somnopose loader? It parses a CSV file.
- Red
INFORMATION ON APNEA BOARD FORUMS OR ON APNEABOARD.COM SHOULD NOT BE CONSIDERED AS MEDICAL ADVICE. ALWAYS SEEK THE ADVICE OF A PHYSICIAN BEFORE SEEKING TREATMENT FOR MEDICAL CONDITIONS, INCLUDING SLEEP APNEA. INFORMATION POSTED ON THE APNEA BOARD WEB SITE AND FORUMS ARE PERSONAL OPINION ONLY AND NOT NECESSARILY A STATEMENT OF FACT.
RE: OSCAR: Questions regarding a potential import for Garmin data
(10-19-2024, 10:03 AM)Crimson Nape Wrote: Have you looked at the Somnopose loader? It parses a CSV file.
- Red
yes, I have look on different loaders. I had already written a Python program that transforms the garmin data into Zeo and md300w1/somnopose files. But handling so many files is no fun.
And in the end, every file format had its limitations and problems.
My main "concerns" are that each loader only supports one machine type and I am not sure what role the machine types play in OSCAR or how I can implement a loader that would fill so many channels over different machine types.
I hope that one of the developers can say something about this.
12-14-2024, 11:34 AM (This post was last modified: 12-14-2024, 11:40 AM by littleyoda. Edited 3 times in total.)
RE: OSCAR: Questions regarding a potential import for Garmin data
[I'm not allowed to post links]
Hi
I have a working fork of Oscar where you can import Garmin data.
Currently you have to run a Python programme which generates data and which you can later import into OSCAR.
github.com/littleyoda/oscar/tree/garmin
And the issue in the gitlab repository:
gitlab.com/CrimsonNape/OSCAR-code/-/issues/5
As the approach works for me and no one has shown any further interest so far, I have not developed it any further.
I'm not sure if I really want to port relevant parts of the Python garmin connect library[/url] to C++.
Attached an example with movement and stress level from a garmin watch.