npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-red-contrib-get-oura-data

v1.6.2

Published

Get client data from Oura API

Downloads

12

Readme

node-red-contrib-get-oura-data

How to Install

Run this in your ~/.node-red

npm install node-red-contrib-get-oura-data

Description:

This node using Oura API to get data of Oura ring user.

  • Input: user account personal access token (mandatory), timestamp (optional).
  • Output: User data of selected fields: Daily Activity, Heart Rate, Personal Info, Readiness Summaries, Session, Sleep Period, Tag, Workouts...

Supports:

  • Node.js v 11.15.x
  • Node-Red v 1.0.5

How to use:

  • Create flow and add this node between an inject node and a debug node.
  • Add Personal Access Token of your Oura account to field "Token".
  • Choose which field of data you want to get.
  • Inject and you can get your data in debug node.

Specify time:

By default, if the node can't find "End Date", it will be set to current day, if no "Start Date" specified, it will be set to one week before "End Date".

You can specify dates in many formats, as long as they start with year/month/day, you can specify dates in node Oura or add dates to inject node with msg.payload -> string (node will NOT work with timestamp), node will separate "Start Date" and "End Date" by the comma (,), if there is no comma, node will take it as "Start Date", and if you want to specify "End Date", put a comma at the beginning.

E.g:

  • 2022/06/01
  • 22/6/1
  • 2022/05/31,2022/06/01
  • 22/5/31,2022-06-01T12:21:00+09:00
  • ,21/11/30
  • 2000-04-21T12:21:00+09:00

As long as there is date specified in the inject node, they will override the dates of Oura node, even if they are auto-generated

Notice:

Ouraring V2 API: Daily Activity return 1 day earlier than specified "End Date", this is due to Oura API functioning, not the node bug.

Example Flow

[
    {
        "id": "195dda2d953fcef6",
        "type": "tab",
        "label": "Ouraring Example Flow",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "5fe0716b52718c13",
        "type": "inject",
        "z": "195dda2d953fcef6",
        "name": "",
        "props": [],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "x": 110,
        "y": 100,
        "wires": [
            [
                "23ef0e47a4c81265"
            ]
        ]
    },
    {
        "id": "8ef85d83fae66246",
        "type": "debug",
        "z": "195dda2d953fcef6",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 370,
        "y": 260,
        "wires": []
    },
    {
        "id": "23ef0e47a4c81265",
        "type": "Oura",
        "z": "195dda2d953fcef6",
        "token": "",
        "apiVer": "v2",
        "dataTypeV1": "activity",
        "dataTypeV2": "daily_activity",
        "startTime": "2022/05/11",
        "endTime": "2022/05/14",
        "name": "",
        "x": 220,
        "y": 180,
        "wires": [
            [
                "8ef85d83fae66246"
            ]
        ]
    }
]