Node-RED + Modbus RTU: Water Pressure Monitoring for Hydroponics
In a hydroponic system, a pump running dry or a clogged drip line can ruin a crop without warning — by the time you notice it visually, you've already lost days of growth. Monitoring water-circuit pressure in real time catches both problems as soon as they start, and with Node-RED you can build that alert without writing a single line of traditional code.
1. What Modbus RTU is, in plain terms
Modbus is the "language" most industrial sensors speak to report their data — like a shared phone line where each device has its own extension number. RTU is the variant that travels over an RS485 bus: a pair of wires over which several sensors can talk to a single computer, with no need for a separate cable for each one. If you've never built an RS485 bus before, the quick guide to RS485 and Modbus covers the most common wiring mistakes (reversed polarity, missing termination resistor) before you run into them here.
2. Parts list
- Modbus RTU pressure sensor: this specific part isn't verified in our catalog yet — the options we found on Amazon are from generic brands with no reviews or clear specs, so we'd rather not recommend one blindly. Look for one with an RS485/Modbus RTU output and a pressure range that matches your pump (most home hydroponic systems run below 60 PSI).
- If instead you want to monitor ambient temperature and humidity (useful in a greenhouse or grow room, in addition to or instead of pressure), the Tzone RS485/Modbus RTU sensor in this ranking uses the same protocol and the same Node-RED nodes as a pressure sensor — good for practicing the full flow while a reliable pressure option shows up.
- USB to RS485 converter: so your computer (running Node-RED) can talk to the sensor. We use the Waveshare converter with FT232RL chipset — it avoids the driver issues typical of generic clones.
- Power supply (if the sensor needs one separately): a DIN-rail 5V supply is enough for low-consumption sensors.
3. Installing Node-RED and the Modbus package
With Node.js installed, npm install -g node-red lets you run it with the node-red command. From the node palette (menu ≡ → Manage palette → Install), search for and install node-red-contrib-modbus — this package adds the Modbus-Read and Modbus-Client nodes you'll need.
4. Configuring the Modbus Read node
Drag a Modbus-Read node onto the flow and configure:
- Serial port: whichever one Windows/Linux assigned to your USB-RS485 converter (for example
COM3or/dev/ttyUSB0). - Slave address: the device number programmed into your sensor (it's in the manual, usually
1by default). - Register and quantity: the Holding/Input register where the sensor publishes the pressure value — this is specific to each sensor, it's in its data sheet.
- Poll rate: every 1-5 seconds is enough for pressure monitoring; polling faster adds nothing and saturates the bus if you have several sensors.
What the setup looks like in practice, on video
This video shows the actual setup of the Modbus-Read node over RTU (serial port, slave address, register) inside the Node-RED editor — useful for comparing your own configuration against one that already works before you wire up the real sensor.
5. Building the flow: read, convert, and alert
The minimal working flow looks like this:
Modbus-Read → function (converts the register's raw value to PSI or bar based on your sensor's scale) → switch (compares against two thresholds: a low one for "pump running dry" and a high one for "clog") → notification or email (fires the alert).
The function node is where you'll need the most tweaking, because every sensor scales its raw value differently — the sensor's data sheet has the conversion formula.
6. Real-time gauge dashboard
Installing node-red-dashboard (same process as the Modbus package) adds ui_gauge and ui_chart nodes. Connect the gauge directly to the function node's output (after unit conversion) to see the current pressure, and the chart to see the trend over the last few hours — useful for catching a clog forming gradually, not all at once.
7. Extra: cutting the pump automatically
If, besides the alert, you want the system to cut the pump on its own when there's a fault, the switch node's output can trigger a Modbus-Write node toward a Modbus RTU relay module that interrupts power to the pump. This turns passive monitoring into active protection — recommended if the system is going to run unsupervised for hours at a time. To cut just this one pump (a single output), the 8-channel module in this ranking is more than enough — the 16-channel one only makes sense if the same panel is also going to control other equipment besides the pump.
Our pick of the month
The communication hardware (RS485 converter, relay modules) is in the Industrial Control (B2B) ranking. If your hydroponic system also needs pumps or more traditional irrigation control, the HidroLab catalog covers that part.
Frequently asked questions
Do I need to know how to program to do this?
Not in the traditional sense — Node-RED is "low-code": you build the flow by dragging and connecting nodes. The only real code you'll write is the unit-conversion formula inside the function node, and it's usually a simple math operation.
Can I run this on a Raspberry Pi instead of a PC? Yes, it's the most common option for leaving it running 24/7 without overspending — Node-RED runs natively on Raspberry Pi OS and the resource use of a flow like this is minimal.
Related products
See full ranking →SONOFF WiFi MINI-D Smart Switch — Dry Contact, Matter Compatible
Has a dry-contact output, not a plug-and-play outlet — it installs inside a box or panel to switch an external load, which makes it more versatile for retrofitting existing wiring than a traditional smart plug. Supports Matter, so in theory it works with any compatible hub (Apple Home, Google Home, Alexa) without relying solely on the Tuya/eWeLink app. Accepts AC or DC input, useful if your project already runs on 12V/24V DC.
GHome Dual Smart Plug 15A — WiFi Double Outlet
It's a ready-to-use outlet (not a module for a panel), meant for anyone who wants immediate results without wiring anything. It runs on the closed GHome/Tuya ecosystem — no dry-contact output or native Home Assistant integration without an extra bridge. A good choice if simplicity is your priority, not if you're looking to integrate it into your own Node-RED project.
Smart Plug with Energy Monitoring 15A (4-pack)
Real-time power monitoring (watts) is the differentiator over a simple plug — useful for consumption-based automations, like turning off a device when a cycle finishes. It's made by AiSeek: a real 1800W/15A rating with built-in short-circuit and overload protection, ETL and FCC certified, but 2.4GHz WiFi only (no 5GHz). The 4-pack makes it convenient to equip several points at once, but you're still dependent on the SmartLife app (Tuya-based) to configure them — and it doesn't pair directly with Alexa: you first connect it to SmartLife and link it from there as a third-party service to Alexa or Google Assistant.


