-
Notifications
You must be signed in to change notification settings - Fork 150
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
No sleep data in database #150
Comments
I haven't tested local copy from watch to DB since I got a Fenix 6 which connects with MTP protocol. It's possible it isn't working anymore. What does the log file say? Test just the import: |
Actually, I think I see the issue. It's currently only matching JSON sleep files during import. What are the FIT sleep files named? Can you give me some examples? |
Depending on what the sleep FIt files are named, this might be a work around: |
Example names of the FIT sleep file are: S1U00000.FIT, S2A00000.FIT, S2E00000.FIT, C1T83425.fit, S2E13300.FIT, etc. |
Sleep FIT files have the raw sleep levels at a point in time. It's a stream of sleep level and timestamp. From that you can construct the data in the sleep_events table, but the aggregate data in the sleep table will require summarizing the data in the sleep_events table. |
…auses sleep_events to be populated from FIT files rather than Garmin Connect JSON data
Please test the develop branch. see the above new commit. Update and set the new config item "sleep_from_fit" to true then import sleep data and it will import from FIT files rather than Garmin Connect downloads. |
…eep data from FIT files. Needs no config
Latest on develop has a better way to decide between getting sleep data from Garmin Connect and getting sleep data from FIT files. No config needed. |
After testing this, you should see that your sleep_events table has data. There is additional work needed to generate the data in the sleep table. |
Works great, the sleep_events table has data now! Thank you! |
I will aggregate the stats in sleep_events to get per day totals of time in each sleep state at some point. Im not sure where the other data: sleep spo2, sleep rr, and sleep stress comes from right now. |
I've copied the following folders from my watch to C:\GARMIN
Activity, Monitor, Settings, Sleep
I run the following command:
C:\Anaconda3\Scripts>python garmindb_cli.py --sleep --copy --import --analyze
44 sleep fit-files are copied from "C:\garmin\sleep" to C:\Users\Admin\HealthData\FitFiles\Monitoring\2022
But the "Processing sleep data"-part of the script seems to be skipped (there is no progress bar).
After the tables are generated the sleep-table in the garmin.db is empty and also in the other databases/tables there is no sleep data.
What am I doing wrong?
The text was updated successfully, but these errors were encountered: