Wake On Lan support for MP2 (1 Viewer)

Lehmden

Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,565
    3,946
    Lehmden
    Home Country
    Germany Germany
    Hi.
    My personal solution is to use the Plugin "AppLauncher" to send a MagicPacket to the NAS where my movies are stored. So I can wake the NAS from within MP2 whenever I want. And I also can send it back to sleep with AppLauncher...
     

    happyf1sh

    Portal Member
    August 26, 2007
    43
    22
    Home Country
    United Kingdom United Kingdom
    Hello @Brownard,
    On my testing I found that WOL works when I start the MP2 client program. If I wake the client from suspend (MP2 running) then the WOL does not wake the server.
    Hope this makes sense.
     

    Brownard

    Development Group
  • Team MediaPortal
  • March 21, 2007
    2,306
    1,884
    Home Country
    United Kingdom United Kingdom
    • Thread starter
    • Moderator
    • #34
    On my testing I found that WOL works when I start the MP2 client program. If I wake the client from suspend (MP2 running) then the WOL does not wake the server.
    Hope this makes sense.
    Thanks, it looks like it tries to wake the server before your network adapter has initialised/connected. I'll look into handling this more gracefully.
     

    HTPCSourcer

    Retired Team Member
  • Premium Supporter
  • May 16, 2008
    11,418
    2,336
    Home Country
    Germany Germany
    @Brownard , lots of people are asking whether this plugin can also wake up machines that host shares (other than the server).

    I could imagine that your current design could be expanded, however, we would then need to make this configurable: for every user wanting all his shares to be automatically available, there will be another who doesn't. Also, if we (well, you..) decided to expand the functionality, it would require a GUI with individual settings, helper texts, translations, ...

    In short: should I add a Jira for this?
     

    Brownard

    Development Group
  • Team MediaPortal
  • March 21, 2007
    2,306
    1,884
    Home Country
    United Kingdom United Kingdom
    • Thread starter
    • Moderator
    • #36
    @Testers new version added to first post. I managed to get the client to resolve the server hardware address directly for both IPv4 and IPv6 addresses so the server plugin is no longer necessary and has been removed.

    @azzuro would be good if you could test to see if it's still working in your environment ;)

    @happyf1sh The plugin should now wait for the network connection to become available before sending the WOL packet (by default it will wait for up to 20 seconds). Hopefully this will fix your issues when waking the client.

    lots of people are asking whether this plugin can also wake up machines that host shares (other than the server).
    This is next on the TODO list.
     

    azzuro

    Test Group
  • Team MediaPortal
  • May 10, 2007
    9,984
    5,663
    France - IDF
    Home Country
    France France
    tested quickly,
    the hardware adresse is :
    <HardwareAddress>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA</HardwareAddress>
    but it seems to take the IPv6 adress fine.

    it seems broken, no ?
     

    breese

    Retired Team Member
  • Premium Supporter
  • July 11, 2011
    3,902
    770
    66
    Arlington Heights, Illinois
    Home Country
    United States of America United States of America
    Server V4 IP - 192.168.1.250
    Server V6 IP - fe80::4d0c:ab:5bee:6b69

    Client V4 IP - 192.168.1.100
    Client V6 IP - fe80::dc64:7e0b:b4fa:e667

    [2017-03-13 04:18:53,399] [18613 ] [AMQ 'WakeOnLanPlugin'] [INFO ] - WakeOnLanClient: Updating server hardware address for IP address 'fe80::4d0c:ab:5bee:6b69'
    [2017-03-13 04:18:53,458] [18672 ] [Thread33 ] [WARN ] - ThreadPool.ProcessQueue(): Exception during processing work ''
    System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
    at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
    at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
    --- End of inner exception stack trace ---
    at System.Net.ConnectStream.Read(Byte[] buffer, Int32 offset, Int32 size)
    at System.IO.Compression.DeflateStream.Read(Byte[] array, Int32 offset, Int32 count)
    at UPnP.Infrastructure.Utils.CompressionHelper.Decompress(IDeCompressor compressor, Stream inputStream)
    at UPnP.Infrastructure.Utils.CompressionHelper.Decompress(WebResponse response)
    at UPnP.Infrastructure.CP.DeviceConnection.OnCallResponseReceived(IAsyncResult ar)
    at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
    at System.Net.ContextAwareResult.CaptureOrComplete(ExecutionContext& cachedContext, Boolean returnContext)
    at System.Net.ContextAwareResult.FinishPostingAsyncOp()
    at System.Net.HttpWebRequest.BeginGetResponse(AsyncCallback callback, Object state)
    at UPnP.Infrastructure.CP.DeviceConnection.OnActionCalled(CpAction action, IList`1 inParams, Object clientState)
    at UPnP.Infrastructure.CP.DeviceTree.CpAction.BeginInvokeAction(IList`1 inParameters, AsyncCallback callback, Object state)
    at UPnP.Infrastructure.CP.DeviceTree.CpAction.InvokeAction(IList`1 inParameters)
    at MediaPortal.Plugins.ServerStateService.Client.UPnP.ServerStateProxy.GetStates()
    at MediaPortal.Common.Threading.Work.Process()
    at MediaPortal.Common.Services.Threading.ThreadPool.ProcessQueue()
     

    Brownard

    Development Group
  • Team MediaPortal
  • March 21, 2007
    2,306
    1,884
    Home Country
    United Kingdom United Kingdom
    • Thread starter
    • Moderator
    • #39
    it seems broken, no ?
    Possibly, can you post a debug log, might be some conflict with your virtual cards.
    Server V4 IP - 192.168.1.250
    Server V6 IP - fe80::4d0c:ab:5bee:6b69

    Client V4 IP - 192.168.1.100
    Client V6 IP - fe80::dc64:7e0b:b4fa:e667
    Thanks @breese, your exception is not caused by this plugin, its the server state service, they are both responding to the same server connected event which is why it appears straight afterwards. It is another issue that we need to try and get to the bottom of though...
     

    Users who are viewing this thread

    Top Bottom