Jump to content

Sleep unRAID when HTPC goes offline


jj0076

Recommended Posts

Hi,

 

I currently have my unRAID setup to enter S3 sleep shortly after the disks have spun down. It wakes when I boot up my HTPC (sends a WOL command as part of the startup tasks).

 

I was wondering if there was any way I could set it all up so that my unRAID sleeps when the HTPC goes offline?

 

Thanks in advance for any ideas.

Link to comment

Ok so I'm pretty new to all this, I don't actually know what a cronjob is!! I used a sleep script (written by someone else on the forums) on unraid 4.7 but this stopped working when I upgraded to 5.0 rc8a so I know use the sleep features built into simple features. Would I need to go back to using a script again?

Link to comment

ah, ok. your first post made me think, you'd currently have some custom scripts running for this :)

 

i don't know of any plugins, that would do this at the moment. so if you'd want to put your unraid to sleep as soon as your htpc goes down, i don't think there is any other way...

 

well, since you've set your unraid to go to sleep after the disks have spun down, you could reduce the time they take to spin down.

Link to comment

The sleep function provided in SimpleFeatures allows you to do what you want.

 

In the setting Wait for device inactivity (address) put the IP address of your HTPC.

 

 

This will the sleep script check if your HTPC is online, as soon as it isn't your unRAID goes to sleep as well.

 

 

Link to comment

Thanks, I missed that one in the settings!! Will try it out when I get home.

 

Edit

Ok so that worked, a short while after turning off my HTPC the unraid box went to sleep. I did have some problems waking the machine up this morning however, the WOL appeared to work in that the machine spun up the disks and the network light on my ethernet switch box came back on, but the device shares were not available, the web gui could not be accessed and telnet would not connect. I had to hold the power switch down to force a reset.

 

I'm going to mark this thread as solved as my original question was answered, thanks again for that. I'll run some more tests over the next week or so and post back on a new thread if I continue to get a frozen machine on wakeup.

Link to comment
  • 2 months later...

Hope its ok to resurrect this thread....

The solution given to me previously works perfectly; I was just wondering if there was a way to make my unraid box scan for more than one IP before sleeping itself? Ideally I'd now like it to wait for 3 machines to be offline before it sleeps. Can I enter more than one IP maybe separated by a comma or colon/semi colon or some other character?

 

Thanks in advance for any help with this upadated request!!

Link to comment

Hope its ok to resurrect this thread....

The solution given to me previously works perfectly; I was just wondering if there was a way to make my unraid box scan for more than one IP before sleeping itself? Ideally I'd now like it to wait for 3 machines to be offline before it sleeps. Can I enter more than one IP maybe separated by a comma or colon/semi colon or some other character?

 

Thanks in advance for any help with this upadated request!!

Yes, more than one IP address can be entered (use a space for separation).

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...