Restart flow with button from dashboard

Hi everyone, I have a question how can I restart a flow through a button in the dashboard?
thank you all

1

Hi.

Sorry, but I have to ask....

What do yo mean: Restart the flow?

I have to modify the flows.json file and to apply the changes I have to restart the flow

Why are you modifying the flows.json file?
(More so)
HOW are you modifying it?

Normally it is via the editor/GUI and so there is nothing to do.
You press the DEPLOY button and that's it.
Oh, ok. You say From the dashboard.

Ok, above my skill set.
Sorry.

1 Like

As @Trying_to_learn says, a key question is how are you updating the flow file?

@Giacomo23 just as an option which should work, but is brute force:

After you modify the flows.json file and need to restart the flow:

exec node and issue the command:
node-red-restart

It won't be quite that simple - paths, etc.

But: at a pinch it would do what you want.
However, I think it is problematic in ways you haven't thought.

You could also use the Admin API. For this, you first have to create an authentification key, then you can POST to /flows to restart every flow. To to this you have to define "reload" as the deployment type in the Header. Unfortunatly i don´t know how to restart an individual flow, as far as i know it is only possible to restart all at once. You can look it up here: POST /flows : Node-RED (nodered.org)

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