Skip to main content

Basic Nodes

Beyond the PlantPulse Edge categories, these are the essential nodes provided by vanilla Node-RED for IIoT flows. They are listed in order of frequency of use.


1. inject — Trigger / Scheduler​

The starting point of a flow. Trigger once via a button, or trigger automatically at a specific interval or time.

OptionDescription
Repeat: intervalFire every N seconds/minutes/hours (e.g., polling every 1 second)
Repeat: interval between timesFire only during specific time slots (e.g., 09:00–18:00)
Repeat: at a specific timeFire at a fixed time every day (e.g., daily at 07:00)
Repeat: cron-likecrontab format (e.g., 0 7 * * * — daily at 07:00)
Inject once afterWhether to fire once immediately after Deploy + delay time

Since msg.payload and msg.topic can also be injected, a single node can simultaneously serve as a "scheduler + input data."


2. debug — Sidebar Log​

Outputs msg or msg.payload to the debug tab in the right sidebar. Changing the output target to "complete msg object" allows you to see all fields, including hidden ones, making it essential for debugging.


3. function — Flexible JavaScript​

Input a block of JavaScript code. It proceeds to the next node if you modify msg and perform return msg;.

// 예: payload 가 숫자라면 100배 해서 출력
msg.payload = parseFloat(msg.payload) * 100;
return msg;

To branch into multiple outputs, increase the number of outputs in the node settings (e.g., Outputs: 2) and return an array return [a, b];.


4. change — Field Set/Copy/Delete (No Code)​

Simple transformations like msg.topic = "abc" and msg.payload = msg.payload.value can be completed with a single change without a function node. It supports four operations: set / change / move / delete.


5. switch — Conditional Branching​

Sends the message to different output ports based on msg.payload or any arbitrary field. Options include checking all rules or stop after first match.

┌─ ≥ 80 ─▶ Slack 알림
read ──▶ switch ─┤
└─ < 80 ─▶ 정상 라인

6. join — Aggregating Multiple Messages​

Combines results from multiple parallel nodes (such as 태그값 읽기 ×3) into a single array/object. Mode manual, count N, key msg.topic.


7. delay — Delay / Rate Limit​

  • Pause: Holds the message for N seconds/minutes (e.g., preventing re-transmission for 5 minutes after an alarm).
  • Rate Limit: Limits the processing speed, such as "1 message per second," to protect external API polling or MQTT transmission.

8. trigger — State/Timer Combination​

Used for patterns such as "send a start message when a message arrives, and an end message if no update occurs after N seconds"—frequently used for data disconnection detection.


9. http request / http in / http response​

NodePurpose
http requestCalls external REST APIs (e.g., external weather API, corporate ERP)
http in + http responseCreates a new HTTP endpoint within Node-RED (e.g., receiving /myreport POST)

10. file / file in​

  • file (write/append): Saves to disk as a file (e.g., CSV logging).
  • file in (read): Reads file content.

11. csv / json / xml​

Conversion between strings and objects. csv provides extensive options for headers and delimiters.


12. template​

Outputs templates using mustache syntax. Most convenient for creating email, Slack message, or report bodies.

🔥 [경보] {{tag_id}} = {{value}}{{unit}} (한도 {{threshold}})

"Virtual jumps" within the same workspace. Used to clean up "spaghetti" wiring.


14. catch / status / complete​

When an error occurs anywhere in the flow, catch catches it, and status reports the state of the node (e.g., MQTT connected/disconnected). Essential for operational stability.


Next Steps​