Total sleep hours from Fitbit importing weird?


Hi Bee crowd:

I’ve already sent a help email about this, but wanted to see what other users are experiencing in terms of Sleep data.

Summary: fitbit’s TotalAsleep time imported by beeminder does not match any of my sleep stages, total asleep time, or total time in bed.

I’m wondering what other people who are using sleep hours goals are getting and if there’s just some math applied to the hours slept?

This is what Beeminder is receiving from fitbit, and totalAsleep is being used on my goal graph:
17th {:totalAsleep=>2.216666666666667, :totalInBed=>7.583333333333333},
16th {:totalAsleep=>3.3833333333333333, :totalInBed=>8.15},
15th {:totalAsleep=>3.1333333333333333, :totalInBed=>8.45},
14th {:totalAsleep=>2.433333333333333, :totalInBed=>6.9},
13th {:totalAsleep=>3.2666666666666666, :totalInBed=>6.15},
12th {:totalAsleep=>2.216666666666667, :totalInBed=>7.116666666666666},
11th {:totalAsleep=>3.0833333333333335, :totalInBed=>8.216666666666667},
10th {:totalAsleep=>3.283333333333333, :totalInBed=>9.733333333333333},
09th {:totalAsleep=>2.933333333333333, :totalInBed=>5.266666666666667}

The “totalAsleep” numbers match what is being imported into my sleep goal. (See attached image)

However, this doesn’t match even closely to my sleep data in fitbit, either total time slept, time in bed, or any individual sleep stage, as you can see in my log, as well as a detailed breakout of yesterday’s data. (See attached image).

Either way, very confusing, and I keep having to manually update my numbers. about to switch to a manual entry or IFTTT goal which would use a different fitbit field, so I can actually add a pledge to the goal.



The difference turns out to be accounted for by us using an older version of Fitbit’s API. I’ve compared the output from the old vs the new v1.2 api and the outputs from v1.2 matches what Fitbit is showing in the Fitbit app.

I still have to check to through fitbit’s changelog for breaking changes to see if we can just flip over to the newer version, or if we’ll need to make any patches or other changes to the integration.