Hi there,
What I like best about your app, is the possibility to attach tags to sleep records, and run statistics on them to find out how to optimize deep sleep percentage.
It's always been a bummer that I couldn't use my Fitbit Flex to register the sleep quality into Sleep.
Now, in December 2015, Fitbit introduced a new app type to their OAuth, which exposes the user's intraday data.
The intraday data looks like this, where the minute values map to 1 ("asleep"), 2 ("awake"), or 3 ("really awake").
{"sleep":[{"awakeCount":3,"awakeDuration":16,"awakeningsCount":22,"dateOfSleep":"2016-02-13","duration":35160000,"efficiency":53,"isMainSleep":true,"logId":10870743534,"minuteData":[{"dateTime":"00:25:00","value":"2"},{"dateTime":"00:26:00","value":"2"},{"dateTime":"00:27:00","value":"2"},{"dateTime":"00:28:00","value":"2"},{"dateTime":"00:29:00","value":"2"},{"dateTime":"00:30:00","value":"2"},{"dateTime":"00:31:00","value":"2"},{"dateTime":"00:32:00","value":"2"},{"dateTime":"00:33:00","value":"2"},{"dateTime":"00:34:00","value":"2"},{"dateTime":"00:35:00","value":"2"},{"dateTime":"00:36:00","value":"2"},{"dateTime":"00:37:00","value":"2"},{"dateTime":"00:38:00","value":"2"},{"dateTime":"00:39:00","value":"2"},{"dateTime":"00:40:00","value":"2"},...,{"dateTime":"10:10:00","value":"2"}],"minutesAfterWakeup":45,"minutesAsleep":270,"minutesAwake":236,"minutesToFallAsleep":35,"restlessCount":19,"restlessDuration":300,"startTime":"2016-02-13T00:25:00.000","timeInBed":586}],"summary":{"totalMinutesAsleep":270,"totalSleepRecords":1,"totalTimeInBed":586}}
I'm aware that this isn't live data, and that it's inserted after the tracker syncs to the Fitbit service.
But it's the next best thing, so if we could get this data into SleepCloud, that would be a step forward.
I have a small working Java program which authenticates using OAuth 2.0 and fetches the above data, but nowhere to upload it to :)
Another approach would be to sync the Fitbit data into Google Fit, which could in theory pass its data into Sleep I'm presuming.
I think this shows promise.
What do you guys think? Doable?
Kind regards,
Wim Vanhooff