Advertisements
Importing Ski Tracks into Fitbit
30 Mar

Importing Ski Tracks into Fitbit

While I was away skiing this year I got into conversation with a few people in our chalet – all of whom use and love Ski Tracks by CoreCorders.

On evening it came up in conversation that we’d all like a way to import our ski runs into Fitbit. After checking the Fitbit forums this seemed like a highly requested feature, so once I got home I set about seeing if it was possible. Read more »

My New Php Fitbit Library is Complete
20 Mar

My New Php Fitbit Library is Complete

ast month I announced I was working on a write of my Drupal/Fitbit module to allow it to run independently of the Drupal framework. What I wanted was a application that would allow me to do everything I was doing before even in a static HTML site – In just over a month and more than 180 commits that’s what I’ve achieved.

My new application is completely separate from the HTML site, meaning it can have its own database and run its own analysis on historical data held there (since Fitbit has an API limit making direct call every time you want to know many any steps you took last week is inefficient, and if the site got heavy load could lead to no getting anything out of the API for an hour or so).

Results from my API are all delivered thru JSON return block that can then be processed using Javascript on directly within the browser. Since the JSON is delivered thru my caching proxy there is very little load on the server, but as an added step each JSON block is cache within the file directory so where there have been no changes this can be sent back instead of rerunning any database queries.

You can see the full API in action on my health section but it supports seven main section

As before the source code will be released and an OpenSource project, but before I do I still have to write an install script and some form of admin UI because at present to get the code up and running you need to spent more time in the MySQL database than is healthy.

If you really can’t wait though drop me a line in the comments section bellow or over the feedback form and I can sort our some early access for you

19 Dec

Content Api

Since I started use Hexo for my site allot of things have been easier. Like creating an API to access the site contents. It was a nightmare for me in Drupal 7 and in the end I gave up long ago but thanks to the work of John Wu and his plugin hexo-generator-api generating a REST-ful JSON API with read-only access to all the sites contents has been the the simplest things I’ve worked on so far.

There are some things I would like to do that aren’t available, but the code is released under the MIT license and I’ve got a fork on github I can work on.

In the mean time I’ve written up some documentation about what is available and how to start making use of it.

Even if you never plan on using my access points to access my own content, (to be fair I can’t see why you would, I just enjoy having it), I hope the documentation can help anyone else who is using the hexo-generator-api plugin on their own site.

07 Dec

MyFitnessPal – Record Water

I’m in the mood for something a little different. So will I’m walking here on the treadmill this afternoon I thougnt I’d share what I’ve been working on. We all know I am a huge fan of MyFitnessPall but a little disapointed there isnt a public API I can write too. So I’ve written a couple of bash scripts I now run on from my Android, these mimic key inputs. Once again, my life is automated!

The first script records water drank, simple pass it a number and it’ll record that number of glasses of water – really simple

The second one completes the days diary. Two very simple scripts, but there are catches. You must have a rooted phone, and you have to be using the Nexus 4. If your not on the Nexus 4 you can edit the first section and update all the X Y codes.

Quick simple and easy. I hope you enjoy!

Record X glasses of water

Complete the days diary

Monday – Week 5 Day 1
02 Dec

Monday – Week 5 Day 1

Week five has began with a bang. I’ve trounced so many of my targets I can’t believe it. I got up learn, by got up I mean didn’t hit snooze, and went straight to the treadmill for a nice 45 minute stroll. Fast but comfortable. I’ve also started using Runtastic‘s Squat app so something new. I’m going to work to the program from the start so it’ll be a slow start.

The name of this game is information. Over the weekend I found did some more work on my Fitbit module, when the phone is in “treadmill” mode I now have live voice alerts of steps taken. This morning was the first practical use and I’ve found it genius to add that extra motivation to go further. I also came across a new Fitbit API call to the friends leader board, so my sites Statistical Trend also lists where I am on the board. Currently I’m second place but its good to see.

As for food well the same goals apply. I’ve had quite a healthy day. I had planned on stake for dinner but in the end opted for the healthier choice of a big salad. I had a few snacks at a work all the same so perhaps I was