Node-RED is renown for its MQTT support since that is where it started - as an IBM demonstrator for their experteese on IoT.
However, this is only one of many ways to send/receive data between Node-RED and other systems or services. Each of tese protocols has its own advantages and disadvantages.
The protocols 🔗︎
In rough order of descending order of ease of use (very rough!):
- UNIX Pipes
This is likely to be the easiest to use even though it requires an extra service to be running, a “Broker”.
There is even a custom node available that lets you run a broker from within Node-RED itself. However, I don’t recommend doing that because it adds significant overheads that are easily avoided. The most commonly used broker is “Mosquito” which has low resource overheads, is fast, secure and capable. It is easily installed and configured.
While MQTT data payloads are just strings, Node-RED lets you send and receive more complex data structures (JSON).
The things that put MQTT at the top of the list are:
- The ability to easily handle more complex data
- The availability of MQTT libraries and clients for many platforms