PowerScheduler in Singleseat + Multiseat setup (1 Viewer)

grubi

Portal Pro
June 16, 2007
1,216
80
127.0.0.1
Home Country
Germany Germany
First I have to say that I don't know if this is a supported setup. If not then please let me know.

- One machine with MP + TV-server installed (and both running)
- Second machine with MP + TV-plugin installed

On first machine both PowerSchedulers (PS client plugin + PS server plugin) are configured to go to hibernate after 10 minutes beeing idle. This works correct as a isolated singleseat setup.

If you connect to that machine from a second machine with tv client there is still no problem a long as TV is running. However as soon as you stop TV on that second machine and there was no interaction on the first machine for the specified 10 minutes the first machine (tv-server) goes to hibernate immediately which also leads to hang the tv client on the second machine.

IMHO it should work the way that TV server should go into hibernate 10 minutes after the client on the second machine has stopped TV.

grubi.
 

johnzered

Retired Team Member
  • Premium Supporter
  • April 20, 2008
    358
    80
    Home Country
    Finland Finland
    First I have to say that I don't know if this is a supported setup. If not then please let me know.

    - One machine with MP + TV-server installed (and both running)
    - Second machine with MP + TV-plugin installed

    On first machine both PowerSchedulers (PS client plugin + PS server plugin) are configured to go to hibernate after 10 minutes beeing idle. This works correct as a isolated singleseat setup.

    If you connect to that machine from a second machine with tv client there is still no problem a long as TV is running. However as soon as you stop TV on that second machine and there was no interaction on the first machine for the specified 10 minutes the first machine (tv-server) goes to hibernate immediately which also leads to hang the tv client on the second machine.

    IMHO it should work the way that TV server should go into hibernate 10 minutes after the client on the second machine has stopped TV.

    grubi.

    Hello!

    In TV-Server/Configuration/Plugins/PowerScheduler - MediaPortal Wiki Documentation it says: "Currently the only fully supported setup is a single seat setup"

    So it's probably not supported...

    //johnzered
     

    grubi

    Portal Pro
    June 16, 2007
    1,216
    80
    127.0.0.1
    Home Country
    Germany Germany
    If this is true then my post will most likely be an enhancement request ;)
    From what I can see so far theres is not much missing, because as long as you use the tv-client on the different pc and watching tv the server will not go into standby. It only has to wait the idle timeout after all streams have been stopped and not go into standby immediately after the remote client stopps tv.

    grubi.
     

    pnyberg

    Portal Pro
    August 21, 2006
    405
    36
    Stockholm
    Home Country
    Sweden Sweden
    I think you need to only use the "PS Server Plugin" setting on the server.

    This works for me anyway.

    As soon as you have the "PS Client Plugin" enabled on the TV server - I have experienced such behaviour as you described.
     

    grubi

    Portal Pro
    June 16, 2007
    1,216
    80
    127.0.0.1
    Home Country
    Germany Germany
    I think you need to only use the "PS Server Plugin" setting on the server.

    This works for me anyway.

    As soon as you have the "PS Client Plugin" enabled on the TV server - I have experienced such behaviour as you described.

    But when I only enable the TV-Server plugin on that machine the powerscheduler functionality is broken for this machine in singleseat mode. This will work only with a dedicated tv-server and not if your server is also a client.

    grubi.
     

    SciDoctor

    Retired Team Member
  • Premium Supporter
  • February 2, 2005
    1,465
    139
    England
    IMHO it should work the way that TV server should go into hibernate 10 minutes after the client on the second machine has stopped TV.

    grubi.

    I think this is the problem, it would seem the 'keep awake' signal from the network client (when not in home screens if set) isn't being recognised by the server in the same way (if at all) as from the local client.

    I also see this happening but rarely use server network client setup at the moment apart from some testing.

    I haven't done thorough testing to see if it is the activity of a local client that stops the network clients PS signals from getting through ie just test server/network client (my local client seems to be busy always recording something)

    I think the bug has been recognised and is in MANTIS, hopefully re-revisit the bug after RC2.
     

    pnyberg

    Portal Pro
    August 21, 2006
    405
    36
    Stockholm
    Home Country
    Sweden Sweden
    I think you need to only use the "PS Server Plugin" setting on the server.

    This works for me anyway.

    As soon as you have the "PS Client Plugin" enabled on the TV server - I have experienced such behaviour as you described.

    But when I only enable the TV-Server plugin on that machine the powerscheduler functionality is broken for this machine in singleseat mode. This will work only with a dedicated tv-server and not if your server is also a client.

    grubi.

    Well, I am using my server as single-seat everyday, and also using it as a server for my remote client. But I think I see your point now when I re-read your problem description... I have implemented a vb script on my server that checks if it has any sessions active on it - and then it would start a process that the "PS Server plugin" checks. If that process is present it won't go to standby.

    But I'm with you that this functionality should be built in...
     

    grubi

    Portal Pro
    June 16, 2007
    1,216
    80
    127.0.0.1
    Home Country
    Germany Germany
    Just took a look at the sources.
    Maybe one of the devs can explain me if my assumtions are correct?

    If a standby is possible on the TV-Server is controlled by handlers which are inherited from IStandbyHandler. The "DisAllowShutdown" property of all registered handlers is checked periodically (as configured in the settings) by the PowerScheduler plugin. What I see is that there are two handlers of interest regarding to this case which check for activity of the tv-server. These are "ActiveStreamsHandler" which checks for "_controller.ActiveStreams > 0" and "ControllerActiveHandler" which checks for "_controller.CanSuspend". What is suspect to me is that neither of those handlers took into account the latest status they detected in conjuction with the idle timeout from the settings. That would explain my observations. What I also do not understand: there is also a "GenericStandbyHandler" which is not active where own handlers could be interhited from. This handler implements exactly the handling for the check of the idle timeout agains the time of the last check which IMHO would be necessary. However the both handlers stated above are not inherited from "GenericStandbyHandler" but directly from "IStandbyHandler".

    It would be great if one of the devs could comment if I'm completely off or if what I have found makes any sense.

    Thanks a lot.

    grubi.

    Just an addition:

    IMHO the logic of the "DisAllowShutdown" of the "GenericStandbyHandler" is also broken. Just take a look

    --------------------------

    public bool DisAllowShutdown
    {
    get
    {
    // Check if last update + timeout was earlier than
    // the current time; if so, ignore this handler!
    if (_lastUpdate.AddMinutes(_timeout) < DateTime.Now)
    {
    return false;
    }
    else
    {
    return _disAllowShutdown;
    }
    }
    set
    {
    _lastUpdate = DateTime.Now;
    _disAllowShutdown = value;
    }
    }
    --------------------------
     

    Users who are viewing this thread

    Top Bottom