NAS functions for MP V1.0 / Use HTPC as fileserver (1 Viewer)

netexplorer

MP Donator
  • Premium Supporter
  • January 21, 2009
    736
    104
    Home Country
    Germany Germany
    Hello MP user.

    i want to share what i have developed.
    It's not really a plugin, but to use the HTPC as fileserver, i wrote two scripts, A client and a server part. The client part can wakeup the server and start remotely the server process, so if this process is in TVServerConfig in process list to prevent standby, the server remains online, until the client is shutdown or command "Stop server" is used.

    Features
    -One or more clients configurable
    -Start server process through Wake On Lan
    -Start server after resume from standby/hibernate
    -Stop server process
    -Client process show status info of server
    -Server process checks if a client is active, if none server process end and HTPC can suspend or hibernate

    To provide this functions, some tools are nessesary:
    WOLCmd to wakeup the server over Wake On Lan
    PSTools to start/stop/check the server process (Please start every tool one time, to accept the license)

    Server Installation:
    -Place the server components in one folder.
    nasserver.exe
    nasserver.ini
    pslist.exe​
    -Configure the nasserver.ini with as much clients as you need (IP-Address, Username and Password).
    -The checkinterval define the time period in seconds the server check if a client is active.

    Client Installation:
    -Place the client components in one folder.
    nasclient.exe
    nasclient.ini
    pslist.exe
    psexec.exe
    pskill.exe
    wolcmd.exe​
    -Configure the nasclient.ini (MAC-Address of server, IP-Address of server, Installation path of nasserver.exe, Username and Password).

    You can place a link in client autostart folder to start the server every time the client is running, or start the nasclient.exe on demand.

    TVServerConfig
    -Start the nasserver.exe manually and add the process in PowerScheduler plugin to the process list which prevent the standby.

    Problems
    -The server doesn't wake up when i start nasclient.exe.
    Remember, that the wakeonlan function have to work properly to start the server.
    To ensure that, the settings in BIOS and configuration of network card have to be checked.​

    -The nasserver process is not visible in tray.
    That's normal, because of the process runs with other credentials than the current user.
    For bug finding, you can start the process manually.​

    Changelog
    -V0.9 Original release
    -V0.9 Added a modified version using the ping command in nasserver.exe
    -V0.91 Modify Ping version to use only 1 Ping signal
    -V1.0 Added resume feature
     

    Attachments

    • mpnas_v1_0.zip
      30.6 KB
    • mpnas_ping_v1_0.zip
      30.6 KB

    urev

    MP Donator
  • Premium Supporter
  • June 7, 2005
    69
    0
    Germany
    Great tool.
    Why is it necessary that the server needs Login-Data of the client? I would like to make a "NAS"-user only for the server. It should be enough if the clients send keep-alive packets every minute or so to the server. If there are not keep-alive packets any more, the server-program terminates and the server hibernates. Would that be possible?

    bye, urev
     

    jojo1411

    Portal Pro
    January 23, 2008
    182
    37
    Home Country
    Germany Germany
    Unfortunately Pstools didn't work with Windows XP Home as target mashine. The server needs Pslist kommand to detect the client on my Notebook running XP Home. Nevertheless usefull tool if both mashines running the Professional edition!!
     

    urev

    MP Donator
  • Premium Supporter
  • June 7, 2005
    69
    0
    Germany
    Perhaps the server-exe could ping the client-IPs to look if they are still available? Since it is local LAN this shoudn't be a problem.
    bye, urev
     

    netexplorer

    MP Donator
  • Premium Supporter
  • January 21, 2009
    736
    104
    Home Country
    Germany Germany
    Hi,
    the first version i used, pings the client. I think i can provide a modified server.exe next week.
    Bye, Netexplorer.
     

    netexplorer

    MP Donator
  • Premium Supporter
  • January 21, 2009
    736
    104
    Home Country
    Germany Germany
    So here it is...
    I have added a modified version in the first post. Please test.
    Netexplorer.
     

    globaldonkey

    MP Donator
  • Premium Supporter
  • April 23, 2007
    755
    79
    Home Country
    Very useful tool.

    I have a couple of requests:

    1. Would it be possible to add a command line version of nasclient, so that it can be run from a batch file / scheduled task. I'd like to schedule the client to wakeup my server to do a backup.

    2. Would it be possible to add to the client interface (mainly the gui) the ability to shutdown, suspend and hibernate the server. I know I can do this with pstools for command line - would be useful for when I'm using the gui to have these functions available.
     

    netexplorer

    MP Donator
  • Premium Supporter
  • January 21, 2009
    736
    104
    Home Country
    Germany Germany
    AW: NAS functions for MP V1.0 / Use HTPC as fileserver

    Hi,
    1. You can schedule a task/batchfile, that runs the nas client to wakeup your server with the actual version. At startup the client wakes the server.
    2. Normally i use the internal power scheduler to hibernate my system. But i can integrate it in a future version.
    Regards,
    Netexplorer.
     

    globaldonkey

    MP Donator
  • Premium Supporter
  • April 23, 2007
    755
    79
    Home Country
    Hi,

    1. Ah ok, my problem was that I wasn't waiting long enough. :oops: It takes about 90 seconds from the launch of the client until it actually sends the magic packet to the server, and then about another 60 seconds before it fires the nsaserver process on the server. I was thinking it would fire the WOL packet almost as soon as the client started.

    2. Yeah I use MP Power Scheduler too to shut things down automatically, but I have a server that I don't have MP TV Service installed on. Also, MP Power Scheduler will only go down to hibernate or standby, not shutdown. That's where the ability to shutdown / hibernate / standby through the client would come in handy. Today, I just fire off a script that uses psshutdown to shut the machine down remotely, which works fine - would just be nice to get that function into the NAS client tray icon :D

    :D again - really useful tool
     

    Users who are viewing this thread

    Top Bottom