Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/plibither8/fitbit-heart-rate
💓 Collect lifetime heart rate data on Fitbit
https://github.com/plibither8/fitbit-heart-rate
fitbit heart-rate puppeteer
Last synced: 12 days ago
JSON representation
💓 Collect lifetime heart rate data on Fitbit
- Host: GitHub
- URL: https://github.com/plibither8/fitbit-heart-rate
- Owner: plibither8
- License: mit
- Created: 2020-04-18T10:43:18.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-09-02T17:08:50.000Z (over 4 years ago)
- Last Synced: 2024-11-15T09:49:56.056Z (2 months ago)
- Topics: fitbit, heart-rate, puppeteer
- Language: JavaScript
- Size: 41 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Fitbit Heart Rate Data
> 💓 Collect lifetime heart rate data on Fitbit using Puppeteer.
![Build Status](https://github.com/plibither8/fitbit-heart-rate/workflows/Heart%20Rate%20Bot/badge.svg)
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](https://github.com/plibither8/fitbit-heart-rate/actions) 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 `#### 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](LICENSE)