Powerscheduler problem (1 Viewer)

doskabouter

Development Group
  • Team MediaPortal
  • September 27, 2009
    4,860
    3,499
    Nuenen
    Home Country
    Netherlands Netherlands
    MediaPortal Version: 1.1.0.0
    MediaPortal Skin: Blue3wide
    Windows Version: Vista Ultimate 32bit SP2
    CPU Type: AMD Athlon Dual Core 4850e 2.5 GHz
    HDD: WD 1TB
    Memory: 2GB DIMM DDR2
    Motherboard: Gigabyte GA-MA78GM-S2H
    Video Card: ATI Radeon HD 3200 Onboard
    Video Card Driver: 8.632.0.0
    Sound Card: Onboard
    Sound Card AC3: no
    Sound Card Driver:
    1. TV Card: Askey Saber HB-220
    1. TV Card Type: dual hybrid
    1. TV Card Driver: 7.4.14.2
    2. TV Card:
    2. TV Card Type:
    2. TV Card Driver:
    3. TV Card:
    3. TV Card Type:
    3. TV Card Driver:
    4. TV Card:
    4. TV Card Type:
    4. TV Card Driver:
    MPEG2 Video Codec:
    MPEG2 Audio Codec:
    h.264 Video Codec:
    Satelite/CableTV Provider:
    HTPC Case: Silverstone LC-16
    Cooling:
    Power Supply:
    Remote: iMON
    TV: Philips 42PES00001
    TV - HTPC Connection: Hdmi

    Hi,

    In case I set the system in S3 (Sleep) with the power-button is the powerscheduler supposed to wake up the system for epg grabbing? Or is it only doing that if the shutdown/sleep of the system is initiated by the powerscheduler itself?

    It the second case is true, is it possible to run the webepg from the windows taskscheduler (I must say I had that running this way with mediaportal 1.0.2 and was quite happy with that)
     

    arion_p

    Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    If you have configured the power button in windows to put the system to sleep, PowerScheduler may not have enough time to schedule a wake up before the system goes to sleep. Furthermore, if you are using Win7/Vista, the system will go to sleep even if there are other activities that would normally prevent it from going to sleep (e.g. recording, EPG grabbing etc). To avoid this, disable the power button in windows power options and map it to the suspend action of MP. This way the power button will trigger power scheduler to put the system to sleep and will schedule any required wake up events. That all applies to the power button on the remote. The power button on the chassis is different and I do not know if you can map it in MP.

    WebEPG is no longer a standalone application. It is a TV Server plugin and as such can only run from within TV Server, not from Task Scheduler.
     

    doskabouter

    Development Group
  • Team MediaPortal
  • September 27, 2009
    4,860
    3,499
    Nuenen
    Home Country
    Netherlands Netherlands
    Thanks for the quick replay, but if I map the powerbutton to mediaportal's suspend, then will my htpc only suspend when mediaportal is running? Or is that keypress somehow passed to the powerscheduler plugin?
    If not, it might be an idea (don't know if it is at all possible) to add some hook to the powerscheduler which scans for some global shutdown keycombination.

    And that vista shuts down the pc in the middle of a webepg-download I noticed too, that was the only drawback of that configuration (although I never got any gaps in my epg).
     

    arion_p

    Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    Thanks for the quick replay, but if I map the powerbutton to mediaportal's suspend, then will my htpc only suspend when mediaportal is running?
    Yes MP needs to be running.

    If not, it might be an idea (don't know if it is at all possible) to add some hook to the powerscheduler which scans for some global shutdown keycombination.
    That could be possible. Perhaps a little util that would connect to TVServer, trigger the suspend then disconnect. It could be called from IRSS.

    And that vista shuts down the pc in the middle of a webepg-download I noticed too, that was the only drawback of that configuration (although I never got any gaps in my epg).
    That is unfortunately how Vista/Win7 was designed to work. Per MS documentation, when the user triggers a suspend no application should (be able to) stop it. In XP it was a recommendation, in Vista they enforced it.
     

    doskabouter

    Development Group
  • Team MediaPortal
  • September 27, 2009
    4,860
    3,499
    Nuenen
    Home Country
    Netherlands Netherlands
    Yes MP needs to be running.
    That's no option for me

    That could be possible. Perhaps a little util that would connect to TVServer, trigger the suspend then disconnect. It could be called from IRSS.
    But if I remap the powerbutton to some key, then I won't be able to turn on my htpc with that button

    That is unfortunately how Vista/Win7 was designed to work. Per MS documentation, when the user triggers a suspend no application should (be able to) stop it. In XP it was a recommendation, in Vista they enforced it.
    This happens even if the program is started due to to a sheduled task (which wakes up the pc). Then vista shuts down even if that program is still running.

    Isn't it possible to have the powerscheduler schedule a wake-up when the scheduler is started, or something changes (f.e. users selects show to record) instead of trying to do all this when it's shutdown?
     

    arion_p

    Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    Yes MP needs to be running.
    That's no option for me
    It can be minimized, it does not need to be fullscreen or even visible

    But if I remap the powerbutton to some key, then I won't be able to turn on my htpc with that button
    That is not true (at least for most remote controls that can wake the PC up from standby). I know for sure that it works for MCE and iMon remotes. In fact with iMon remotes you can power up the PC even after hard-off (i.e. completely unplugging an replugging the power cord). The power button on these remotes is special: the receiver monitors for the specific button and if detected send a wake up signal on the USB port. It has nothing to do with any configuration and will work even with no OS installed.

    That is unfortunately how Vista/Win7 was designed to work. Per MS documentation, when the user triggers a suspend no application should (be able to) stop it. In XP it was a recommendation, in Vista they enforced it.
    This happens even if the program is started due to to a sheduled task (which wakes up the pc). Then vista shuts down even if that program is still running.
    This is another issue with Vista/Win7. Regardless of any setting you have made in Power Options in control panel, if the system wakes up for a scheduled event and no "activity" is detected within 2 minutes, the system will go back to sleep without further notice. "Activity" is detected when an application specifically notifies the OS that it is busy and suspend is not allowed. Most normal applications don't do that. MP and TV Server do that when they have some specific scheduled task to perform (like a recording or EPG grabbing). But if you have configured PowerScheduler to wake up more than 2 minutes before the scheduled event, TV Server and MP will sit idle until the scheduled time arrives. This does not occur within 2 minutes from resume, and Windows puts the system back to sleep.

    Isn't it possible to have the powerscheduler schedule a wake-up when the scheduler is started, or something changes (f.e. users selects show to record) instead of trying to do all this when it's shutdown?
    Not with the current architecture. It would require an extensive rewrite, and I still not sure it would be even possible (or efficient)
     

    fabien44

    Portal Pro
    March 12, 2006
    414
    33
    Is there a way to grab EPG automatically when MP is running?
    I programm EPG everyday at 8.30pm in PowerScheduler because most often MP is running at this time but nothing is done!
     

    arion_p

    Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    If you mean WebEPG, if scheduled at a specific time and the system is not running at that time, it will start grabbing as soon as the system is up and running. However WebEPG will not grab twice in the same day.
     

    doskabouter

    Development Group
  • Team MediaPortal
  • September 27, 2009
    4,860
    3,499
    Nuenen
    Home Country
    Netherlands Netherlands
    That could be possible. Perhaps a little util that would connect to TVServer, trigger the suspend then disconnect. It could be called from IRSS.

    I'm using an iMON remote, no IRSS, I just have the buttons correctly mapped for mediaportal, and written a process-plugin which controls the display (and works with other software from me), so at that part I don't want to change things.
    The util to tell tvserver to shut down the system sounds good, I'm reasonably experienced in c#, so I want to give this a try.
    Do you have a line or 2 with the call I need to the tvservice?
     

    arion_p

    Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    Have a look at RemotePowerControl and IPowerController (in namespace TvEngine.PowerScheduler.Interfaces) in PowerScheduler.Interfaces.dll

    You can reference PowerScheduler.Interfaces.dll and use something like:

    Code:
    using MediaPortal.Util;
    using TvEngine.PowerScheduler.Interfaces;
    
    ...
    
    RemotePowerControl.Instance.SuspendSystem("My External Controller", RestartOptions.Suspend, false);
    Hope this helps. ;)
     

    Users who are viewing this thread


    Write your reply...
    Top Bottom