Skip to content

leshy/oura_sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OURA -> INFLUXDB sync

Quick start

Docker

docker run \
 -e OURASYNC_OURA_TOKEN=$(pass oura/token) \
 -e OURASYNC_INFLUXDB_TOKEN=$(pass influxdb/token) \
 -e OURASYNC_INFLUXDB_URL="http://influxdbhost:8086" \
 -e OURASYNC_INFLUXDB_ORG="org" \
 -e OURASYNC_INFLUXDB_BUCKET="bucket" \
 -it lesh/ourasync

Local

install deno (https://docs.deno.com/runtime/)

git clone git@github.com:leshy/oura_sync.git
cd oura_sync
deno install

export OURASYNC_OURA_TOKEN=... 
export OURASYNC_INFLUXDB_TOKEN=...
export OURASYNC_INFLUXDB_URL="http://influxdbhost:8086"
export OURASYNC_INFLUXDB_ORG="org"
export OURASYNC_INFLUXDB_BUCKET="bucket"

deno run main.ts

Details

  • You'll need to be familiar with influxdb (+ grafana for graphing)

  • Create your oura token at https://cloud.ouraring.com/personal-access-tokens

  • The way this works is it reads the latest point's time of an influxdb measuremnet, then queries Oura API from that point onwards and writes the data to influxdb. measurement names are hardcoded, check ouraSync.ts file

  • data transforms from Oura Api to Influxdb are defined at ouraSync.ts file, should be quite straightforward to modify if needed.

Grafana

grafana dashboard

my quick dashboard .json export is here

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published