What command i need to restart only Node Red?
This site is now in read-only archive mode. Please move all discussion, and create a new account at the new Victron Community site.
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.
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?
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
I struggle to get the Exec Node to work.
I have tried the following config:
The response from the return code is rc: -2
Node config. -----------------
[
{
"id": "8bb5d0b2823d91cf",
"type": "exec",
"z": "150d8aa36daea093",
"command": "Restart Node Red?",
"addpay": "",
"append": "kill all node-red",
"useSpawn": "true",
"timer": "",
"winHide": false,
"oldrc": false,
"name": "Restart Node Red?",
"x": 330,
"y": 3760,
"wires": [
[
"f23f9211a6580f83"
],
[
"de096e5af0186ffe"
],
[
"944f2c9ea9715b9d"
]
]
}
]
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"
]
]
}
]
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
40 People are following this question.