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-osisoft-web-api

v0.0.6

Published

A node module for connecting to OSIsoft Web API Server

Downloads

23

Readme

node-red-contrib-osisoft-web-api

These are Node-RED nodes that interface with the OSISoft Web API server. The nodes simplify the process of developing an application to write data and to query data.

For more information of these nodes, please refer to our tutorial on http://developers.sensetecnic.com.

Pre-requesites

To run these nodes, you need to have:

  • A running OSIsoft PI Server
  • A running OSIsoft PI Web API server associated with the PI Server
  • The OSIsoft PI Web API server will need to be configured using "Basic" or "Anonymous" authentication methods.
  • EnableCSRFDefense flag must be set to "False" in WebAPI system configuration.
  • PI identities with appropriate read/write access privileges are required to access to PI server
  • You can find more infomation on OSIsoft PI Server product page.

Install

Run the follwing command in the root directory of your Node-RED install. Usually this is ~/.node-red .

    npm install node-red-contrib-osisoft-web-api

Usage

Web API write node: Write data to Pi Server

This is the node to write data to the PI Server. Currently, you can either write data to points in your data servers by Web ID, point paths, or you can write data to any other API endpoints with your own URL input.

  • By Web ID: Write to a point in data servers by using Web ID
  • By Point Path: Write to a point in data servers by using the point path. The node will first query the path, and write to that point using the Web ID returned from the query.
  • By Custom URL: Write data using a custom URL relative to the base Web API URL set in the configuration node. You can use this mode to write to anything that is not in the data servers.

An example flow writing to a specific Web ID:

[{"id":"96264f9e.af0bd","type":"web-api-write","z":"543e65ad.2f3a4c","name":"","server":"64727ec0.eb85f","writeMethod":"webId","webId":"P0RBbjFMMXuUivIEAgCXqPnADwAAAARUMyQU1BWi05SEVKVlRMXEtIT1VfUkVMQVRJVkVfSFVNSURJVFk","requestMethod":"POST","x":585,"y":381,"wires":[["19d58c27.3e2c84"]]},{"id":"5441511c.03566","type":"inject","z":"543e65ad.2f3a4c","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":258,"y":338,"wires":[["7b828585.10df2c"]]},{"id":"7b828585.10df2c","type":"function","z":"543e65ad.2f3a4c","name":"post value","func":"msg.payload = {\n    \"Value\":31.5\n}\nreturn msg;","outputs":1,"noerr":0,"x":425,"y":362,"wires":[["96264f9e.af0bd"]]},{"id":"19d58c27.3e2c84","type":"debug","z":"543e65ad.2f3a4c","name":"","active":true,"console":"false","complete":"true","x":771,"y":356,"wires":[]},{"id":"64727ec0.eb85f","type":"web-api-client","z":"","name":"","serverURL":"my-pi-server/piwebapi","authenticateMethod":"basic","usetls":true,"tls":"b50d2d8b.bbace"},{"id":"b50d2d8b.bbace","type":"tls-config","z":"","name":"","cert":"","key":"","ca":"","certname":"","keyname":"","caname":"","verifyservercert":false}]

For more info on the write node, please refer to our tutorial on http://developers.sensetecnic.com.

Web API query node: Query data from PI Server

This is the node to query data from the PI server. Currently, you can either query points from your PI Data servers by Web ID, point paths, and preset features, or you can query any other data with your own URL input.

  • By Web ID: Query a point in data servers by using Web ID
  • By Point path: Query a point in data servers by using the point path
  • By Custom URL: Query a custom URL relative to the base Web API URL set in the configuration node. You can use this mode to query anything that is not in the data servers

These are the preset features where you can:

  • List all Assert servers: List all the assert servers from your PI Server
  • List all DBs in Assert Servers: List all the databases from all assert servers
  • List all Data Servers: List all the data servers from the PI Server
  • List all points in Data Servers: List all points from all data servers.

An example flow code querying a point with a specific Web ID:

[{"id":"919a963f.186748","type":"web-api-query","z":"543e65ad.2f3a4c","name":"","server":"64727ec0.eb85f","queryMethod":"webId","webId":"P0RBbjFMMXuUivIEAgCXqPnADwAAAARUMyQU1BWi05SEVKVlRMXEtIT1VfUkVMQVRJVkVfSFVNSURJVFk","dataType":"self","customUrl":"","x":359,"y":173,"wires":[["8023a61c.a03078"]]},{"id":"a774c1cd.57ba9","type":"inject","z":"543e65ad.2f3a4c","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":162,"y":164,"wires":[["919a963f.186748"]]},{"id":"8023a61c.a03078","type":"debug","z":"543e65ad.2f3a4c","name":"","active":true,"console":"false","complete":"true","x":529,"y":170,"wires":[]},{"id":"64727ec0.eb85f","type":"web-api-client","z":"","name":"","serverURL":"my-pi-server/piwebapi","authenticateMethod":"basic","usetls":true,"tls":"b50d2d8b.bbace"},{"id":"b50d2d8b.bbace","type":"tls-config","z":"","name":"","cert":"","key":"","ca":"","certname":"","keyname":"","caname":"","verifyservercert":false}]

For more info on the query node, please refer to our tutorial on http://developers.sensetecnic.com.