Import personal data from various APIs into InfluxDB
Open each Python script and set your API credentials and InfluxDB server configuration at the top of the file
- RescueTime: Register for an API key at https://www.rescuetime.com/anapi/manage
- Foursquare: Register an app at https://foursquare.com/developers/ and generate an OAuth2 access token
- Fitbit: Register a "Personal" app at https://dev.fitbit.com/ and generate an OAuth2 access token
- Steam: Register for an API key at https://steamcommunity.com/dev/apikey
- Nintendo Switch: You'll need to set up mitmproxy and intercept the Nintendo Switch Parent Controls app on an iOS or Android device to grab your authentication tokens and device IDs
- Xbox Live: Register a profile at https://www.trueachievements.com/ and link it to your Xbox account. You can get your ID number by clicking your "TrueAchievement Points" score on your profile and looking at the leaderboard URL, it will be the
- Google Play Games: Download your Google Play Games archive from https://takeout.google.com/ and extract it in the same folder as the script
- Todoist: Create an app at https://developer.todoist.com/appconsole.html and generate a test token
- GitHub: Create a personal access token at https://github.com/settings/tokens
- Trakt.tv: Register for an API key at https://trakt.tv/oauth/applications and generate an OAuth2 access token, you'll also need to create an API key at https://www.themoviedb.org/settings/api to download movie / show posters
- EDSM: Generate an API key at https://www.edsm.net/en/settings/api
- Exist: Register an app at https://exist.io/account/apps/
Check your Python version and make sure version 3.7 or newer is installed on your system:
$ python3 --version
Install required python3 modules:
$ pip3 install pytz influxdb requests requests-cache instaloader todoist-python trakt.py publicsuffix2
Run each Python script from the terminal and it will insert the most recent data into InfluxDB.
- RescueTime provides data each hour, so scheduling the script as an hourly cron job is recommended.
- Steam provides the recent playtime over 2 weeks, so the first set of data inserted will contain 2 weeks of time. New data going forward will be more accurate as the script will calculate the time since the last run.
- Google Play doesn't provide total play time, only achievements and last played timestamps
- Instagram can take a very long time to download, so by default it will only fetch the 10 most recent posts. Set
0to download everything.
The grafana folder contains json files for various example dashboards.
Most dashboards require the
grafana-piechart-panel plugin, and the Foursquaure panel also requires the panodata
$ grafana-cli --pluginUrl https://packages.hiveeyes.org/grafana/grafana-map-panel/grafana-map-panel-0.8.0.zip plugins install grafana-map-panel
Copyright (C) 2020 Sam Steele. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.