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

@sieumayman/node-red-contrib-miza

v1.0.9

Published

Easy-to-use connect s7 node to influxdb node

Readme

# node-red-contrib-miza

Custom Node-RED nodes for industrial IoT / Smart Factory applications.  
Package này được xây dựng để tích hợp dữ liệu sản xuất từ PLC, xử lý metadata thiết bị, gom nhóm tín hiệu và ghi dữ liệu vào InfluxDB phục vụ Dashboard / OEE / Analytics.

---

# 📦 Tính năng chính

- Kết nối và xử lý dữ liệu thời gian thực từ PLC
- Tạo metadata chuẩn nhà máy:
  - Factory
  - System
  - Subsystem
  - Section
  - Line
  - Machine
  - Label
- Node gom nhóm tín hiệu theo template
- Node insert dữ liệu chuẩn hóa vào InfluxDB
- Hỗ trợ mở rộng cho OEE / Mass Balance / Energy / SPC

---

# 📁 Cấu trúc node

Package hiện tại gồm các custom nodes:

- `miza-config`
- `miza-group-template`
- `miza-s7-group`
- `miza-insert`

---

# ⚙️ Yêu cầu môi trường

- Node.js >= 20 (khuyến nghị 22)
- Node-RED >= 3.x
- npm >= 10
- Docker (nếu chạy container)

---

# 🚀 How to install (Development Setup)

## 1. Khởi tạo project

```bash
npm init -y
git init
touch .gitignore
git add -A
git commit -m "chore(init): initialize project"

2. Cài TypeScript

npm i -D [email protected]
touch tsconfig.json

3. Cài Commitlint

npm i -D @commitlint/[email protected] @commitlint/[email protected]
touch commitlint.config.ts

commitlint.config.ts

export default {
  extends: ['@commitlint/config-conventional']
}

4. Cài Husky

npm i -D [email protected]
npx husky init

Tạo hook commit-msg

echo 'npx --no --commitlint --edit ${1}' > .husky/commit-msg
chmod +x .husky/commit-msg

5. Commit cấu hình

git add -A
git commit -m "chore(commitlint): install conventional commit tools"

6. Cài ESLint

npm install -D eslint
npx eslint --init
git add -A
git commit -m "chore(eslint): initialize eslint"

7. Cài NVM + Node.js 22

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
source ~/.zshrc
nvm --version
nvm install 22
nvm use 22
nvm alias default 22

Kiểm tra:

node -v
npm -v

8. Cài lại dependencies

rm -rf node_modules package-lock.json
npm install

▶️ How to run

Local Development

npm install
npm run build

🐳 Local Testing of Unpublished Package (Docker + Node-RED)

Nếu package chưa publish npm, dùng npm link

Link package vào Node-RED container

sudo docker exec -it hands-on-iot-node-red-1 sh -c '
cd /workspace/node-red-contrib-miza && 
npm install && 
npm link && 
cd /data && 
npm link node-red-contrib-miza
'

Restart container

sudo docker restart hands-on-iot-node-red-1

📂 Mount volume khuyến nghị cho Node-RED

services:
  node-red:
    image: nodered/node-red
    ports:
      - "1880:1880"
    volumes:
      - ./data:/data
      - ./workspace:/workspace

🧪 Publish package locally

npm pack

hoặc:

npm publish

📝 Conventional Commit Rules

Ví dụ commit hợp lệ:

feat(node): add miza insert node
fix(s7): reconnect after timeout
docs(readme): update install guide
refactor(config): simplify schema
chore(deps): update eslint

📊 Use Cases

Package phù hợp cho:

  • OEE Dashboard
  • Mass Balance
  • Energy Monitoring
  • Production Tracking
  • Alarm Monitoring
  • SPC Dashboard
  • Paper Mill / Pulping / Water Treatment

🔧 Troubleshooting

Restart Node-RED bị mất nodes

Đảm bảo mount volume /data

-v ./data:/data

Package link xong không thấy node

Trong container chạy:

cd /data
npm list

Nếu chưa có:

npm link node-red-contrib-miza

Permission denied

sudo chown -R 1000:1000 ./data

📌 TODO

  • [ ] TypeScript migration
  • [ ] Unit test
  • [ ] Auto publish CI/CD
  • [ ] Dynamic schema generator
  • [ ] UI editor validation
  • [ ] Better error logging

👨‍💻 Author

MIZA Automation Team


📄 License

MIT