Saving Fitbit data


A while ago I bought myself a FitBit One to keep an eye on exactly how much I walk, it is a little expensive for a pedometer, but I liked the fact it syncs via Bluetooth 4 to a supplied dongle or to an iPhone. The data can be viewed on the dashboard on their site but also – and this is one of the things which attracted me to the FitBit – via an API. I’ve had it for a good while now and figured it was time to start looking into the API.

The first thing I wanted to do was get the historic data and save it somehow. I’ve got that bit working, I have a php script which is authenticated against my account and requests a given days data which is then saved as raw json to a text file.

I’ve no plans to do anything with this data yet, so json in a text file suits me fine. I can read it with pretty much anything and it is easy to backup.

I’ve put the initial simple code up on GitHub which you can see here.

3 thoughts on “Saving Fitbit data”

  1. Sweet.

    We picked up some Withings scales recently which are pretty cool, our weight(s) are uploaded to their server automatically when we stand on it. It has no buttons on it but it knows who I am (flashes “TIM” when I stand on it) so it uploads the correct table in their db.

    They have an API but I don’t think publishing our weight graphs on darkgate is a clever idea. 🙂

  2. ah yes, I’d heard of the Withings API, a friends company (BeeMinder) uses that API to pull your weight into their goal trackers.

    I was vaguely thinking of some FitBit -> Twitter thing which prodded you if you hadn’t walked anywhere for a while. I’ll see how I get on 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *