PowerScheduler plugin 0.1 (wakeup/hibernate) (1 Viewer)

A

Anonymous

Guest
The first beta of this new plugin is now avaliable on SourceForge.

It's a plugin which enables MP to wake up from stand by or hibernate when it's time to do a scheduled TVrecording.
It also features a back to sleep feature when the recording is done.

This plugin must not be installed in a MP which has been patched with "the wake up from hibernate patch" (which is now obsolete)
-Can anyone with admin rights on SorceForge please remove the old patch? It's a nobody since I was not logged on when I uploaded it so I can't remove it. :(

http://sourceforge.net/tracker/index.php?func=detail&aid=1052566&group_id=107397&atid=647927

To install, just download the zip and copy the dll to ...\MediaPortal\plugins\windows and take a look at the readme file for details.
I've been testing it with CVS build 03-10-2004 but it should run with any late version of MP.

/Fred
 

tomtom21000

Retired Team Member
  • Premium Supporter
  • April 22, 2004
    1,226
    120
    Germany
    fred: this is great news.

    can you post something on the features you implemented? (or copy this part from your read me)

    can you have wake up / hibernate now multiple times?
    how is hibernate triggered ?

    But I am going to try it anyway ;)

    tomtom21000
     

    Frodo

    Retired Team Member
  • Premium Supporter
  • April 22, 2004
    1,518
    121
    52
    The Netherlands
    Home Country
    Netherlands Netherlands
    sounds good,
    i'll look @ it after my vacation
    when its working correcly then, i'll put it in cvs
    (i'm away from 23 oct-8 nov)


    p.s. where are the sources??? your patch only contains a DLL

    Frodo
     

    Frodo

    Retired Team Member
  • Premium Supporter
  • April 22, 2004
    1,518
    121
    52
    The Netherlands
    Home Country
    Netherlands Netherlands
    Questions...:

    1. Does it work with the following recording types:
    - daily
    -weekly
    -mon-fri
    - everytime on this channel
    - everytime on any channel
    or only with the manual & once recordings???

    2. What if the tvguide ends? do you do a wakeup then?
    Suppose my tvguide has program information for 1 oct-10 oct
    Then i hope your patch will wake up MP on 10 oct
    This way the tvguide scheduler can get the
    new tvguide for 10-20 october

    3. do you re-evaluate all tasks when a new tvguide is loaded?
    Suppose i have a weekly recording
    Every friday i wanna record ' Friends at 20.30 on RTL 4'
    now my current tvguide is from
    1-10 oct. This contain 2 fridays so
    this recording will record 'Friends' at fri-1 oct and at fri-8 oct
    Now on 10 oct I download a new tvguide which holds all programs from
    10-20 oct.
    This means that a new wakeup call must be made for
    for fri 15 october to record 'friends' again
    Does you patch do this?


    frodo
     

    samuel337

    Portal Pro
    August 25, 2004
    772
    0
    Melbourne, Australia
    Hi Fred

    Great work on getting the plugin out.

    I'm experiencing some problems with the time-out standby/hibernate feature though. I'm using version 0.0.0.11 and with the time-out feature, it hibernates regardless of whether I am on the home screen or not. I have set it to 30 minutes, and it has just hibernated while playing music on the music screen.

    Sam
     

    waeberd

    Portal Pro
    August 16, 2004
    314
    1
    Fribourg (CH)
    hey fred,

    nice work! Installed it and made some quick tests... => runs cool and will not be deactivated! :)

    Will continue testing (but will be away next week)... so keep hackin' & stay tuned!

    Daniel
     

    johnbobjamesson

    Portal Pro
    June 17, 2004
    91
    0
    Crailsheim
    Hm, doesn't work for me. At least not if I suspend the system myself. I'll try now if it goes into standby with your plugin and maybe then wakes up, but I doubt this makes a difference.

    I'm using MP .11, I uninstalled and reinstalled it with your plugin, setup of the plugin is possible and ok, but my system won't wake up from s3. It works fine with other progs, though, so there is no fault on my systems side....

    J.
     

    johnbobjamesson

    Portal Pro
    June 17, 2004
    91
    0
    Crailsheim
    Okay, tried it again (and again). The system is put to standby mode flawlessly, but it won't wake it up for a scheduled recording. I only had one recording scheduled, so there shouldn't be any conflicts, either. When I wake the system up manually, it works fine, so the system doesn't lock up while in standby. It then starts recording, of course. Anything else I didn't realize? I set the wakeup time to 1 minute before recording, the system wakes up within 3 seconds, so that shouldn't be a problem, either, should it?

    J.
     
    A

    Anonymous

    Guest
    Hi,
    Thank you all for the support.

    tomtom, the read me.
    **********************************************

    PowerScheduler, 0.1 beta

    2004-10-23 Fred
    **********************************************

    Short description of the PowerScheduler plugin:

    This plugin enables MediaPortal to wakeup from standby or hibernate when it's time to perform a TVRecording.
    There is also an inaktivity timer that can put system back to sleep when the recording is done.

    Installation is very simple. Copy the NVPPowerScheduler.dll into the ..\MediaPortal\plugins\Windows folder.

    Configuration is also an easy task. Find "PowerScheduler" in the plugin section of MP configuration.
    Choose the "PowerScheduler" and enter setup.

    There are three parameters that can be to set:
    - Time in minutes to wakeup system before the TVRecording will start.
    Zero (0) minues disable the wakeup functionality.
    1 minute should be enough.

    - Time in minutes on idle before system shuts down.
    Zero (0) minutes disables the automatic shutdown functionality.
    At least 3 min is recommended.

    - Shutdown mode, can be Suspend, Hibernate, Shutdown and None.
    If "Shutdown" is selected the system won't be able to wakeup by itself after shutdown.
    If "None" is selected the system won't shutdown, but disables any TVcard which may allow the Windows inbuilt power management to work (experimental feature).



    **********************************************
    Known issues and documented behaviour:

    The shutdown feature is enabled only when MediaPortal is left running the HOME window and is temporarily disabled
    when other MP-windows is showing or there are recordings in progress.
    If MP is not the active program but left on HOME it will still perform a shutdown, standby or hibernate
    when the inactivity timer expires.

    The inactivity timer won't be reset by mouse moves or scrolling the menu. Timer runs whenever HOME is active.


    The wakeup works only as long as there are pending recordings.
    If TV-guide expires MP won't be able to automaticly schedule new recordings.


    **********************************************


    Since this is a beta version there are most likely bugs which I would like some help to find.
    Improvement tips and new features requests are also welcome.


    Enjoy the plugin, and I hope you like it.

    /Fred

    And yes, multiple startups/hibernations should work.

    frodo
    Good to hear from you, hope you're having a nice vacation.
    Sources will be public available in a week or so when it's been tested for some time and any severe bugs has been corrected.
    Answers:
    1: Not tested but it should work since it uses the "TVDatabase.GetRecordings(ref recordings)" to find out which is the next recording.

    2: Not implemented yet, but under concideration.

    3: The plugin uses this code to stay updated
    // listen to OnRecordingChanged and trigger the timer settings
    TVDatabase.OnRecordingsChanged += new MediaPortal.TV.Database.TVDatabase.OnChangedHandler(OnChangeRescan);
    Not fully tested but if MP is written the right way is should work. :wink:

    johnbobjamesson
    Me neither can get MP to work properly with the Windows inbuilt shutdown timer. That's why the timer is implemented in the pluging in the first place. If you still want to use windows shutdown try setting the plugin shutdown timer to 1 minute and shutdown mode to "None" and windows inactivity timer to more than 1 minute.

    Problems with wake up:
    The wake-up timer will only be set when the time before the recording starttime is considered enough for the system to hibernate and startup again. If you set a recording time that is say 1 minute into the future and then manually put your system to sleep the wake up timer is set to the second next recodring because the first is too near in time (if using hibernation). OK, it's not foolproof but it prevents the wake up timer from being set to a time in the past. And in reality, why hibernate the system 1 minute before the recording is to start? I'm not sure if your problems with wake up comes from this but it might.
    I good place to start looking for clues is in the MediaPortal log.
    Look for PowerScheduler loggings.

    samuel
    I've not tried it with build .11 yet but I think it should work.
    You aren't using both the shutdown feature of then plugin and the Windows inbuilt are you?
    Check the MediaPortal.log to see if the shutdown feature is activated or not at the time your system shuts down.
    2004-10-18 01:48:59 PowerScheduler: Shutdown timer deactivated by MediaPortal.GUI.TV.GUITVHome
    2004-10-18 01:48:59 Recorder.StartViewing:0 channel:confused:VHS tvon:False timeshift:False
    2004-10-18 01:49:01 window:MediaPortal.GUI.TV.GUITVHome deinit
    2004-10-18 01:49:01 PowerScheduler: Shutdown timer activated, automatic shutdown in 3 minutes.

    Well, thats about it for now...

    / Fred
     

    Users who are viewing this thread

    Top Bottom