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

@uns-kit/node-red-contrib-uns

v0.1.2

Published

Node-RED interface for UNS connectivity with UNS DataHub based on uns-kit.

Readme

@uns-kit/node-red-contrib-uns

Node-RED interface for UNS connectivity with UNS DataHub based on uns-kit.

It provides a standalone UNS runtime inside Node-RED for subscribing to and publishing UNS messages.

Nodes

  • uns-in: subscribe to UNS MQTT messages and emit Node-RED messages
  • uns-out: publish UNS MQTT messages from Node-RED
  • uns-config: shared hidden config node for UnsProxyProcess
  • uns-mqtt-connection: shared hidden config node for MQTT connection settings

Requirements

  • Node.js >=20
  • Node-RED
  • MQTT broker reachable by Node-RED

Install

From your Node-RED user directory or project:

npm install @uns-kit/node-red-contrib-uns

For local development from a local checkout:

npm install ../node-red-contrib-uns

Configuration

uns-config

Shared runtime settings:

  • Process: required UnsProxyProcess name
  • MQTT connection: default MQTT connection for the process and proxies
  • Instance mode: force, wait, or handover
  • Handover: enable or disable handover logic

uns-in

  • UNS config: required
  • MQTT connection: optional override, otherwise inherits from uns-config
  • Proxy name: optional, defaults to the selected connection id
  • Input topics: MQTT subscriptions

Status values:

  • connecting
  • passive subscriber
  • active subscriber
  • temporary received ...

uns-out

  • UNS config: required
  • MQTT connection: optional override, otherwise inherits from uns-config
  • Proxy name: optional, defaults to the selected connection id
  • identity fields:
    • Topic
    • Asset
    • Asset description
    • Object type
    • Object ID
    • Virtual group
    • Attribute

Status values:

  • connecting
  • passive publisher
  • active publisher
  • temporary published ...

uns-in output

uns-in emits:

{
  "topic": "enterprise/site/area/line/asset/sensor/main/temp",
  "payload": {
    "data": {
      "dataGroup": "sensor",
      "time": "2026-07-06T08:45:34.907Z",
      "value": 40.07,
      "uom": "A",
      "valueType": "number"
    }
  },
  "unsEvent": {},
  "unsPacket": {}
}

msg.payload contains the parsed UNS message body. msg.unsPacket contains the raw UNS packet received from MQTT.

uns-out input

Identity can come from node configuration and be overridden by msg.uns.

Supported runtime overrides:

  • msg.uns.topic
  • msg.uns.asset
  • msg.uns.assetDescription
  • msg.uns.objectType
  • msg.uns.objectId
  • msg.uns.virtualGroup
  • msg.uns.attribute

Single attribute with data

{
  "uns": {
    "topic": "enterprise/site/area/line/",
    "asset": "asset",
    "objectType": "sensor",
    "objectId": "main",
    "attribute": "temp",
    "virtualGroup": "data"
  },
  "payload": {
    "data": {
      "dataGroup": "sensor",
      "time": "2026-07-06T08:45:34.907Z",
      "value": 40.07,
      "uom": "A"
    }
  }
}

Single attribute with table

{
  "uns": {
    "topic": "enterprise/site/area/line/",
    "asset": "asset",
    "objectType": "sensor",
    "objectId": "main",
    "attribute": "measurements",
    "virtualGroup": "data"
  },
  "payload": {
    "table": {
      "dataGroup": "sensor_table",
      "time": "2026-07-06T08:45:34.907Z",
      "columns": [
        { "name": "current", "type": "double", "value": 40.07, "uom": "A" }
      ]
    }
  }
}

Multiple attributes in one publish

{
  "uns": {
    "topic": "enterprise/site/area/line/",
    "asset": "asset",
    "objectType": "energy-resource",
    "objectId": "main",
    "virtualGroup": "data"
  },
  "payload": {
    "attributes": [
      {
        "attribute": "current",
        "data": {
          "dataGroup": "sensor",
          "time": "2026-07-06T08:45:34.907Z",
          "value": 12.3,
          "uom": "A"
        }
      },
      {
        "attribute": "voltage",
        "data": {
          "dataGroup": "sensor",
          "time": "2026-07-06T08:45:34.907Z",
          "value": 230.1,
          "uom": "V"
        }
      }
    ]
  }
}

Also supported:

[
  {
    "attribute": "current",
    "data": {
      "dataGroup": "sensor",
      "value": 12.3,
      "uom": "A"
    }
  },
  {
    "attribute": "voltage",
    "data": {
      "dataGroup": "sensor",
      "value": 230.1,
      "uom": "V"
    }
  }
]

If time is missing in data or table, the node generates the current ISO timestamp automatically.

uns-out output

After publish, uns-out forwards:

  • msg.payload: the exact UNS packet body sent to MQTT for that attribute
  • msg.topic: the full published MQTT topic
  • msg.uns: the resolved UNS identity used for that attribute

If multiple attributes are published in one input message, uns-out emits one output message per attribute.

Development

Run a quick load check:

npm run check

Publishing

Prepare the package:

npm run check
npm pack

Log in to npm:

npm login

Publish the package:

npm publish --access public

Publish a new version:

npm run patch
npm publish

Other version bumps:

npm run minor
npm publish

npm run major
npm publish

Contact

Kristjan Cuznar
[email protected]