The Confusatory

cbowns’s tumblr.

  1. Importing Weightbot Data to Fitbit

    I’ve used Weightbot every day since 2008 to track my weight. I bought a Fitbit Aria this spring to make everyday tracking even easier, and use TrendWeight to view Fitbit’s data in much prettier and data-rich graphs with trend lines and moving average calculations.

    I wanted to add my old Weightbot data to Fitbit, but hand-entering over a thousand weights on seemed low-tech and laborious. Weightbot has CSV exporting as part of their backup service, so I downloaded all of my data in a machine-parseable format. Handling OAuth handshaking and request signing with the Fitbit API to programmatically enter them was a pain, but I lucked out when I found OAuthSimple: it meant I could ignore HMAC SHA-1 signatures and shared secrets and all that nonce(nse), and focus on writing the rest of the two scripts.

    Introducing Fitbit OAuth and Weight Upload. The readme has detailed instructions about registering an application with Fitbit to get an API key, and the scripts will help you get a valid OAuth token so it can upload a whole CSV file. Let me know if you have issues, and fork it if you want it to do more.

    1. cbowns posted this
blog comments powered by Disqus