flow to shut down a Raspberry Pi

This enables you to cleanly shutdown a Raspberry Pi without having to ssh in to run sudo poweroff. Use with some care, as it gives anyone with access to the Node-RED GUI the ability to shut the machine down!

[{"id":"ab01bcd1.c410e","type":"inject","name":"shutdown!","topic":"","payload":"","repeat":"","crontab":"","once":false,"x":493,"y":479,"z":"a7da7b08.56417","wires":[["8f9f1fe.3f891e"]]},{"id":"8f9f1fe.3f891e","type":"exec","command":"sudo poweroff #","append":"","useSpawn":"","name":"turn off Pi","x":667,"y":478,"z":"a7da7b08.56417","wires":[[],[],[]]}]

Flow Info

created 4 years, 6 months ago

Node Types

  • exec (x1)
  • inject (x1)


  • Raspberry
  • Pi
  • shutdown
  • sudo
  • administrator
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option