Fitbit
Webhooks
There is one caveat with Fitbit’s webhooks. Namely, Fitbit computes the basal metabolic rate (BMR) server-side. This is a fairly static value because it depends on data such as height, weight, gender, age, etc. The fact this is computed value server-side is important to keep in mind, because it means you will always receive daily.data.activity.updated
webhooks even if you are not wearing the device.
This can be confusing at times, as someone who is not aware of this might wonder why are they getting only this one webhook and not the others.
If you are only getting daily.data.activity.updated
, the most likely case is that the user is neither wearing the device, or they did not sync their device with the Fitbit app. If you are sure this is not the case, contact us through our support channels.
Respiratory Rate timeseries
Fitbit does not provide detailed breakdown beyond average breaths-per-minute summary on a per sleep stage basis, i.e., REM average, Deep average, Light average and the whole session average.
Given this constraint, Vital constructs a respiratory rate timeseries for Fitbit as follows:
- Vital creates a respiratory rate data point for each hypnogram segment reported.
- The data point value will be one of the four average values mentioned, based on the stage represented by the segment.
- The data point will be timestamped to the midnpoint of the segment.
Time Zone resolution
Fitbit stores all their data in floating time. Moreover, They do not tag most of their data points or summaries with time zone information.
Since Vital uses UTC time basis, Vital has to convert the floating time basis to the UTC time basis, before we can ingest the data and forward it onwards to you. To facilitate this conversion, we must make an educated guess on the user’s time zone.
Vital makes the best time zone guess in the following precedences:
Fitbit Profile
If the user has granted the Profile scope, Vital uses the timezone offset as provided by their Fitbit Profile.
Most recent Fitbit activity
If the user has granted the Activity scope, Vital uses the timezone offset from the most recently recorded activity (if any).
User Fallback Time Zone
If neither Fitbit data sources are available, Vital would use User Fallback Time Zone if it has been set.
Naively assuming UTC
If none of above is available, Vital assumes naively that everything happens in UTC (+00:00).
When your user refuses to grant both the activity and the profile scope, Fitbit data are more likely be timestamped incorrectly in UTC time basis due to inaccurate or unavailable time zone information.