Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Sleep Tracking Project - API Question

Hi,

I'm starting a university project that will last 8 weeks and I'm having trouble deciding what to use. I would like to continously monitor my sleep data and send across the sleep stage information to my locally hosted web app. It seems that there are some limitations which I would really appreciate clarity on:

1. If am using the Fitbit Web API, then I can easily talk to it through my Python web app to retrieve the information. However, would this information be live or would it have to be synced to the app first? How often does the Fitbit sync with the Fitbit app and is there any control on this?

2. Is it feasible to create an app that loads on the Fitbit, then continously forces it to sync, then I continue as normal by accessing the info throught the Web API?

3. What would be the best Fitbit device to achieve this - if this is in any way realistic?

 

Any advice or guidance would be really appreciated.

 

Thanks

Best Answer
0 Votes
4 REPLIES 4

An app can't force a fitbit device to sync. It normally happens every 20 minutes, I think.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

Ah ok thanks, so what would you recommend for getting the sleep phase information to a web app?

Best Answer

First, thank you @Gondwana for helping answer their questions.

 

Hi @shafaeali 

 

Here's some information that will help with your Sleep project

 

  1. The Fitbit data is not available live through the Web APIs.  The data is only available once the user syncs their device with the mobile application which can automatically occur about every 15-20 minutes.   As Gondwana stated, you cannot force a device to sync.
  2. Instead of forcing the device to sync, we recommend you use the Subscription API to receive a webhook notification that lets you know when the sync occurred.  We do know allow polling our APIs, so this is the best way to be notified when to pull the new sleep record.   See Using Subscriptions
  3. The Web APIs support all devices.  I'd recommend one that supports sleep stages.   You'll get more information about a user's sleep behavior by understanding when they are in a period of wake, light, deep or rem sleep.  I believe all of the devices on our web site support sleep stages.   Don't look at the Fitbit Ace as this device is designed for children.  Due to privacy concerns, their data will not be available through the Web APIs.
Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer

Hi @GordonFitbit,

 

That's extremely useful information, thank you for the help. I'll post any updates here if that's alright. Thanks again!

Best Answer
0 Votes