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

Calculate Fitbit device wear time though Rest API

Hello community,

 

This is a quite unusual question. I have developed an experimental App that through the Fitbit API collects data from my users.

 

The goal of this App is to monitor my own and my parents data. There are also a couple of other users but they are not consistent and not important for the goal of the app.

Essentially, I monitor whether they walk as they as prescribed to, but I also need to know how much is their wear time.

 

I had figured out an ingenious way to add all the heart rate zones coming from /activities/heart/date endpoint => Total Wear Time = (OutOfRange + FatBurn + Cardio + Peak).

This worked all great but all of sudden the last month their watches, register 1440 minutes OutOfRange. If they did not wear the device at all the API It used to send data without the minutes part on the JSON for each zone.

Additionally, I noticed that some other days the endpoint served a total of 1440 where OutOfRange was filling the void to add up to 1440.

 

My question is, how can I calculate the wear time? I cannot use personal app since sometimes I add some other devices.

Also, has the /activities/heart/date/ endpoint changed where now it does always fill the minutes section of the JSON to add up to 1440?

Best Answer
0 Votes
1 REPLY 1

Hi @AkisAkakis 

 

There isn't a foolproof way through the Web APIs to determine if someone is wearing their device all day.  If the heart rate is always in the OutOfRange zone, how many steps is the person getting per day?   It's possible they are not walking enough to get their heart rate into the other heart rate zones.

 

Gordon

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes