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-wznhjc-collector

v1.1.0

Published

Node-RED nodes and library for NetDAU485 collector: edge parse, TCP handshake, archives_ack, report, auto-reconnect

Readme

node-red-contrib-wznhjc-collector

采集器客户端协议库(NetDAU485)+ Node-RED 节点:edge-parsecollector-client
支持边缘测点解析、TCP 握手、archives_ack 全量建档、仅有效读数 report、自动重连。

环境要求

| 项 | 版本 | |----|------| | Node.js | >= 12(如 EG628 上 Node 12.22) | | Node-RED | >= 2.0 |

| 版本 | Node | 说明 | |------|------|------| | 1.1.0+ | >= 12 | 现场推荐;NR 专用加载链、5 个依赖、无写盘 | | 1.0.5 | >= 12 | 去掉 config/log4js | | 1.0.1 | >= 12(声明) | 依赖 config@4 仍会在 Node 12 安装失败 | | 1.0.0 | >= 14 | 旧版 engines |

在 Node-RED 里安装(推荐)

  1. 菜单 设置 → 节点管理(Manage palette)→ 安装
  2. 搜索并安装:node-red-contrib-wznhjc-collector
  3. 重启或部署后,在 palette 分类 collector 下可见两个节点

首次公开发布前,也可在 ~/.node-red 执行:

npm install node-red-contrib-wznhjc-collector

详细说明见 docs/NODE-RED.md
发布维护见 docs/PUBLISH.md

作为 npm 库使用

const {
  validateCollectorOptions,
  parseEdgeGetNodesPayload,
  buildElectricMetersFromEdgeParsed,
  connectCollectorUntilOnline,
  startCollectorAutoReconnect,
} = require('node-red-contrib-wznhjc-collector');

推荐流程

[edge get nodes] → [edge-parse] → [collector-client]
  • 建档:edge-parse 配置的全部 NodeID(无读数也建档)
  • 上报:仅有有效数值的测点

开发 / 本地测试

npm install
npm test
npm run run:collector:local    # 改 scripts/run-collector-local.js 里的 LOCAL_CONFIG
npm run simulate:edge
npm run pack:install           # 模拟 tgz 安装到 examples/test-collector-consumer

连接必填参数

| 参数 | 说明 | |------|------| | host | 采集器地址 | | port | 端口 | | buildName | 建筑名称 | | buildNo | 建筑编号 / building_id | | gatewayId | 网关号 |

可选:snmacipedgeGetNodesParsed / edgeNodeIds 用于档案与 report。

常用默认值

| 项 | 默认 | |----|------| | 握手超时 | 120 s | | notify 心跳 | 30 s | | 首次 report | online 后 5 s | | 周期 report | 5 min | | 自动重连 | 3 min | | 协议日志保留 | 10 天 |

包内容

发布包含:src/NetDAU_CLIENT/(含内置 collectorRuntimeConfig)、libs/log.js+util.jsnodes/
不写磁盘日志、不依赖 npm config,适合无法 SSH 的嵌入式网关。