Executing a node from an external website

Hey folks!

I'm developing a web system and I want to execute a Node-RED node from this app so I'm wondering if the Node-RED API provides something to help me with that.

I have a flow that contains a button and a "Modbus Write" node and my goal is to trigger the "Modbus Write" node from an external HTTP request so I can use the Node-RED as a "back-end" and this web system as the user interface.

Any thoughts? Thanks in advance.

Why not simply use Node-RED as an API server? Then call the API endpoint from your web system.

1 Like

How can I do that?

At its simplest, you can use an http-in/-out pair of nodes to define the API endpoint. You feed whatever you want to return to the calling system into the http-out. The flow is triggered by the calling system referencing the endpoint defined by the http-in.

In your web system, you can use a Fetch call assuming you have reasonably up-to-date browsers using the system.

1 Like

Awesome! I'm going to take a look into these nodes.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.