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 🙏

© 2026 – Pkg Stats / Ryan Hefner

node-red-contrib-connect

v0.1.3

Published

Node-RED nodes for AVEVA Connect (Data Hub, OMF, Streams)

Readme

node-red-contrib-connect

Node-RED nodes for AVEVA Connect (Data Hub, OMF, Streams).

Features

  • OAuth2 Authentication with automatic token refresh
  • OMF Write - Send data using OSIsoft Message Format
  • Streams Read - Read data from streams with multiple modes
  • Events - Subscribe to stream updates with polling
  • Full API support for AVEVA Data Hub

Installation

Via Node-RED Palette Manager

  1. Open Node-RED
  2. Go to Menu > Manage palette > Install
  3. Search for node-red-contrib-connect
  4. Click Install

Via npm

cd ~/.node-red
npm install node-red-contrib-connect

Then restart Node-RED.

Configuration

Setting up AVEVA Connect credentials

  1. Log in to your AVEVA Connect portal
  2. Navigate to Developer Tools > Client Credentials
  3. Create a new client with appropriate permissions:
    • For OMF: ocsapi.data.readwrite
    • For Streams: ocsapi.data.read or ocsapi.data.readwrite
  4. Note the Client ID and Client Secret

Configuration Node Properties

| Property | Description | |----------|-------------| | Resource URL | AVEVA Connect base URL (default: https://datahub.connect.aveva.com) | | Tenant ID | Your AVEVA Connect tenant ID | | Namespace ID | The namespace to work with | | Client ID | OAuth2 client ID | | Client Secret | OAuth2 client secret | | Token URL | OAuth2 token endpoint |

Nodes

OMF Write

Writes data to AVEVA Connect using the OSIsoft Message Format (OMF).

OMF Message Types:

  • type - Define data types (schema)
  • container - Define streams (containers)
  • data - Send actual data values

Example - Define Type:

msg.payload = [{
    "id": "Temperature",
    "type": "object",
    "classification": "dynamic",
    "properties": {
        "Timestamp": { "type": "string", "isindex": true, "format": "date-time" },
        "Value": { "type": "number", "format": "float64" }
    }
}];
msg.omfMessageType = "type";

Example - Define Container:

msg.payload = [{
    "id": "Sensor1",
    "typeid": "Temperature"
}];
msg.omfMessageType = "container";

Example - Send Data:

msg.payload = [{
    "containerid": "Sensor1",
    "values": [{
        "Timestamp": new Date().toISOString(),
        "Value": 23.5
    }]
}];
msg.omfMessageType = "data";

Streams Read

Reads data from AVEVA Connect streams.

Read Modes:

  • last - Get the most recent value
  • first - Get the oldest value
  • range - Get values between start and end timestamps
  • window - Get the last N values
  • interpolated - Get interpolated values at regular intervals

Example - Read Last Value:

msg.streamId = "Sensor1";
msg.readMode = "last";

Example - Read Range:

msg.streamId = "Sensor1";
msg.readMode = "range";
msg.startIndex = "2024-01-01T00:00:00Z";
msg.endIndex = "2024-01-02T00:00:00Z";

Events

Subscribes to stream updates and emits messages when new data arrives.

Control Commands:

  • msg.payload = "start" - Start polling
  • msg.payload = "stop" - Stop polling
  • msg.payload = "status" - Get polling status

Example - Start with Dynamic Streams:

msg.payload = "start";
msg.streamIds = ["Sensor1", "Sensor2", "Sensor3"];

Output Message Format:

{
    topic: "Sensor1",        // Stream ID
    payload: { ... },        // New data from stream
    streamId: "Sensor1",
    timestamp: "2024-...",
    eventType: "data"
}

OMF Overview

OSIsoft Message Format (OMF) is a JSON-based format for sending time-series data. The typical workflow is:

  1. Define Types - Create a schema for your data
  2. Define Containers - Create streams that use the types
  3. Send Data - Send actual values to the containers

For more information, see the OMF Specification.

Compatibility

  • Node-RED: >= 2.0.0
  • Node.js: >= 14.0.0
  • AVEVA Connect: Data Hub API v1

Troubleshooting

Authentication Errors

  1. Verify your Client ID and Client Secret are correct
  2. Ensure the client has the necessary permissions
  3. Check that the Token URL matches your region

Connection Issues

  1. Verify the Resource URL is correct for your region
  2. Check network connectivity to AVEVA Connect
  3. Ensure your tenant and namespace IDs are correct

OMF Errors

  1. Verify your type definitions are valid JSON
  2. Ensure container IDs match existing containers
  3. Check that data values match the defined types

License

MIT

Author

Holger Amort

Links