A script to fetch data from Fitbit servers using their API and store the data in a local influxdb database.
Set up influxdb 1.8 ( direct install or via docker ). Create a user with a password and an empty database.
Set up grafana recent release ( direct install or via docker )
Follow this guide to create an application. This will give you a client ID, client secret, and a refresh token ( end step after following OAuth setup )
- FITBIT_LOG_FILE_PATH = "your/expected/log/file/location/path"
- TOKEN_FILE_PATH = "your/expected/token/file/location/path"
- INFLUXDB_USERNAME = 'your_influxdb_username'
- INFLUXDB_PASSWORD = 'your_influxdb_password'
- INFLUXDB_DATABASE = 'your_influxdb_database_name'
- client_id = "your_application_client_ID"
- client_secret = "your_application_client_secret"
- DEVICENAME = "Your_Device_Name" # example - "Charge5"
- AUTO_DATE_RANGE selects current date by default, if you want to load past data into the database, simply make it to False and the script will ask for start and end dates ( in YYYY-MM_DD format ) at runtime.
