• Stars
    star
    491
  • Rank 89,636 (Top 2 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created over 8 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Export Fitbit data to Google Fit. Unlike the alternatives such as fitnessyncer.com, this offers very fine intraday granularity (every minute/second 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.

More Repositories

1

MDroid

Moodle for Android
Java
36
star
2

GroupChat

Group chat application developed for Android workshop session. Everyone comments on the same thread.
Java
19
star
3

bard-linux

[GSoC] Beagle -> Android remote display. Kernel modules source.
C
14
star
4

trading212-csv

Converts Trading 212 CSV files to different formats such Yahoo Finance CSV
Python
13
star
5

Trading212-CSV-Exporter

Exports Trading 212 transactions
Python
12
star
6

bard-droid

[GSoC] Beagle Android Remote Display. Android application source.
Java
10
star
7

ntp-timesync

Java-based client/server application that calculates the time difference between the system clocks of both client and server.
Java
9
star
8

securePUF

An implementation of Lightweight Secure Physically Unclonable Function.
Verilog
7
star
9

home-lab

Home assistant setup, config and docs related to this
JavaScript
5
star
10

pkp.io-old

My humble space on web
HTML
4
star
11

adk-driver

Kernel driver to set any Android device into ADK (Accessory Development Kit) mode.
C
4
star
12

PDL

Programmable Delay Lines on FPGA
Verilog
2
star
13

fitgoal

A web app that generates public graphs for distance covered in a year
Python
2
star
14

dagger-mvp

A sample Android application to use dagger with MVP architecture.
Java
2
star
15

iitb_h6

Hostel 6 final website
PHP
2
star
16

8051Codes

Display unit, Keyboard, Stepper Motorm DC Motor and other interfaces for 8051 microcontroller in C and assembly language
Assembly
2
star
17

MugShot

Android application which can take picture of the intruder on a pre-set number of device unlock failures and upload the pic taken to dropbox (Not just saving to DCIM folder)
Java
2
star
18

SIRC_HW

Implementation of SIRC, hardware end code for a Xilinx virtex 5 XUPV5 and virtex 6 ML605 devices inside folders. This project has separate works which are made to work with both actual hardware PUF and software PUF. PUF - Physically Unclonable Function.
Verilog
2
star
19

SIRC_HW_Xilinx_ML605_Hardware_PUF

Implementation of SIRC, hardware end code for a Xilinx virtex 6 ML605 device. This project is made to work with a actual hardware PUF. PUF - Physically Unclonable Function.
Verilog
2
star
20

codejam

Google Codejam 2016
Python
1
star
21

praveendath92.github.io

HTML
1
star
22

apkToSource

[NOTE:] This is no special creation. Just a quick way to decompile apks into a readable java code.
Shell
1
star
23

blog.pkp.io

My static blog setup using jekyll
Ruby
1
star
24

pkpio.github.io

HTML
1
star
25

resume

Place to brag
TeX
1
star
26

GitDroid

A git client for Android
Java
1
star
27

SIRC_HW_Xilinx_XUPV5_Software_PUF

Implementation of SIRC, hardware end code for a Xilinx virtex 5 XUPV5 device. This project is made to work with a software PUF. i.e., A software module implementation of PUF behaviour. PUF - Physically Unclonable Function.
Verilog
1
star
28

Brainfuck

Brainfuck scripts I do when I'm hopelessly bored at doing anything else.
1
star
29

distributed-snapshot

Snapshot-Algorithm by Chandy and Lamport
Java
1
star
30

token-bucket

A visualization of the Token Bucket
JavaScript
1
star
31

Aagomani12

Aagomani 2012 website - Complete code
PHP
1
star
32

Greey4Tasks

EE 677: VLSI CAD course project - Greedy algorithm for activity and task sheduling
C++
1
star
33

TumTumTracker

TumTracker Android application source code.
Java
1
star
34

dual_core_PUF_with_PDL_and_ethernet

Implementation of a dual core adder based PUF on FPGA. To be submitted for the Design Automation Conference' 14
Verilog
1
star
35

DDR2_Interface_Xilinx_XUPV5

Interfacing the DRAM of a Xilinx virtex 5 XUPV5 FPGA board
Verilog
1
star
36

dual_core_PUF_with_PDL_and_ethernet_SW

Implementation of a dual core adder based PUF on FPGA. To be submitted for the Design Automation Conference' 14
C++
1
star
37

xf-video-udlfb

A frontend to trigger DisplayLink kernel driver. Works with udlfb. Need to test with udlfb_min. Forked from http://git.plugable.com/gitphp/index.php?p=xf-video-udlfb
Shell
1
star
38

SIRC_HW_Xilinx_XUPV5_Hardware_PUF

Implementation of SIRC, hardware end code for a Xilinx virtex 5 XUPV5 device. This project is made to work with a actual hardware PUF. PUF - Physically Unclonable Function.
Verilog
1
star
39

usp

USP - USB Streams Protocol is an imitation of the stream control transport protocol of networks in context of USB transfer in kernel space.
C
1
star
40

Greed4Speed

Greed4Speed - A car racing game coded on a de0nano fpga using graphical lcd and gsensor
Verilog
1
star