Wake On Lan support for MP2 (2 Viewers)

HTPCSourcer

Retired Team Member
  • Premium Supporter
  • May 16, 2008
    11,418
    2,336
    Home Country
    Germany Germany
    Good to hear that it is working now.

    Some of the MP2 clients here will be used only occasionally for consuming media, they are no dedicated HTPC. So the server does not need to wake up every time such a client PC is started. Only when MP2 client software itself is started.
    In other words, the WOL feature needs to be configurable on each client. I guess that @Brownard had planned it that way. Just not implemented yet.
     

    azzuro

    Test Group
  • Team MediaPortal
  • May 10, 2007
    9,984
    5,663
    France - IDF
    Home Country
    France France
    @Brownard :
    i think have discovered few stuff related to my config :
    for information on my system " Client" i have many interface network :
    1 hardware
    3 virtuals ( VMware / ...)

    Set MP2 to use IPv6, don't seems to found the "hardware adress" every time.

    first on my log i have :
    start MP Client but no server :
    Code:
    [2017-02-13 09:54:05,599] [3452   ] [14       ] [DEBUG] - WakeOnLanClient: No address stored for the server yet
    after start server :
    Code:
    [2017-02-13 09:56:10,715] [128569 ] [123      ] [INFO ] - ServerConnectionManager: Connected to home server '87cd5afd-ee62-4ee8-9112-6029074996b3' at host '' (IP address: 'fe80::983c:afa7:a34c:c3e4')
    [2017-02-13 09:56:10,740] [128594 ] [AMQ 'WakeOnLanPlugin'] [DEBUG] - WakeOnLanClient: Got server IP address 'fe80::983c:afa7:a34c:c3e4' for ''
    .....
    [2017-02-13 09:56:10,926] [128780 ] [AMQ 'WakeOnLanPlugin'] [WARN ] - WakeOnLanClient: Unable to determine hardware address for IP address 'fe80::983c:afa7:a34c:c3e4'
    after an restart of MP2 Client ( server always ON) i can see :
    Code:
    [2017-02-13 10:03:41,351] [2659   ] [14       ] [DEBUG] - WakeOnLanClient: No address stored for the server yet
    ..
    [2017-02-13 10:03:49,801] [11108  ] [AMQ 'WakeOnLanPlugin'] [DEBUG] - WakeOnLanClient: Got server IP address 'fe80::983c:afa7:a34c:c3e4' for 'TVE-SRV.home'
    ..
    [2017-02-13 10:03:49,930] [11237  ] [AMQ 'WakeOnLanPlugin'] [WARN ] - WakeOnLanClient: Unable to determine hardware address for IP address 'fe80::983c:afa7:a34c:c3e4'

    about the dns, i have an error on my server, where i can't register his adress on dns, maybe an issue of my router.

    an restart of Client and now the server sleep :
    Code:
    [2017-02-13 10:10:16,146] [2574   ] [15       ] [DEBUG] - WakeOnLanClient: No address stored for the server yet
    and nothing else,
    using wireshark, none WOL packet is send or acces to server IP is detected.

    same issue if enable IPv6 only in MP client

    Using IPV4 only
    start client only
    Code:
    [2017-02-13 10:26:26,366] [3036   ] [15       ] [DEBUG] - WakeOnLanClient: No address stored for the server yet

    starting server :
    Code:
    [2017-02-13 10:27:13,655] [50326  ] [32       ] [INFO ] - ServerConnectionManager: Connected to home server '87cd5afd-ee62-4ee8-9112-6029074996b3' at host 'tve-srv.home' (IP address: '192.168.1.9')
    [2017-02-13 10:27:13,707] [50378  ] [AMQ 'WakeOnLanPlugin'] [DEBUG] - WakeOnLanClient: Got server IP address '192.168.1.9' for 'tve-srv.home'
    [2017-02-13 10:27:13,739] [50410  ] [AMQ 'ConnectionMonitor'] [DEBUG] - ConnectionMonitor: Server connected, NetworkNeighborhoodResourceProviderSettings refreshed.
    [2017-02-13 10:27:13,755] [50426  ] [AMQ 'SettingsChangeWatcher`1'] [INFO ] - NetworkNeighborhoodResourceProvider: No credential registered for the root path; using Network Service account as fallback
    ..
    [2017-02-13 10:27:13,868] [50539  ] [AMQ 'WakeOnLanPlugin'] [INFO ] - WakeOnLanClient: Updating server hardware address for IP address '192.168.1.9'
    now the config file on client is registered :
    IP adress + hardware (base64)

    restart Client with Server in sleep mode ( the WOL work ) :
    i can see the magic packet on wireshark.
    Code:
    [2017-02-13 10:36:09,914] [2502   ] [14       ] [INFO ] - WakeOnLanHelper: Waking server at 192.168.1.9 using port 1234
    ..
    [2017-02-13 10:36:18,984] [11571  ] [30       ] [DEBUG] - WakeOnLanHelper: Successfully woke server
    ..
    [2017-02-13 10:36:20,672] [13260  ] [AMQ 'WakeOnLanPlugin'] [DEBUG] - WakeOnLanClient: Got server IP address '192.168.1.9' for 'tve-srv.home'
    [2017-02-13 10:36:20,821] [13409  ] [Thread105] [INFO ] - ServerConnectionManager: Synchronizing shares with home server
    [2017-02-13 10:36:20,831] [13418  ] [AMQ 'WakeOnLanPlugin'] [INFO ] - WakeOnLanClient: Updating server hardware address for IP address '192.168.1.9'

    So, for me the IPv4 seems working great, but the Ipv6 doesn't, it's maybe my hardware who don't work great for IPv6.

    edit : for information all virtual network card was disabled
     
    Last edited:

    Brownard

    Development Group
  • Team MediaPortal
  • March 21, 2007
    2,306
    1,884
    Home Country
    United Kingdom United Kingdom
    • Thread starter
    • Moderator
    • #23
    Thanks, the ipv6 issue is, as you said, because of the extra network adapter index on the end of the server ipv6 address so the client doesn't think the addresses are equal. It's an easy fix, I just need to compare the address bytes instead...just haven't had time to make the change, I might get it done later today.
     

    azzuro

    Test Group
  • Team MediaPortal
  • May 10, 2007
    9,984
    5,663
    France - IDF
    Home Country
    France France
    Thanks, the ipv6 issue is, as you said, because of the extra network adapter index on the end of the server ipv6 address so the client doesn't think the addresses are equal. It's an easy fix, I just need to compare the address bytes instead...just haven't had time to make the change, I might get it done later today.
    don't worry, it's an issue i wanted to do as an "team tester" since long time, but this one take me lot of time on job, using vpn.
    what i need to test is; if i enable all my virtual card, the ipv4 work or not !
    i think yes, but not sure. :whistle:
     

    azzuro

    Test Group
  • Team MediaPortal
  • May 10, 2007
    9,984
    5,663
    France - IDF
    Home Country
    France France
    updating setting when both machine are ON.
    Code:
    [2017-02-13 14:22:01,527] [46623  ] [AMQ 'WakeOnLanPlugin'] [WARN ] - SystemName: Could not retrieve host alias/address list from DNS (hostName: fe80::983c:afa7:a34c:c3e4)
    [2017-02-13 14:22:01,529] [46625  ] [AMQ 'WakeOnLanPlugin'] [DEBUG] - WakeOnLanClient: Got server IP address 'fe80::983c:afa7:a34c:c3e4' for ''
    [2017-02-13 14:22:01,590] [46686  ] [AMQ 'WakeOnLanPlugin'] [INFO ] - WakeOnLanClient: Updating server hardware address for IP address 'fe80::983c:afa7:a34c:c3e4'

    on client start when server is off :
    Code:
    [2017-02-13 14:28:27,861] [2283   ] [14       ] [INFO ] - WakeOnLanHelper: Waking server at fe80::983c:afa7:a34c:c3e4%2 using port 1234
    ...
    [2017-02-13 14:28:27,893] [2315   ] [14       ] [ERROR] - WakeOnLanClient: Error waking server
    System.Net.NetworkInformation.PingException: Une exception s'est produite lors d'une demande PING. ---> System.ComponentModel.Win32Exception: L’emplacement réseau ne peut pas être atteint. Pour obtenir des informations concernant la résolution des problèmes du réseau, consultez l’aide de Windows
       à System.Net.NetworkInformation.Ping.InternalSend(IPAddress address, Byte[] buffer, Int32 timeout, PingOptions options, Boolean async)
       à System.Net.NetworkInformation.Ping.SendAsync(IPAddress address, Int32 timeout, Byte[] buffer, PingOptions options, Object userToken)
       --- Fin de la trace de la pile d'exception interne ---
       à System.Net.NetworkInformation.Ping.SendAsync(IPAddress address, Int32 timeout, Byte[] buffer, PingOptions options, Object userToken)
       à System.Net.NetworkInformation.Ping.SendAsync(String hostNameOrAddress, Int32 timeout, Byte[] buffer, PingOptions options, Object userToken)
       à System.Net.NetworkInformation.Ping.SendAsync(String hostNameOrAddress, Int32 timeout, Object userToken)
       à System.Net.NetworkInformation.Ping.<>c__DisplayClass58_0.<SendPingAsync>b__0(TaskCompletionSource`1 tcs)
       à System.Net.NetworkInformation.Ping.SendPingAsyncCore(Action`1 sendAsync)
       à System.Net.NetworkInformation.Ping.SendPingAsync(String hostNameOrAddress, Int32 timeout)
       à WakeOnLan.Client.Helpers.WakeOnLanHelper.<PingAsync>d__2.MoveNext()
    --- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée ---
       à System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       à WakeOnLan.Client.Helpers.WakeOnLanHelper.<WakeServer>d__1.MoveNext()
    --- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée ---
       à System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       à WakeOnLan.Client.WakeOnLanPlugin.<WakeServerAsync>d__11.MoveNext()
    the IP stored is fe80::983c:afa7:a34c:c3e4%2, i think the %2 must not be stored, because it's related to server hardware.

    i tryed to remove manually the %2 by editing the wakeonlan config line, and after this change the server wokeup fine !
     

    Brownard

    Development Group
  • Team MediaPortal
  • March 21, 2007
    2,306
    1,884
    Home Country
    United Kingdom United Kingdom
    • Thread starter
    • Moderator
    • #27
    Good spot, I forgot it would ping with the server address. New version in first post which should only store 'clean' IP addresses.
     

    DomCash

    Portal Member
    January 10, 2010
    8
    3
    Hey guys,

    installed v4 of the WoL Plugin on MePo 2.1 pre2 with Windows 10 server (server only installation) and two Windows 10 clients (client only installation).
    So far, working flawlessly as expected.

    This one fills a very important functionality gap. Thanks to the devs!

    Kind regards,
    DomCash
     

    sonnybonds

    Portal Pro
    December 3, 2008
    85
    8
    Home Country
    Germany Germany
    Does this Plugin wake other PCs than the MP2-Server? In my environment the PC with the movies is not the PC with the MP2-Server running because I have to install the server on my client with the SAT-Card. In MP1 every time I wanted to watch a movie, the PC with the movies woke up by WOL. Is this the case now with this plugin or can the plugin be extended to get this functionality e.g. a configuration that some external media sources are started only when need as describes before?

    Greetings

    Sonny
     

    Users who are viewing this thread

    Top Bottom