[Approved] Powerscheduler network monitoring (share + traffic) (1 Viewer)

arion_p

Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    Yes, it would be better if we have both in use. If MAC address is configured as 00:00:00:00:00:00 then we should use the automatic MAC address fetching and if it is configured to something else then use that instead. Or we could have a setting to enabled / disable the automatic MAC address lookup. Which ever is easier from the user point of view.

    I agree on that, but the automatic option should be the default. The novice or casual user will probably never change his server's network card and most users don't really know what a MAC address is (believe me, I've seen network operators fill in an IP address when asked for a MAC address!). I also suggest we make it an enable / disable setting so it is independent of the address setting itself. That way if automatic fetching is enabled, the retrieved address can be stored in the address setting in config, and WOL function does not need to care if auto fetching is on or off. If there is an address then a WOL packet is sent, if not then it does nothing (effectively giving the user the option to disable WOL altogether).
     

    JBravo

    MP Donator
  • Premium Supporter
  • November 11, 2007
    269
    27
    Home Country
    Sweden Sweden
    I found where the loading process stalled, it was in the TV client plugin. The loading process stalls when trying to access the server.

    So here's the proposal;
    - move WakeOnLanManager.cs to \TvEngine3\TVLibrary\TvPlugin\TvPlugin
    - Update ChannelNavigator(); in \TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs to call WakeupSystem(..);

    The TVplugin will be responsible for WOL'n the server.
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    I found where the loading process stalled, it was in the TV client plugin. The loading process stalls when trying to access the server.

    So here's the proposal;
    - move WakeOnLanManager.cs to \TvEngine3\TVLibrary\TvPlugin\TvPlugin
    - Update ChannelNavigator(); in \TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs to call WakeupSystem(..);

    The TVplugin will be responsible for WOL'n the server.

    ChannelNavigator sounds a little bit wrong place for responsible to handle the WOL (nothing channel related there :)). Maybe TvHome constructor / initialization would be better place (from a design point of view).
     

    infinite.loop

    Retired Team Member
  • Premium Supporter
  • December 26, 2004
    16,163
    4,133
    127.0.0.1
    Home Country
    Austria Austria
    How do you plan to wake it up? (user perspective)

    Enter MyTV -> DialogWindow: "Your TV-Server is currently not online, do you want to try to wake it up from stanby? Yes/No"

    I think that users which store all their media on the server would even need a "wake up" option when you start up the HTPC.
    i.e. Config option "wake up server when MediaPortal starts" and/or button inside the homemenu. :)
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    How do you plan to wake it up? (user perspective)

    Enter MyTV -> DialogWindow: "Your TV-Server is currently not online, do you want to try to wake it up from stanby? Yes/No"

    I think that users which store all their media on the server would even need a "wake up" option when you start up the HTPC.
    i.e. Config option "wake up server when MediaPortal starts" and/or button inside the homemenu. :)

    Actually I think the wakeup event should be sent as soon as the tv plugin is loaded (during MP boot process). As user will most likely need the access to the server in any case (remember that MP will stall periodically if tv server is not running, we have lot of user reports on this).
     

    arion_p

    Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    In fact TVServer has to be woken up when MP starts up / resumes from standby because TVPlugin tries to access the server even before going to My TV. This is the reason that the UI will periodically pause (every 5 seconds) if TVServer is off.
    [Edit]Just saw, tourettes already pointed that out[/Edit]

    I believe the code should be placed in TvHome initialization (which is called at startup), in OnResume() and/or perhaps HandleTvServerNotConnected()
     

    JBravo

    MP Donator
  • Premium Supporter
  • November 11, 2007
    269
    27
    Home Country
    Sweden Sweden
    I believe the code should be placed in TvHome initialization (which is called at startup), in OnResume() and/or perhaps HandleTvServerNotConnected()

    Sounds better than the ChannelNavigator ;)
     

    JBravo

    MP Donator
  • Premium Supporter
  • November 11, 2007
    269
    27
    Home Country
    Sweden Sweden
    Here comes a first version of the WOL patch (based on MP1.0, sorry).

    Some more testing is required.

    To test, add the following entries to MediaPortal.xml
    <section name="tvservice">
    <entry name="isWakeOnLanEnabled">yes</entry>
    <entry name="isAutoMacAddressEnabled">yes</entry>
    <entry name="macAddress">00:22:15:05:4E:5B</entry> <--- Change this one to your own MAC

    If 'isAutoMacAddressEnabled' is enabled the server must be up and running when starting the MP client. This to get the MAC address to use later on.

    MediaPortal Configuration needs to be updated with the new settings as well.
     

    Attachments

    • WakeOnLan_rev1.patch
      30.6 KB

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Here comes a first version of the WOL patch (based on MP1.0, sorry).

    Didn't have yet time to read the whole patch (only a quick look as it contains lot of code).

    1) minor - even single line FOR/IF etc. statements should have {} (as stated in MP coding conventions)
    2) minor - Copyright should have 2009 not 2008 :)

    Hopefully MisterD can give a look as well on the patch...
     

    Users who are viewing this thread

    Top Bottom