All Projects → pkpio → fitbit-googlefit

pkpio / fitbit-googlefit

Licence: GPL-3.0 license
Export Fitbit data to Google Fit. Unlike the alternatives such as fitnessyncer.com, this offers very fine intraday granularity (every minute/second data).

Programming Languages

python
139335 projects - #7 most used programming language
Dockerfile
14818 projects
shell
77523 projects

Projects that are alternatives of or similar to fitbit-googlefit

dot
distributed data sync with operational transformation/transforms
Stars: ✭ 73 (-83.14%)
Mutual labels:  sync
SyncPro
SyncPro is a Windows app for synchronizing files between various online storage providers (OneDrive, Google Drive, Amazon S3, etc.)
Stars: ✭ 39 (-90.99%)
Mutual labels:  sync
seedboxsync
Script for sync operations between your NAS and your seedbox.
Stars: ✭ 17 (-96.07%)
Mutual labels:  sync
s3-cli
Go version of s3cmd
Stars: ✭ 114 (-73.67%)
Mutual labels:  sync
drive
Google Drive client for the commandline
Stars: ✭ 6,470 (+1394.23%)
Mutual labels:  sync
sink
Uses Facebook profile pictures to provide high resolution photos for your Google contacts
Stars: ✭ 31 (-92.84%)
Mutual labels:  sync
sync-fork
the quickest way to sync your fork: npx sync-fork
Stars: ✭ 15 (-96.54%)
Mutual labels:  sync
sdk-oauth
Fitbit SDK example application.
Stars: ✭ 66 (-84.76%)
Mutual labels:  fitbit
DeviceSync-for-OS-X
Calendar synchronization between iOS and OS X using USB
Stars: ✭ 12 (-97.23%)
Mutual labels:  sync
sync
The main repository for P2P-Sync
Stars: ✭ 15 (-96.54%)
Mutual labels:  sync
snippets
A Chrome extension that allows you to create and edit JavaScript code snippets, which are synced to all your computers
Stars: ✭ 46 (-89.38%)
Mutual labels:  sync
Video-Engine-Dash
A Dash plugin for playing back video and optionally syncing video to timestamped CSV Data
Stars: ✭ 26 (-94%)
Mutual labels:  sync
synx
Better sync package for Go.
Stars: ✭ 20 (-95.38%)
Mutual labels:  sync
taskbutler
Create and add progress bars, Office365 Files and Dropbox Paper papers by labels and link them to your Todoist tasks.
Stars: ✭ 44 (-89.84%)
Mutual labels:  sync
MEGA Manager
Cloud syncing manager for multiple MEGA cloud storage accounts with syncing, data gathering, compresssion and optimization capabilities.
Stars: ✭ 29 (-93.3%)
Mutual labels:  sync
saisoku
Saisoku is a Python module that helps you build complex pipelines of batch file/directory transfer/sync jobs.
Stars: ✭ 40 (-90.76%)
Mutual labels:  sync
haconfigs
My Home-Assistant configuration files
Stars: ✭ 61 (-85.91%)
Mutual labels:  google-fit
biometric-attendance-sync-tool
A simple tool for syncing Biometric Attendance data with your ERPNext server
Stars: ✭ 95 (-78.06%)
Mutual labels:  sync
php-task
Interface library for the PHPTask library
Stars: ✭ 23 (-94.69%)
Mutual labels:  sync
fitbitr
Interact with Fitbit data in R using Fitbit API
Stars: ✭ 44 (-89.84%)
Mutual labels:  fitbit-data

Introduction


Export all your Fitbit data to Google Fit. If you find this useful, please star the repository on Github.

Unlike other alternatives, such as fitnessyncer.com, this aims to offer very fine granularity for the data.

Fitbit Steps GoogleFit Steps demo

Features


  • Steps - minute level precision
  • Distance - minute level precision
  • Heart rate - second level precision
  • Weight
  • Body fat percentage
  • Activities
    • Running
    • Swimming
    • Biking
    • Volleyball
    • Walking
    • Badminton
    • Workouts
    • Fencing
    • Cricket
    • Football
    • Hiking
    • And a [few others][activities] -- suggestions welcome!
  • Calories - minute level precision
  • Sleep logs - minute level precision

Adding new activities

To add new activities

Setup


You have to register your own Fitbit and Google Fit applications. This setup is a one time thing.

  1. Install dependencies

This is a python3 application so install all the dependencies

  • Create virtualenv virtualenv fitbitenv
  • Activate env source fitbitenv/bin/activate
  • Install dependencies using pip3 install -r requirements.txt
  1. Fitbit setup

All instructions below must be performed using the same Fitbit account you want to sync with Google Fit.

Application Name : --
Description : --
Application Website : --
Organization : --
Organization Website : --
OAuth 2.0 Application Type : **Personal**
Callback URL : http://localhost:8080/
Default Access Type : Read-Only

Note : 
1. Use your own information for fields marked --
2. Make sure you copy the Callback URL exactly (including the last /)
3. Application Type MUST be Personal
  • Hit save and make a note of OAuth 2.0 Client ID and Client Secret
  • Navigate to auth folder cd /auth
  • run python3 auth_fitbit.py -i <client-id> -s <client-secret>
  • This opens a popup in the browser. Authenticate and done!
  1. Google Fit setup

  • Go to the Google Developers Console
  • Click Continue. Then select Go to credentials and select Client ID
  • Under Application type, select Other and hit Create
  • Make a note of client ID and client secret
  • Navigate to auth folder cd /auth
  • run python3 auth_google.py -i <client-id> -s <client-secret>
  • This opens a popup in the browser. Authenticate and done!

Usage


Get your Google Developer Project Number (a 12 digit number) from a the Google Developers Console

Update project_number in config.ini to be your Google Developer Project Number.

Modify any other variables you'd like in config.ini with your own choices and start the sync using python3 app.py

Sync examples:

  • With date stamps : python3 app.py -s 2016-08-20 -e 2016-08-22
  • Last 3 days : python3 app.py -s "2 days ago" -e tomorrow
  • January month : python3 app.py -s "jan 1 2016" -e "feb 1 2016"

Setup autosync:

You can setup a cron task to automatically sync everyday at 2:30 AM.

30 2 * * * /path-to-repo/fitbit-googlefit/cron.sh >> /path-to-repo/fitbit-googlefit/cron.log 2>&1

Add above line to your cron tab: crontab -e in Linux. Sync logs will be stored to cron.log in repository.

Headless authentication


If you want to do the authentication process on a system without a display - such as a raspberry pi or a remote server, pass --console or -c option to the authentication scripts. See below examples.

python3 auth_fitbit.py -i clientid -s clientsecret --console

python3 auth_google.py -i clientid -s clientsecret --console

Note :

  1. Get command line help using the -h flag.
  2. Arguments passed through command-line take higher priority over config.ini values.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].