
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
node-red-contrib-easy-pid-controller
Advanced tools
A Node-RED node for implementing an easy PID controller
The easy-pid-controller is a Node-RED node that provides industrial-grade Proportional-Integral-Derivative (PID) control based on simple-pid-controller v2.0.0. It integrates easily with PLCs, MQTT, and SCADA systems, and supports 0-10V and 4-20mA control signals with safety features like anti-windup, output clamping, and bumpless transfer.
SV) and Process Variable (PV) inputs over msg.topic.PV, SV, error, P, I, D, output, scaled Signal, and Value.0-10V or 4-20mA.settled handling: stop the loop automatically when within tolerance.gains topic) and controller reset (reset topic).npm install node-red-contrib-easy-pid-controller
easy-pid-controller node into your Node-RED flow.dt (seconds).0-10V or 4-20mA) and engineering range.SV, PV, auto, and optional advanced topics (gains, mode, manual_output, reset).output, Signal, Value, mode) in real-time.All control is driven by msg.topic and msg.payload:
SV (number)
Desired setpoint value for the controller.
msg.topic = "SV"msg.payload = <number>PV (number)
Process variable / current state of the system.
msg.topic = "PV"msg.payload = <number>auto (boolean)
Start/stop the PID loop and auto mode.
msg.topic = "auto"msg.payload = true → start loop and switch to auto modemsg.payload = false → stop loop and switch to manual modegains (object) — v2.0.0
Runtime PID gain tuning without restarting the node.
msg.topic = "gains"msg.payload = { k_p: <number>, k_i: <number>, k_d: <number> }mode (string) — v2.0.0
Explicitly switch controller mode.
msg.topic = "mode"msg.payload = "auto" or "manual"manual → auto uses bumpless transfer (no output jump).manual_output (number) — v2.0.0
Fixed output used in manual mode, also seeds bumpless transfer when returning to auto.
msg.topic = "manual_output"msg.payload = <number>reset (any) — v2.0.0
Reset controller internal state (integral, derivative, timestamp).
msg.topic = "reset"msg.payload can be any valueThe node outputs an object on msg.payload with the following fields (from simple-pid-controller v2.0.0):
PV (number)
Current process variable.
SV (number)
Current setpoint.
error (number) — v2.0.0
Current control error: SV - PV.
P (number)
Proportional component.
I (number)
Integral component (clamped by Integral Min/Max for anti-windup).
D (number)
Derivative component (derivative on measurement — no kick on setpoint changes).
output (number) — v2.0.0
Raw clamped PID output (P + I + D, limited by Output Min/Max).
Signal (number)
Output mapped to the configured signal range:
0-10V → 0 to 104-20mA → 4 to 20Value (number)
PV mapped to the signal units for easier UI or Range node usage.
mode (string) — v2.0.0
Current controller mode: "auto" or "manual".
dt is a base rate / initial fallback).output.|error| is below this value, output is forced to 0 (disable with 0).|error| falls below this value, the controller emits a settled event and the node stops the loop; restart with auto: true.0-10V or 4-20mA.Updated core to use simple-pid-controller v2.0.0 with:
dt based on real timestamps (constructor dt used as fallback).Integral Min/Max.Output Min/Max.setTarget() now resets integral and derivative state.update and settled events internally.Inputs
gains topic for runtime tuning of { k_p, k_i, k_d }.mode topic to switch auto/manual with bumpless transfer.manual_output topic to set fixed output in manual mode.reset topic to clear internal controller state.auto topic now also sets mode to auto/manual instead of just starting/stopping the timer.Outputs
error, output, and mode in the payload.PV, SV, P, I, D, Signal, Value for compatibility.Node behaviour
SV) from node configuration to msg.payload with the topic SV.Value that provides the direct control signal based on the sensor type configuration.0-10V and 4-20mA signal types.Contributions to improve the node or fix any issues are welcome. Please submit an issue or pull request on the GitHub repository.
GPL-3.0 License. See the LICENSE file for details.
See the examples/ directory for sample flows illustrating:
Harshad Joshi @ Bufferstack.IO Analytics Technology LLP, Pune
FAQs
A Node-RED node for implementing an easy PID controller
We found that node-red-contrib-easy-pid-controller demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.