# Orange (or Raspberry) Pi Controller

**URL:** <https://discourse.nodered.org/t/orange-or-raspberry-pi-controller/96456>\
**Category:** Share Your Projects\
**Created:** [7 April 2025 18:16 UTC](https://discourse.nodered.org/t/orange-or-raspberry-pi-controller/96456 "2025-04-07T18:16:04Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [7 April 2025 18:16 UTC](https://discourse.nodered.org/t/orange-or-raspberry-pi-controller/96456/1 "2025-04-07T18:16:04Z")

</div>

This tutorial documents the steps to build a controller that will boot-up / shut-down an Orange Pi or Raspberry Pi in a graceful way so as to minimise the risk of losing data or corrupting files.

I recently purchased an Orange Pi 5 Pro with a 64GB eMMC and a 512GB NVMe SSD, then installed OpenMediaVault (OMV) on it to serve as a small Network-Attached Storage (NAS) device on my home network. Although OMV provides a web-based user interface for managing the NAS and shutting it down in a controlled manner, I wanted an alternative method that would allow me to use Alexa voice commands as well as my own custom interface, created using the Node-RED Dashboard 1.

[https://teamwork-int.com/share\_my\_projects/](https://teamwork-int.com/share_my_projects/)  
Go to the above website and click the folder labelled… **H\_orange\_pi\_controller** to locate…  
● Orange Pi Controller flow (located in the Pi that controls your home network)  
● Orange Pi Simulate Tasmota flow (located in the Pi that is plugged into the Athom Switch)  
● Orange Pi Shutdown flow (located in the Pi that is plugged into the Athom Switch)  
● A copy of this Tutorial

[tutorial.pdf](https://discourse.nodered.org/uploads/short-url/noA7G4lwbKxA5SZqNluqs92ZbBy.pdf) (1.1 MB)

Note: It took much longer and more effort to write the Tutorial than it did to write the code!!!

---

<div class="post-metadata">

**Author:** ![Buckskin](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@Buckskin](https://discourse.nodered.org/u/Buckskin)\
**Post date:** [7 April 2025 19:08 UTC](https://discourse.nodered.org/t/orange-or-raspberry-pi-controller/96456/2 "2025-04-07T19:08:01Z")

</div>

Hi Dave, thanks for this.  
While I do not need to shutdown my Pi's on a regular basis this gives me the ideas to shut them down programmatically when I know the power is going to be off. At the moment to shut them down I use MobaXterm to access each individually.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [7 April 2025 21:04 UTC](https://discourse.nodered.org/t/orange-or-raspberry-pi-controller/96456/3 "2025-04-07T21:04:27Z")

</div>

If talking to multiple devices you could use pssh to talk to them all in one go. ( though I think mobaxterm can also do something similar but I’ve not worked that out yet)

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [8 April 2025 06:26 UTC](https://discourse.nodered.org/t/orange-or-raspberry-pi-controller/96456/4 "2025-04-08T06:26:53Z")

</div>

Forgot to mention, if you want to send a message to one or more Telegram accounts, then you will need to populate this global variable somewhere in one of your flows as shown below.

![tues_chatIds](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/9/7944f3de86041a51d42d7d6cc8169bf77b5f3883.png)

```auto
let chatIds = [<chatId>, <another_chatId>];

global.set("my_chatIds", chatIds);

return msg;

```

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [8 April 2025 07:19 UTC](https://discourse.nodered.org/t/orange-or-raspberry-pi-controller/96456/5 "2025-04-08T07:19:06Z")

</div>

> [@dceejay](#):
>
> mobaxterm can also do something similar

Thanks for telling us about that Dave 😁  
There's a button ("Multiexec") for it which lets you type in all (or some) connected terminals simultaneously.  
Here's 2 out of 3 Pies updating

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/0/40f4aed678c633b819708ea124fcde974394d7f7.png)

---

<div class="post-metadata">

**Author:** ![Buckskin](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@Buckskin](https://discourse.nodered.org/u/Buckskin)\
**Post date:** [8 April 2025 20:52 UTC](https://discourse.nodered.org/t/orange-or-raspberry-pi-controller/96456/6 "2025-04-08T20:52:51Z")

</div>

Brilliant. Thank you all for that. 7 Pi's currently updating. However, I think I will still have a-go at Dave's Flow 'cause one button push to shut them all down at once is even easier

---

<div class="post-metadata">

**Author:** ![kitori](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@kitori](https://discourse.nodered.org/u/kitori)\
**Post date:** [9 April 2025 06:22 UTC](https://discourse.nodered.org/t/orange-or-raspberry-pi-controller/96456/7 "2025-04-09T06:22:15Z")

</div>

Hey Dave,  
can you recomend this Orange pi as a NAS? i thought about building a small one with the pi5 for home use, but the orange pi seems also a nice fit.  
Thanks!

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [9 April 2025 06:29 UTC](https://discourse.nodered.org/t/orange-or-raspberry-pi-controller/96456/8 "2025-04-09T06:29:42Z")

</div>

I was going to purchase a Raspberry Pi 5 then a couple of people on the Forum suggested looking at the Orange Pi 5 as it has a NVMe socket on the back of the board.  
I bought an Orange Pi 5 Pro (March 2025) and fitted an eMMC and NVMe and installed OpenMediaVault. Although I've not been using it for very long - it works really well and is VERY fast. It seems to perform most of the tasks my QNAP NAS boxes do.
