05-11-2018 05:35
05-11-2018 05:35
I've been trying to get the most detailed information possible from my fitbit device, meaning:
- HR per second (not evrey 10 seconds)
- GPS data - during all the day
- Sleep information (including the different sleep stages)
So far, I tried to connect through the fitbit web api to get this information, but there were some problems:
1. HR data - only saves (or, I should say only returns) the beats once every 10 seconds or so.
I'm accessing it through
client.intraday_time_series('activities/heart',detail_level='1sec')
And I was wondering if there is any way to get the "real" one-second detail of the HR?
2. Sleep information - I managed to get the 30-seconds details, but in a scale from 1 to 3 ("asleep", "awake", "restless") and not from 1 to 4 ("deep", "light", "REM", "wake")
I saw here: https://dev.fitbit.com/build/reference/web-api/sleep/ that there should be a more detailed sleep info, and also checked to make sure that my device support it (it's an alta hr), but i'm not sure how to get it?
3. GPS data - I didn't seccessfully got a tcx file yet, but that might be a problem with the syncing so for now I still have more checks to do.
(all of that through the web api, connecting with a "personal use" app, to my own user)
I'm wondering if there is any way I can get that data through the api or that the best way for me to have that information is to write an app for the watch that will save the data and sync it (is it even possible?) ?
Answered! Go to the Best Answer.
05-14-2018 20:11
05-14-2018 20:11
You can only write apps for the watch itself if the watch itself is a Fitbit OS device. ATM that means Ionic and Versa. However, on those devices, I'm pretty sure you can get real-time HR data updated every 1 to 3 seconds (ie, same as you'd get eventually via the Web API).
05-11-2018 14:28
05-11-2018 14:28
My Fitbit Surge normally recorded HR at intervals of 5, 10 or 15 sec; but during activity periods this dropped to 1,2 or 3 seconds. My Ionic seems to record at 1, 2 or 3 seconds at all times.
05-13-2018 04:58
05-13-2018 04:58
Hey @Gondwana !
Thanks for the info, it got me to think that maybe the device itself is not meassuring the heart rate in those rates. And so I found out that not all the fitbit devices save the HR in the same frequencies.
These are some posts with information about it:
https://community.fitbit.com/t5/Alta-HR/Heart-rate-recording-frequency/td-p/2133184
Any way, this solves the HR mystery- although now i'm not sue if I will write an app that samples the HR and syncs it - will I be able to get better sample rates? or will it be limited to the device sample rates?
05-13-2018 13:41
05-13-2018 13:41
If HR is, say, 60 bpm and you're sampling it every second, that's about as precise as you can get! If it were sampled even half a second (and not smoothed), you'd get successive readings of 0, 120, 0, 120, 0, 120, ...
For exercise/fitness purposes, changes within one second are probably not substantial or significant. Because Fitbits aren't medical devices, they don't try to track waveforms.
05-14-2018 08:15
05-14-2018 08:15
@Gondwana you're absolutely right, and i'm not looking for a less than a second details, but my alta hr only samples once every ~7 seconds (in avarge), and I'm wondering if this is the best that I can get with it
05-14-2018 13:50
05-14-2018 13:50
That sounds about right. During activities, that can drop to 1-3 seconds. You might be interested in downloading the raw(ish) Web API data so you can see the details. One option is here.
05-14-2018 14:01
05-14-2018 14:01
@Gondwana the details I see now are the ones i got through the web API-
(all of that through the web api, connecting with a "personal use" app, to my own user)
I know that this is the best i can get like that, but if i will write an app for the watch itself - will I be able to get better sampling rates? Is it something worth working on?
05-14-2018 20:11
05-14-2018 20:11
You can only write apps for the watch itself if the watch itself is a Fitbit OS device. ATM that means Ionic and Versa. However, on those devices, I'm pretty sure you can get real-time HR data updated every 1 to 3 seconds (ie, same as you'd get eventually via the Web API).
05-15-2018 00:11