question

x90cr avatar image
x90cr asked

Restart only Node Red

What command i need to restart only Node Red?

Node-RED
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

3 Answers
Stefanie (Victron Energy Staff) avatar image
Stefanie (Victron Energy Staff) answered ·

@x90cr

killall node-red

or

svc -t /service/node-red-venus

or even easier

use the soft switch from the Venus OS Large menu on the remote console. Disabled will stop Node-RED, enabled will start it again.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

tenekes avatar image
tenekes answered ·

I want to replicate the Node Red soft switch from the Venus OS Large menu on the remote console, in a node red dashboard using a button and an exec command. Which commands should I execute to stop and the start node red?

2 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

johnny-brusevold avatar image johnny-brusevold commented ·

@tenekes

You can stop node-red with exec-node, but you cannot start it from node-red, since it has stopped.

With the killall node-red command in an exec node, node-red will automatically restart

0 Likes 0 ·
Show more comments
Anders avatar image
Anders answered ·

I asked the question to Copilot in Bing.

"It" gave me a new Exec node that works fine:

Getting help with coding using AI can be quite helpful -
------------------------------------------

[

{

"id": "exec-node-id",

"type": "exec",

"z": "150d8aa36daea093",

"command": "killall node-red",

"addpay": false,

"append": "",

"useSpawn": "false",

"timer": "",

"winHide": false,

"oldrc": false,

"name": "",

"x": 540,

"y": 4160,

"wires": [

[

"77a66333cd7e5c62"

],

[

"8a65b86e631d5b07"

],

[

"30953456692f0a8f"

]

]

}

]

1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Alex Pescaru avatar image Alex Pescaru commented ·

Hi @Anders

You've had a space between the kill and all in the previous script.

The command is killall, one word, without spaces.

Alex

1 Like 1 ·