06-01-2018 02:01
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

06-01-2018 02:01
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I would like to show sleep data on my Fitbit Versa. Is there a way to get your sleep data straight from the Fitbit device without using the web api? I've looked through the device API but I only seem to find information like heart-rate, user-activity (steps, stairs,...), etc.
I would like to have an app on my Fitbit which shows me how much I slept straight after I woke up without having to sync with my phone and then open the sleep part of the Fitbit phone app. It would be nice not having to use the web api so my Fitbit doesn't need to be connected to my phone for internet.
Answered! Go to the Best Answer.

Accepted Solutions
06-01-2018 03:11
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


06-01-2018 03:11
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
That's my understanding, yes. Even if some sleep processing is done on the device (which I doubt), there's no way to access it via the Device API. You'd have to do the processing yourself. The hardest part of that would be determining how to interpret the sensor readings in terms of sleep stages, etc.
I don't use my Fitbit's sleep data because it can't distinguish between when I'm asleep and when I'm watching TV. You may be able to come up with a better algorithm than Fitbit!
Gondwana Software

06-01-2018 02:14
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


06-01-2018 02:14
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Short answer: no.
It could be done if your app ran all night and assessed the various sensor readings continually, then made its own decisions about your sleep state. NOT trivial to do.
Gondwana Software

06-01-2018 02:21
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

06-01-2018 02:21
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
So I guess that when syncing with your phone the data is sent to Fitbit servers and processed over there? And the only way to get similar result without syncing is processing the data itself on the fitbit and the fitbit does not have that native functionality?

06-01-2018 03:11
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


06-01-2018 03:11
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
That's my understanding, yes. Even if some sleep processing is done on the device (which I doubt), there's no way to access it via the Device API. You'd have to do the processing yourself. The hardest part of that would be determining how to interpret the sensor readings in terms of sleep stages, etc.
I don't use my Fitbit's sleep data because it can't distinguish between when I'm asleep and when I'm watching TV. You may be able to come up with a better algorithm than Fitbit!
Gondwana Software

06-01-2018 03:24 - edited 06-01-2018 03:27
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

06-01-2018 03:24 - edited 06-01-2018 03:27
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Ok, thanks for your reply!
I would have to do more research if I want to interpret and process the sensor readings myself. If that would be feasible I might do that but I fear it will be too complex to do this as a side project if I can't find good information on how to get and process the data.

06-01-2018 10:38
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


06-01-2018 10:38
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
You can query the Web APIs as mentioned, there's an example app here https://github.com/Fitbit/sdk-oauth

06-04-2018 01:45
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

06-04-2018 01:45
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Thanks for the reply. Can I assume that there is no code freely available which analyses the sensor data resulting into the amount of sleep and the different sleep stages?

