Remote ShutDown ??

StarTrek133

Contributor
Joined
Sep 5, 2022
Messages
112
Hello Everyone,

I am new to TrueNas and working on building my first box .. I plan to use it for a media / file server instead of windows .. I am wondering can it be remote shut off ? currently I have IFTTT and PushBullett to let me shut down the computer by telling my google home to turn it off ..

I would like to keep this if I can as I don't need the computer on while I am sleeping .. Any thoughts ?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I don't need the computer on while I am sleeping
Yeah, you kind of do, as that's when it does a lot of the system maintenance tasks. But if you want to power it off at night, why does it need to be done remotely? Just set a cron job to power it off at the desired time.
 

StarTrek133

Contributor
Joined
Sep 5, 2022
Messages
112
Hi Dand35

because this computer will be my media computer / file server ... I turn it off at night once I am done watching Plex or Anime .. No reason to leave it on at night and waste my money on driving up my power bill ..

So when I am about to go to bed I just tell google to turn off all computers and it powers down all the computers in the group ..

That is why I want to do it remotely .. call it being lazy and not wanting to get up out of bed .. So Hope I am making sense ..
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Again, the simple answer is to just schedule a cron task. Figure out when you go to bed, add maybe a half hour just to be on the safe side, and schedule a task to shut down the server then.

Doing it remotely is harder. It's a simple enough API call, but allowing (say) ifttt to do it means that (1) you need either a static IP address or a dynamic DNS name, and (2) you need to expose your API to the Internet. The latter, in particular, is strongly discouraged.

Edit: now, if you're running your home automation locally, e.g., with Home Assistant, it's a local device making that API call. Much safer.
 

StarTrek133

Contributor
Joined
Sep 5, 2022
Messages
112
Thanks Danb35,

Once I am more along with the box I will look into "Cron Task" as I am new to TrueNas and Linux I don't know what that is ..

Currently I use IFTTT that does the command with Google Home the command is then sent to PushBullett once PushBullett gets the command it goes to Push2Run which then in turns send the command line code for windows to shut down safely ..

The reason I like doing when I say is I go to bed at different hours every day .. The Joys of having Insomnia ..
 
Top