Wake-on-LAN

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
hypervisor
Newbie
Newbie
Posts: 2
Joined: June 30th, 2011, 1:29 pm

Wake-on-LAN

Post by hypervisor »

I have sickbeard automatically downloading TV shows via SABNZBD. Shows are downloaded and stored in a folder on a remote media centre running XBMC.

This works well as long as the remote PC is on, but obviously fails when it's not on.  is there anyway I can send a magic packet to the remote PC to wake it up as soon as SAB starts the download so it's ready to receive the files when it's finished all the other post processing I've got it doing (repairing and unpacking)?

i only want it to do this for the TV category within SAB which I've created.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Wake-on-LAN

Post by shypike »

hypervisor
Newbie
Newbie
Posts: 2
Joined: June 30th, 2011, 1:29 pm

Re: Wake-on-LAN

Post by hypervisor »

Thanks. I have that already, but need to know if there's a script which will do it all.
hewligun
Newbie
Newbie
Posts: 6
Joined: January 14th, 2013, 11:20 am

Re: Wake-on-LAN

Post by hewligun »

Did you ever have any luck in this? I am looking to do the same thing. I have some push setup on a newznab site and would like to have my computer wake up when a file is pushed via the site to sabs api and download the file.

I havent quite figured out how this is possible. I dont think wake on lan by itself will do this... anyone?
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Wake-on-LAN

Post by shypike »

An external site will never be able to wake up your system.
Wake-on-lan is just that: it works within your own LAN.
xreyuk
Newbie
Newbie
Posts: 17
Joined: December 28th, 2012, 12:46 pm

Re: Wake-on-LAN

Post by xreyuk »

shypike wrote:An external site will never be able to wake up your system.
Wake-on-lan is just that: it works within your own LAN.
This is not strictly true.

You can use Wake on Lan remotely to wake a sleeping PC, but not to wake a shutdown one. If the interface has an IP address, you can use port forwarding to wake the device.

If your PC is sleeping, port forward the correct port (usually 7 or 9) to the LAN IP of the machine you want to wake. When you send a packet on that port, your router will send the packet to the IP address you have forwarded to, and providing the details of the MAC address in the magic packet are correct, it will wake the PC.

Obviously, you can't wake a shutdown PC like this because the interface doesn't have an IP address.

Also, before anyone says the above is incorrect, that's how I do it, and it works perfectly :)
hewligun
Newbie
Newbie
Posts: 6
Joined: January 14th, 2013, 11:20 am

Re: Wake-on-LAN

Post by hewligun »

xreyuk wrote:
shypike wrote:An external site will never be able to wake up your system.
Wake-on-lan is just that: it works within your own LAN.
This is not strictly true.

You can use Wake on Lan remotely to wake a sleeping PC, but not to wake a shutdown one. If the interface has an IP address, you can use port forwarding to wake the device.

If your PC is sleeping, port forward the correct port (usually 7 or 9) to the LAN IP of the machine you want to wake. When you send a packet on that port, your router will send the packet to the IP address you have forwarded to, and providing the details of the MAC address in the magic packet are correct, it will wake the PC.

Obviously, you can't wake a shutdown PC like this because the interface doesn't have an IP address.

Also, before anyone says the above is incorrect, that's how I do it, and it works perfectly :)
Is there a way for me to incorporate that into sabnzbd somehow? So when the newznab sends the queue'd file over it can do that process? Or is that something the site itself would have to send? I have a dyndns setup now currently so the site sends to my dyndns at the port.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Wake-on-LAN

Post by shypike »

hewligun wrote:Is there a way for me to incorporate that into sabnzbd somehow?
The computer running SABnzbd is asleep when the site sends it NZB.
It's the sending itself which should trigger the router to wake-up your computer.
It's still tricky, because probably the site will need to retry when the system doesn't wake up fast enough.
hewligun
Newbie
Newbie
Posts: 6
Joined: January 14th, 2013, 11:20 am

Re: Wake-on-LAN

Post by hewligun »

shypike wrote:
hewligun wrote:Is there a way for me to incorporate that into sabnzbd somehow?
The computer running SABnzbd is asleep when the site sends it NZB.
It's the sending itself which should trigger the router to wake-up your computer.
It's still tricky, because probably the site will need to retry when the system doesn't wake up fast enough.
That should not be a problem. If the site fails to send via the queue it adds to a bookmark and sab should poll that every 15 mins. So as long as my sleep timer is like 30-45 mins i should be ok. How do i set it up though? As said above I was under the impression you cannot send magic packets over the internet only local lan.

Also I have set my hdds for now to spin down after 30mins of inactivity. it appears with xbmc and sabnzbd running it never gets to that state. I know xbmc after 30mins the screen will shut off which makes me wonder if sabnzbd will keep the hdds spinning regardless? like it wont allow the computer to sleep...
Eejit
Sr. Member
Sr. Member
Posts: 267
Joined: September 10th, 2008, 5:46 pm

Re: Wake-on-LAN

Post by Eejit »

As I understand it, the WAN magic packet has to be formatted in a certain way with the right information. It's not enough for a website or another computer to just send any sort of packet to wake the PC up.
If that was the case, PC's would never sleep as the ports are probably receiving some form of data constantly.

So with that in mind, just sending a NZB will not do it. you would have to get the site to send a magic packet first, then the NZB.
Eejit - The name say's it all !!
Image
hewligun
Newbie
Newbie
Posts: 6
Joined: January 14th, 2013, 11:20 am

Re: Wake-on-LAN

Post by hewligun »

Eejit wrote:As I understand it, the WAN magic packet has to be formatted in a certain way with the right information. It's not enough for a website or another computer to just send any sort of packet to wake the PC up.
If that was the case, PC's would never sleep as the ports are probably receiving some form of data constantly.

So with that in mind, just sending a NZB will not do it. you would have to get the site to send a magic packet first, then the NZB.
hmm I wonder how they will send the magic packet if what someone said is true. That it can only send magic packets from a local lan....
Eejit
Sr. Member
Sr. Member
Posts: 267
Joined: September 10th, 2008, 5:46 pm

Re: Wake-on-LAN

Post by Eejit »

WOL (not WAN in my first post) can be done over the internet

http://www.depicus.com/wake-on-lan/woli.aspx
Eejit - The name say's it all !!
Image
dogzipp
Newbie
Newbie
Posts: 49
Joined: April 3rd, 2012, 5:27 pm

Re: Wake-on-LAN

Post by dogzipp »

You need special firmware on your router, from what I gather. It's not as easy as just forwarding a port. You need to create ARP entries for broadcast packet to be... excuse the redundancy... broadcasted.

http://www.dd-wrt.com/wiki/index.php/WO ... Forwarding
Post Reply