Skip to content

plibither8/fitbit-heart-rate

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

Fitbit Heart Rate Data

πŸ’“ Collect lifetime heart rate data on Fitbit using Puppeteer.

Build Status

A small script that automates the process of collecting heart rate data from Fitbit. Data for each day is stored in a separate JSON file in data/YYYY/MM/DD.json. The data has a granularity of 5 minutes.

Alternately, one can export their entire Fitbit data from their account settings, but that contains way more (granular) data than I require, and it cannot be automated.

I have also set up a cron-based GitHub Action workflow that fetches new heart rate data every day and stores it in a private repository.

Usage

  • Clone this repo.
  • Create a data/ directory to store heart rate data files: mkdir data
  • Set FITBIT_EMAIL and FITBIT_PASSWORD environment variables.
  • Install npm dependencies: npm install
  • Run the script by providing a start date (YYYY/MM/DD format) as an argument (required for the first run): node index <YYYY/MM/DD>

NB:

  • Start date is the date you first started recording your data (started using your Fitbit), or any other date of your choice.
  • The start date argrument is not required on subsequent runs (lastUpdated is stored in data/meta.json).

License

MIT

About

πŸ’“ Collect lifetime heart rate data on Fitbit

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published