I'm looking at the sleep section of the WebAPI docs and I can't tell when the logs are updated. I want to create an app that can track how long and what stage of sleep I am in to dynamically adjust when my alarm goes off (all of this happens while I am asleep). Will one of the end-points be able to give me that data that I can periodically pull every half hour or so? Thanks!
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
Hi @Nicolas_N
The Get Sleep Log endpoint will display the sleep stages for you, but I'm not sure if the algorithm runs every time the device syncs while the user sleeps, or after the user officially wakes up. I'll need a few days to track down the answer for you.
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
Unfortunately, the Web APIs are not going to work for you, since they don't send live sleep data to your tracker/smart watch. The only suggestion I can provide is to build an application for the swart watch (Ionic or Versa family) that would track your movement and heart rate, similarly to what our sleep tracking functionality does today. To do this, look at the Device SDK, https://dev.fitbit.com/build/reference/device-api/. Support for the Device SDK is handled through the SDK forums, https://community.fitbit.com/t5/SDK-Development/bd-p/sdk. I understand the developers are fairly active and might be able to provide suggestions on how you can determine when you're awake or asleep using heart rate and accelerometer data (movement).
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
Best Answer