Skip to main content

A simple script to sync Gadgetbridge exported data to Google Fit

Project description

FitBridge

PyPI Downloads GitHub
--WIP--
A simple script to sync Gadgetbridge exported data to Google Fit. Currently, only the Mi Band data is supported.

Install and Usage

This project is not recommended for normal users because it's not user friendly at all. I strongly suggest to only use this script if you know what you're doing.

You can install and run this script in Termux.

  1. Go to the Google API Console.
  2. Select a project, or create a new one.
  3. Click Continue to enable the Fitness API.
  4. Click Go to credentials.
  5. Click New credentials, then select OAuth Client ID (You may need to create a "OAuth consent screen" first, make sure you add your Google Fit account's Gmail address in "Test users" when creating a "OAuth consent screen").
  6. Under Application type, select "Desktop app".
  7. When the OAuth client is created, Click on "DOWNLOAD JSON".
  8. Install FitBridge:
pip install FitBridge
  1. Run the script for the initial setup:
$ FitBridge 

It seems that you are running this script for the first time (or the config directory is lost), Do you want to create a new config? (y/n): y

Enter the path to the client_secret.json file: PATH_TO_CLIENT_SECRET

Enter the path to the Exported GadgetBridge database file: PATH_TO_GB_DB

Adding DataSources to the API automatically? (If not, you have to create them manually and add data_source_ids to the config) (y/n): y
The steps DataSource successfully registered: XXX
The heart_rate DataSource successfully registered:: XXX

Done!
  1. After the initial setup is done, You can sync the new data from the Gadgetbridge exported database by simply running the script again (Only the unsynced data will be synced):
$ FitBridge
Steps: Read 10 Rows
Steps: The dataset was successfully inserted.
Steps: The latest timestamp inserted is 1685964790
Heart Rate: Read 96 Rows
Heart Rate: The dataset was successfully inserted.
Heart Rate: The latest timestamp inserted is 1685964970

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

FitBridge-0.3.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

FitBridge-0.3-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

Details for the file FitBridge-0.3.tar.gz.

File metadata

  • Download URL: FitBridge-0.3.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for FitBridge-0.3.tar.gz
Algorithm Hash digest
SHA256 21dd8a349fa3f36945881e5d4a864fab802d9cb742685332e6f00ce15a7bc6c4
MD5 9901e05bc936c472c0f35f9b9f16ef08
BLAKE2b-256 dba0c2070c47fe09cb570de90dba51913cfa03b09cc3d7049d50c2aa37987ccb

See more details on using hashes here.

File details

Details for the file FitBridge-0.3-py3-none-any.whl.

File metadata

  • Download URL: FitBridge-0.3-py3-none-any.whl
  • Upload date:
  • Size: 18.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for FitBridge-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 af20f79ffde80fe42bcf391bcb78cacf4eae3126e1eaba88a3bc540b57f3f2f5
MD5 e24df17ed9c28dbd95eec9a79c62a4db
BLAKE2b-256 9d63715e28d9f07eba3e2800a96bdf39db00168b1e21d41c99735a5f8c2b74e0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page