I love my Fitbit. If you haven’t heard of a Fitbit yet, it may represent one of the coolest trends in the past few years. It is a small device that you wear on your person and like a pedometer, it tracks your movements, and will record your steps, miles, and calories burned as you tool along on your day. The one thing that it adds is a time variable which allows it to understand how strenuous your walk is or in better words how active you really are. It will even upload your stats wirelessly to a website so you can do things like trend steps and calories overtime, share your stats with friends, enter and track your weight, and even compare calories burned to calories consumed if you use their impressive food diary.
Many years ago, I created a calorie tracker to better watch what I eat and to make sure I wasn’t indulging too often. I wanted Audrey, my personal digital assistant to have access to all the great fitbit data so she can help me stay on track. Like a good assistant, I wanted her to periodically go to the website for me, download my stats like steps, miles, and calories, record them in my local database for history and then get on me when I wasn’t exercising enough. The problem was that when Fitbit was first introduced, they didn’t have an API available yet. Luckily enough, the great hacker community came up with a solution. Eric Blue found a way to log in the website and grab data from how fitbit created their charts. Even wrote a script that we go out, pull down the data, and then parse it for the stuff you looking for. I used that idea to have Audrey go out to the site periodically and grab the statistics. Works beautifully. Since then, they did release an API but they chose to authenticate using oAuth which unfortunately is beyond my current programming skills.
Now I have Audrey go out periodically and download the data , compare to the calories burned from my tracker, and then nags me to take a walk if I’m being a couch potato. I even have her tell me if I’m not meeting my goal of 7 day and 30 day averages. If I’m able to get 10,000 steps in a day, she even automatically posts that accomplishment to my lifestream.
Let me know when the comments if you want any of the code.