Skip to main content

Getting Started with Flow (Node-RED)

🎬 Build a data flow · 33초 · 2026.09 기준 화면

You can access the built-in Node-RED environment on the gateway through the /ui/flow menu. Node-RED is a low-code tool for creating data flows by connecting blocks (nodes) via drag-and-drop. It allows you to read and write tag values from the gateway, interface with external systems via MQTT/HTTP, and design automations such as alarms, logging, and formulas.

Node-RED in Container Mode (2026.05+)

Node-RED 4.1.10 + Node.js 20 (both installed globally within the image). During the first boot of the container, userDir.seed (node_modules + PlantPulse Edge / node-red-contrib-opcua nodes) are automatically copied to /data1/pp-data/node-userdir/ (user flows are preserved from the second boot onward). User flows remain intact even after an image upgrade. The flow tab will be empty — example flows are imported from documentation rather than being included in the image (Example Flows for Import).

PlantPulse dedicated nodes (pp-tag-value-read / pp-tag-value-write / pp-opc-* / pp-tag-list) are connected to node/conf/plantpulse-edge-nodes/ of the image via absolute path symlinks — the entrypoint guarantees this at every boot (preventing issues where symlinks from the old native version, which used relative paths, would break in containers).

Before reading this document

Complete up to 자주 하는 작업 → 새 PLC 연결 추가 / 태그 등록 and start from a state where one or more tags are being collected in real-time. Node-RED uses those tag values as input.


1. Access​

Connect to the gateway in your browser and go to Flow (Node-RED) in the left menu or navigate directly to http://<gateway>/ui/flow.


2. Screen Layout​

Flow Editing Screen — Numbers indicate reading order

No.AreaDescription
①Left PaletteList of available nodes. Grouped by category; the PlantPulse Edge category contains gateway-specific nodes (pp-tag-value-read · pp-tag-value-write · pp-opc-* · pp-tag-list)
②Flow TabsOrganize flows into multiple sheets. Create a new tab with +
③Center WorkspaceDrag and drop nodes here and connect them with wires
④Right Sidebarinfo shows help for the selected node, and debug shows output logs for debug nodes
⑤Top-right DeployClick this to apply changes to the gateway

3. Basic Operations — Useful Shortcuts​

ActionMethod
Add NodeDrag from palette to workspace
Configure NodeDouble-click node → Edit in right panel → Done
Connect Nodes (Wire)Drag from the output port (right) of a node to the input port (left) of another node
Break WireClick to select the wire, then Delete
Multiple SelectionDrag to select an area with Shift, or add selection with Ctrl/Cmd + 클릭
Copy / PasteCtrl/Cmd + C / Ctrl/Cmd + V
SearchCtrl/Cmd + F — Search for node names in the palette
Import FlowMenu → Import → Paste JSON (you can import Example Flows for Import as is)
Changes are only active after Deploy

Even if you add, delete, or modify nodes, the gateway will not recognize the changes until you click Deploy. A red dot (●) on a node indicates "unsaved changes."


4. Basic Structure of a Message (msg)​

Data flowing between nodes is always a JavaScript object called msg. The most frequently used fields are:

FieldMeaning
msg.payloadPayload (primary data). Can be number, string, object, or buffer
msg.topicTopic (classification label). Frequently used in MQTT, Switch, Join, etc.
msg.timestampTimestamp (filled manually when needed)
msg._msgidUnique ID automatically assigned by Node-RED — for tracking

Most nodes operate using only msg.payload.


5. Edge Nodes — Overview (Gateway Exclusive)​

Among the nodes registered by the gateway in the PlantPulse Edge category of the palette (7 in total), first look at the two that center on input and output. These are the input/output for almost all IIoT flows.

IconNodeEnglish NameActionCalled REST
⬇Read Tag Value (pp-tag-read)read tag valueGet the current value of a tag (from cache or direct PLC read)GET /api/v1/tag/{tagId}/value
⬆Write Tag Value (pp-tag-write)write tag valueWrite a value to a tag (reflected immediately in PLC)POST /api/v1/tag/{tagId}/value
inject (1s) ──▶ 태그값 읽기 ──▶ 처리 (function/switch/...) ──▶ 태그값 쓰기 / mqtt out / debug / file ...

How to find nodes — Enter read tag or PlantPulse in the palette search box → Filters only the corresponding nodes. They are colored in light pastel blue.

Frequently Left Blank in Node SettingsHow to Fill Dynamically
Tag IDSpecified dynamically via msg.tag_id = 'TAG_...' during the flow (reuse one node for multiple tags)
Value (Write Node)Filled during the flow via msg.value or msg.payload
Writing is hazardous — verify with test tags first

Thoroughly verify using an external simulator or test tags before applying writes to actual equipment. Write permissions should only be granted to tags agreed upon with the operations team.

For detailed fields, I/O, and all protocol support tables → Edge Category (Read/Write Tag)


6. First Flow — Hello World​

Goal: Read a tag every 5 seconds and output it to the Debug sidebar.

  1. Drag the inject node from the palette → Double-click → Repeat: interval every 5 seconds → Done
  2. Drag the PlantPulse Edge → Read Tag Value node → Enter an actual tag (e.g., TAG_TEST_00042) in Tag ID → Done
  3. Drag the debug node from the palette
  4. Connect the three nodes via wires in the order of inject → 태그값 읽기 → debug
  5. Click Deploy in the top-right
  6. Open the debug tab in the right sidebar to verify the value is printed every 5 seconds

This pattern (Periodic Trigger → Read → Process) is the fundamental form of all IIoT flows.


7. Next Steps​

Follow the left menu in order:

  1. Basic Node Usage — Functions of 14 nodes frequently used in IIoT
  2. Edge Nodes (Read/Write Tag) — Gateway-specific nodes (detailed version of the overview in Section 5)
  3. MQTT Nodes in Detail — Broker Setup / Pub / Sub / LWT / Birth
  4. OPC-UA Nodes in Detail — Endpoint / Item / Client / Subscribe / Browse
  5. Sparkplug B Nodes in Detail — Group / Edge / Birth-Death / TxRx
  6. IIoT Example Collection — 12 patterns frequently created in the field
  7. Example Flows for Import — 6 sets of complete flows to run immediately via paste
  8. Flow Troubleshooting — Common pitfalls

8. Learn More​

  • View all tags, values, and node IDs currently held by the gateway at a glance in the OPC UA Server (/ui/opcua). → Using OPC UA Server
  • The REST API itself is covered in the 고급 / 통합 파트너용 → REST API chapter. Node-RED's pp-tag-read / pp-tag-write are thin wrappers for that API.
  • Node-RED Official Manual: <https://nodered.org/docs/>