Wake on LAN (WOL) for remote/network folders

Discussion in 'Improvement Suggestions' started by MPUserFromGER, August 15, 2007.

  1. MPUserFromGER
    • Premium Supporter

    MPUserFromGER MP Donator

    Joined:
    July 31, 2006
    Messages:
    403
    Likes Received:
    3
    Location:
    Germany
    Ratings:
    +3 / 0
    Home Country:
    Germany Germany
    Started on: 2007-08-15
    last update: 2007-08-20

    Summary:
    The idea is to add a WOL (Wake On LAN) feature to each "edit folder" screen in order to wake up a remote computer before the share is accessed.

    Description:
    My problem is as follows:
    I have my HTPC in the living room. Due to the fact that the HTPC shall be as small, quiet and energy efficient as possible, I have only one small hard disk in it. All my music, video and picture files are located on my desktop PC, which is located within another room and which runs two hard disks as RAID 1 due to saftey issues. I have connected the network shares in the MP setup. Due to the fact that I do not want to run the desktop PC 24/7, the idea is, that if I select one of the folders within MediaPortal, MP shall send a magic WOL packet to the desktop PC and wake it up automatically.

    This idea has already been discussed many times on different locations within this forum. Also, there has been a WOL plugin developed by Babnik42 (see ="https://www.team-mediaportal.com/files/Download/Plugins/Utilities/WakeonLAN/")
    However, the Plugin does not work any more with the latest SVNs and also, there is nowehere such an automatic solution.

    My proposal is to modify the "edit folder" screen within MediaPortal Setup (see pictures below, please note: The FTP section shall not be discarded! I just have overwritten it to show my idea). MP should then send the magic packet to the PC and wait for it to become available before it accesses the share alternative 1, full MP integration). As an alternative, a batch file could be started and MP waits until it is finished (alternative 2). This way it would be even more flexible. MP could use any of the WOL tools, which are available for free on the internet (e.g. ="http://www.depicus.com/wake-on-lan/wake-on-lan-cmd.aspx"

    The question is now: Is there somebody who could or is willing to implement my proposal? (unfortunately, I am not a programmer...)

    Is anybody supporting this idea at all? Please comment.


    UPDATE (17.08.2007):
    Currently, I am using the following batch file, which I call with the MyPrograms Plugin, to wake up my data server and to reconnect the network share:

    -batch file begin-
    @ECHO OFF
    SET NetShareName=<the name of the network share, e.g. \\DataServer\D$>
    SET NetShareMAC=<the MAC address of the remote PC, e.g. 0011d80a8feb>

    @ECHO ON
    REM Send WOL command to remote PC
    REM Format is "wolcmd [macaddress] 255.255.255.255 255.255.255.255"
    "C:\Programme\Tools\WOL\wolcmd" %NetShareMAC% 255.255.255.255 255.255.255.255

    REM Now wait until the remote share is accessible
    :Anfang
    "C:\Programme\Tools\WOL\wait" 1
    IF NOT EXIST %NetShareName%\*.* GOTO Anfang

    REM Now disconnect remote share (necessary because if
    REM another instance has already connected it, the connect
    REM will fail
    net use %NetShareName% /delete

    REM Now connect remote share
    net use %NetShareName%



    EXIT
    -batch file end-

    Please find this batch file attached.
    You need the WOL tool from the link above and the WAIT.EXE, which can be found on the Internet.

    A MP developer could integrate this into MP or allow that such a batch file could be called BEFORE a network share is accessed.

    UPDATE (20.08.2007):
    I have updated the attached batch file for WOL. I have added the following lines:
    Now, this batch file works perfectly for me. However, it would be really great, if a MP dev could integrate this into MP. I know that there is a feature freeze until 0.2.3 Final is out but I really hope that someone is looking into that afterwards. ;)
     

    Attached Files:

  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. user_99

    user_99 Portal Pro

    Joined:
    August 13, 2005
    Messages:
    78
    Likes Received:
    1
    Location:
    Austria, Graz
    Ratings:
    +1 / 0
    Sounds a good idea.
     
  4. MPUserFromGER
    • Premium Supporter

    MPUserFromGER MP Donator

    Joined:
    July 31, 2006
    Messages:
    403
    Likes Received:
    3
    Location:
    Germany
    Ratings:
    +3 / 0
    Home Country:
    Germany Germany
    Updated my first post.
     
  5. wimpies

    wimpies Portal Member

    Joined:
    October 2, 2006
    Messages:
    19
    Likes Received:
    0
    Ratings:
    +0 / 0
    Home Country:
    Belgium Belgium
    great idea, hope one of the devs is listening.
     
  6. MPUserFromGER
    • Premium Supporter

    MPUserFromGER MP Donator

    Joined:
    July 31, 2006
    Messages:
    403
    Likes Received:
    3
    Location:
    Germany
    Ratings:
    +3 / 0
    Home Country:
    Germany Germany
    Updated the first post again.
     
  7. savaino

    savaino Portal Member

    Joined:
    November 13, 2006
    Messages:
    26
    Likes Received:
    1
    Ratings:
    +1 / 0
    Hi.I have EXACTLY the same problem and I was looking for a possible solution. I was going the batch file route and now I'll try your batchfile. Does this will work when resuming the HTPC from standby or hibernation ?
    Thanks for posting the file!
    --sav
     
    • Like Like x 1
  8. MPUserFromGER
    • Premium Supporter

    MPUserFromGER MP Donator

    Joined:
    July 31, 2006
    Messages:
    403
    Likes Received:
    3
    Location:
    Germany
    Ratings:
    +3 / 0
    Home Country:
    Germany Germany
    I am using the MyPrograms Plugin to execute the batch file. The batch file works fine here, independently if the HTPC was in hibernate mode before or not because it disconnects the share first and then reconnects it properly. ;)

    I really would like to see this functionality implemented seamless that means if MP tries to access the share and recognizes that it is not available it would call the batch automatically. Hopefully any devs likes this idea and will add it in the future, maybe to MP2?
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!