It's the new year and that means we've all got new goals. A common goal for the new year is to be healthier, whether that means eating better, working out more, or being more active in general. My favorite way to keep track of all that is my Fitbit. I have a Fitbit Alta that I wear every day to track my steps, exercise, movement, and sleep. I also log my weight and what I'm eating. It basically keeps track of everything.
The only thing that is missing is allowing me to compare my progress over time. I want to be able to compare different days and see my trends. That is why I stream my Fitbit data to Initial State. It allows me to create a beautiful dashboard complete with emojis that give me instant insight on where I'm at with my goals and I can see my data trends over time.
The first thing you'll need to do is create an Initial State account. Go to https://iot.app.initialstate.com to register a new account or login into your account. It's as simple as entering your email & password. You'll have a 14-day free trial before it requires a subscription and it's free for students with an edu email address.
You will need to create a new bucket for your Fitbit data. Go to your bucket shelf on the left and look for the plus sign cloud button to the right of the search bar. This will create a new stream bucket. Check the Configure Endpoint Keys box to have access to the Bucket Key name. I changed the name of the bucket to "IFTTT Fitbit Health Dashboard" and the bucket key to "fitbit_data", but you can make these whatever you want. Once you've made those changes click the Done button at the bottom and your bucket is now created.
The second account you will need to created is an IFTTT account. Go to https://ifttt.com/ and sign up with a email address, Google account, or with your Facebook account.
Some vocabulary to help us get started with IFTTT. Services are apps and devices you use daily that IFTTT is connected to (Fitbit, Strava, Instagram, Evernote, etc.). Applets use the Services to create actions. We will be creating Applets with Fitbit and Webhooks to send the data to Initial State.
Go to My Applets and click the New Applet button. Click the +this button and search for Fitbit. To start, select Daily Activity Summary. Next click +that and search for Webhooks and select make a web request. In the URL box you will want to copy and paste your API endpoint from your Initial State account. You will find this in the Settings of your Fitbit data bucket. To the end of that API endpoint you will add "&", a data value name, then "=". Click add ingredient and choose the data you want to stream.
For my example I chose Total Steps. So my URL looks as follows:
Select Method as GET. Leave Content Type and Body blank. Once complete click save. You've now created your first Applet!
Create More Applets
Now you need to repeat the last step for all the data you want to track. This can be a bit tedious but it's necessary to track everything you want to track.
I personally decided to track the following:
Total Sleep Time
Lightly Active Minutes
Fairly Active Minutes
Very Active Minutes
Total Calories Burned
Any Applets that use the Daily Activity Summary will update once a day when you sync your Fitbit and the others will update once information is logged (weight, sleep, etc.).
There is one thing to note here. There is a usage limit on the Fitbit service, aka how often you can use it. If a usage limit is reached the applet will generally try to run again later that day. You can view whether an Applet successfully runs by going to the Activity Summary page.