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.
Subscribe via RSS