Get Physically Fit with Fitlet and Fitbit
Posted: Tue May 10, 2016 2:02 am
Overview
Obtaining and maintaining a state of physical fitness is a lifestyle for some and should probably be a goal for the rest of us. The positive aspects of a physically active lifestyle are well known and documented. Some of the proven and likely benefits are:
- Weight Control
- Reduced risk of cardiovascular disease via lower cholesterol levels and other mechanisms
- Reduced risk of diabetes
- Stronger bones and muscles
- Improved mood and lessened levels of depression
- Improved Sleep
- Higher energy levels through increased metabolic rate and cardiovascular improvement
- Reduced stress levels
- Reduced cognitive decline due to ageing
- Improved brainpower and memory
- Lower risk for cancer (primarily breast and colon
- And many more
In recognition of growing consumer interest in the benefits of exercise and the resulting market opportunities, a growing number of companies are introducing wearable fitness trackers. Such trackers are often configured as arm bands which are quite stylish and popular. A few of those now available include the Nike FuelBand, Jawbone Up Series, Under Armour Band, Microsoft Band, Garmin Vivoactive, and Fitbit products.
The features available in wearable band fitness trackers vary with price and range from spartan types with no display to watch type units with color displays. The on board sensors begin with 3-axis accelerometers on the low end and add things like gps as the price increases.
All of the wearable fitness tracking systems are similar in that they use their sensor data and attempt to deduce the wearer's level of physical activity by way of complex algorithms. Parameters reported to the user include items such as steps taken, miles walked, calories burned, stairs climbed, and so forth. They all claim to be reasonably accurate, but is likely the higher cost units with more sensors produce the best accuracy.
This app note focuses on integrating the Fitbit Flex with Compulab's Fitlet. The Fitbit device was chosen for this project because Fitbit products are very popular and because there is a free and open source software package available for Fitbit. That being said, it may be possible to integrate other brands using Linux, but I have not researched this.
Hardware
The hardware used in this project includes:
1. Fitlet Computer running Linux Mint 17.3
2. Fitbit Flex personal fitness tracker
3. Fitbit Bluetooth Low Energy (4.0) USB Dongle.
Software
As is often the case, Fitbit does not offer an official software package for Linux. As is the norm, the manufacturer only provides apps for Windows, IOS, and Android. Fortunately for those of us in the Linux community, the developer BenoƮt Allard has provided us with a free and open source package called Galileo. It would seem that the greater community owes a debt of gratitude to Mr. Allard for his contribution.
Galileo is not a GUI/HMI application. Instead, Galileo is a command line based package which features a background daemon which syncs the Fitbit wearable tracker to the user's online Fitbit account and dashboard. This approach is in keeping with the official Windows software. Galileo is written in python and is actively maintained and supported.
Software Installation
Installing Galileo is simple and straightforward. There are 3 installation methods which include:
1. Using Pip
2. Using distribution packages
3. Cloning locally and manually installing required dependencies
I elected to use the Ubuntu distribution package, and this worked well for me.
For specific installation instructions for the 3 methods see the following web page.
https://bitbucket.org/benallard/galileo
If you plan to run Galileo as a non-root user, you will have to modify your udev rules accordingly by adding the file 99-fitbit.rules to the directory /etc/udev/rules.d
Again, the instructions for udev are available in the above listed web page.
Running The Software
In general, Galileo runs in the background and syncs with the fitbit servers every 15 minutes. You can also actively run the software by issuing the command galileo in your terminal. However, in my case running Galileo using the basic command proved to be a bit problematic as it often returned errors instead of a successful sync. I found running Galileo using the --v (verbose) command line switch proved to be much more reliable. The resulting command galileo --v proved to produce more consistent syncs.
Obtaining and maintaining a state of physical fitness is a lifestyle for some and should probably be a goal for the rest of us. The positive aspects of a physically active lifestyle are well known and documented. Some of the proven and likely benefits are:
- Weight Control
- Reduced risk of cardiovascular disease via lower cholesterol levels and other mechanisms
- Reduced risk of diabetes
- Stronger bones and muscles
- Improved mood and lessened levels of depression
- Improved Sleep
- Higher energy levels through increased metabolic rate and cardiovascular improvement
- Reduced stress levels
- Reduced cognitive decline due to ageing
- Improved brainpower and memory
- Lower risk for cancer (primarily breast and colon
- And many more
In recognition of growing consumer interest in the benefits of exercise and the resulting market opportunities, a growing number of companies are introducing wearable fitness trackers. Such trackers are often configured as arm bands which are quite stylish and popular. A few of those now available include the Nike FuelBand, Jawbone Up Series, Under Armour Band, Microsoft Band, Garmin Vivoactive, and Fitbit products.
The features available in wearable band fitness trackers vary with price and range from spartan types with no display to watch type units with color displays. The on board sensors begin with 3-axis accelerometers on the low end and add things like gps as the price increases.
All of the wearable fitness tracking systems are similar in that they use their sensor data and attempt to deduce the wearer's level of physical activity by way of complex algorithms. Parameters reported to the user include items such as steps taken, miles walked, calories burned, stairs climbed, and so forth. They all claim to be reasonably accurate, but is likely the higher cost units with more sensors produce the best accuracy.
This app note focuses on integrating the Fitbit Flex with Compulab's Fitlet. The Fitbit device was chosen for this project because Fitbit products are very popular and because there is a free and open source software package available for Fitbit. That being said, it may be possible to integrate other brands using Linux, but I have not researched this.
Hardware
The hardware used in this project includes:
1. Fitlet Computer running Linux Mint 17.3
2. Fitbit Flex personal fitness tracker
3. Fitbit Bluetooth Low Energy (4.0) USB Dongle.
Software
As is often the case, Fitbit does not offer an official software package for Linux. As is the norm, the manufacturer only provides apps for Windows, IOS, and Android. Fortunately for those of us in the Linux community, the developer BenoƮt Allard has provided us with a free and open source package called Galileo. It would seem that the greater community owes a debt of gratitude to Mr. Allard for his contribution.
Galileo is not a GUI/HMI application. Instead, Galileo is a command line based package which features a background daemon which syncs the Fitbit wearable tracker to the user's online Fitbit account and dashboard. This approach is in keeping with the official Windows software. Galileo is written in python and is actively maintained and supported.
Software Installation
Installing Galileo is simple and straightforward. There are 3 installation methods which include:
1. Using Pip
2. Using distribution packages
3. Cloning locally and manually installing required dependencies
I elected to use the Ubuntu distribution package, and this worked well for me.
For specific installation instructions for the 3 methods see the following web page.
https://bitbucket.org/benallard/galileo
If you plan to run Galileo as a non-root user, you will have to modify your udev rules accordingly by adding the file 99-fitbit.rules to the directory /etc/udev/rules.d
Again, the instructions for udev are available in the above listed web page.
Running The Software
In general, Galileo runs in the background and syncs with the fitbit servers every 15 minutes. You can also actively run the software by issuing the command galileo in your terminal. However, in my case running Galileo using the basic command proved to be a bit problematic as it often returned errors instead of a successful sync. I found running Galileo using the --v (verbose) command line switch proved to be much more reliable. The resulting command galileo --v proved to produce more consistent syncs.