How to deploy Node-RED


A little bit of background: I have an MVHR unit installed in the house, and I have a need to control and monitor some of its functions. I have a simple Python-based web server on a RasPi Zero that enables me to remotely control one of the main functions (via Automation pHAT), but want to do something more.

I came across Node-RED a couple of days ago, and have already installed it on a spare RasPi Zero to play with. It looks like it will do everything I need, and more. What I want to understand is how best to deploy this for my project.

My initial thought is to install Node-RED on a single server (along with a Mosquitto Broker), but I get the impression that this would restrict configuration to that server, i.e. the flows would only run on that server (albeit that they could be exported).

My second thought is to install Node-RED on the server, but also to install Node-RED on every client that needs more local intelligence. Each client would be self-contained, responding to input messages and generating output messages as necessary. Am I correct, or is this overkill? I'm not adverse to writing software to do this, but it seems Node-RED provides everything I need already.

As an example, the client that interfaces with the MVHR will monitor temperature and flow rate for both air and water. Locally, I might want to configure some intelligence to control a low pressure hot water pump and generate alarms. Remotely, I might want to respond to generate a button press event that will result in the local change of status of the air exchange. i.e. separating the concerns of the internal control of the MVHR from the external control.

Am I overthinking this? Some advice and guidance would really be appreciated.


I suggest starting by installing it on the server and see what develops. I run most of mine on a central server but I have some system parts that I want to keep working even if the wifi is down for example. For those I put that specific functionality on a pi in that area. I also run mosquitto on several machines with the data in each being the data for that area. A node-red on one machine can access several mqtt servers on different machines.


You can put NR on as few or as many machines as you want. It depencs on your sitation. For example:

  • I have NR on a Pi that handles home environment monitering and it is a mosquitto broker. msgs are sent to it from several WeMos D1's that have sensors attached to them.

I have two other Pi's with NR installed, but they are special purpose. One is in the head of a skeleton which has a PIR to detect people and it controls the servos running the jaws, lights the eyes and sends sound to a speaker. The other is in a wolf's mask with eves and a speaker to howl. You've probably guessed that I mostly use that at halloween.

I also have a Pi with NR that sits in the greenhouse on my son's property that measures the temeprature and water level in a water tank. It also moitors two float switches and controls an electronic valve to fill the tank when it gets low (much more effective than me driving down to fill it and MUCH more effective than me calling my son toelling him to fill it which he then proceeds to forget to do :rofl:)

So it all depends on what your need is and what you can afford (time and money) to do.

Just what ever you do, remember to develope a backup strategy.


Thank you for the prompt response. It sounds like I’m heading the right way, so I’ll keep going: a mix of dumb (reporting state, responding to external events) and intelligent (reporting state, local control, responding to external events) clients.


Local zones / clusters being part of a bigger whole sounds like a really good idea - thank you.