Better support for external nodes

I have a project where are lots of active places in different rooms. I can control all with one node-red but due to cabling and other issues I'd like to have an arduino externally from Node-RED and talk to it over ethernet. This is currently supported via MQTT.

One of the issue is that if I switch to MQTT all the nodes on Node-RED are no longer reading inputs, ADCs or writing to relays. They all need to be converted to MQTT nodes, which all look the same and make it difficult to comprehend later on.

I could run Node-RED at every active place but it would get troublesome in other ways.

What I'd like to have is to have the current nodes, nice graphics etc, to work as they have been but in the lowlevel the operations wouldn't be done on the same system with Node-RED but in an external arduino, ESP, even Raspbian.

Would this be feasible?

Welcome to the forums @anttiryt

I'm not quite sure this is the responsibility of Node RED to provide, Node RED Node's in the flow are running on Node RED - this is the core of Node RED.

With that said:

You can achieve an emulation of what you want with FlowFuse :
you create a flow, and deploy it to remote devices (but these devices are just running Node RED)

Another (more advanced) option, is Node RED MCU Edition, and the plugin.

With this approach, you will develop your own custom node, that connects to an MCU (running Node RED), and executes any instructions your node is provided with.

The thing to remember here, the nodes you see in a flow, are just blocks of javascript, that handle data being sent to it, and returns any data back it may have updated.

For nodes that connect to sensors, its just javascript listening on a GPIO and returning you what it received.

1 Like

Give the MQTT nodes meaningful names.

What makes you say this?
I don't see any reason why changing some devices to use MQTT would have any effect on the other devices.
Nor why changing an input or output node in Node-red from another I/O method to MQTT would affect other flows
Can you explain in more detail please?

Of course.

It is up to you where you do the processing. Because you are already using MQTT, it is easy to do some processing on Node-RED and some on device and pass it all through to appropriate topics on MQTT.

That approach lets to set your own timescales for moving between approaches as well since it really no longer matters where you do the processing, it is now fully decoupled from the devices doing it and the devices displaying it.