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-opc-rw-pulse

v1.0.2

Published

OPC UA nodes for Node-RED: read, write, and pulse a tag TRUE then back to FALSE after a configurable delay, sharing a common connection manager.

Readme

node-red-contrib-dcu-opc

Node-RED nodes for talking to an OPC UA server: pulse a tag, subscribe to a tag's changes, or write an arbitrary value.

All three nodes share one connection manager (opc-shared.js), are configured at runtime via a Config message (no redeploy needed to point at a different server/tag), and report connection state on a dedicated status output.

Install

From the project directory:

npm install

Then restart Node-RED, or point your Node-RED ~/.node-red install at this package (npm install /path/to/this/repo) to pick up the three node types.

Nodes

opc-pulse

Writes an OPC UA boolean tag TRUE, then back to FALSE after a configurable delay.

  • msg.topic = "Config" — msg.payload = { server, tag, duration, username?, password?, securityMode?, securityPolicy? }. Saves the settings and opens (or keeps) a connection until the next Config message.
  • msg.topic = "Pulse" — fires the pulse using the currently configured settings. On completion, sends { endpoint, tag, pulsed: true } on output 1.

opc-input

Subscribes to an OPC UA tag and outputs a message every time its value changes.

  • msg.topic = "Config" — msg.payload = { server, tag, username?, password?, securityMode?, securityPolicy? }. Opens (or keeps) a subscription until the next Config message. Changing just the tag re-subscribes on the existing connection; changing the server, credentials, or security settings reconnects.
  • Output 1: on every tag change, { topic: tag, payload: value, endpoint, sourceTimestamp }.
  • If the connection drops, the node automatically retries the subscription every 5 seconds until it succeeds or the node is closed/redeployed.

opc-write

Writes a value to an OPC UA tag on demand.

  • msg.topic = "Config" — msg.payload = { server, tag, dataType?, username?, password?, securityMode?, securityPolicy? }. dataType defaults to "Auto": the node reads the tag's DataType attribute from the server and uses that for the write, falling back to guessing from the JS type of the written value if that read fails. Set it explicitly (Boolean, String, SByte, Byte, Int16, UInt16, Int32, UInt32, Float, Double, DateTime) to override.
  • msg.topic = "Write" — writes msg.payload (coerced to the resolved data type) to the configured tag. On completion, sends { endpoint, tag, value, dataType, written: true } on output 1.

Status output (output 2, all nodes)

Every state change — connecting, connected, connection lost, a failed connect/write/subscribe — is reported on output 2:

{ "topic": "status", "payload": { "state": "connected", "connected": true } }

payload.error is present (the error message) when the state reflects a failure. If a connect attempt fails because the server doesn't offer the requested security mode/policy at that endpoint, the error lists what the server actually offers, e.g.:

End point must exist opc.tcp://host:4840 ... | server offers: opc.tcp://host:4840 [SignAndEncrypt/Basic256Sha256]

Security & credentials

  • securityMode / securityPolicy default to "None"/"None". If the server requires Sign or SignAndEncrypt, node-opcua auto-generates a self-signed client certificate on first use (stored in a local PKI folder) — no setup needed on your end, but the server may need to be told to trust that new certificate on its first connection attempt.
  • Username/password are stored as Node-RED credentials (encrypted at rest), set in the node's edit panel or overridden per Config message. Leave both unset for an anonymous connection.

License

UNLICENSED — internal project use.