SleepControl plugin v1.10.0 for MediaPortal 1.3.0 and higher (2 Viewers)

usualsuspect

Portal Pro
May 12, 2009
631
98
Home Country
Germany Germany
AW: SleepControl plugin for MediaPortal v0.7.0

Hi and thanks for your nice plugin.
I have two little improvement suggestions:

1) enable autostart of timer after suspend.
atm (at least on my machine) the idletimer is only autostarted after a clean boot, but not after resume from s3 or s4. is this expected behaviour, or am I doing anything wrong? if not, would it be possible to implement?

2) shutdown mode = homescreen
would it be possible to implement a shutdown mode "homescreen" so that sleepcontrol will not turn off the pc when the idle timer is finished, but only set mp into home?
this would make it possible to combine sleepcontrol's sophisticated idle-detection with e.g. gmps (which also could wake up the machine at planned times) or powerschedulers idle timer.
 

Micropolis

Portal Pro
July 22, 2009
1,588
1,796
Bavaria
Home Country
Germany Germany
Re: SleepControl plugin for MediaPortal v0.7.0

Hi azzuro,
please copy the required TVServer libraries manually into your MediaPortal main directory. Downloadable versions you can find in the first post of HTPCInfo thread.

Cheers, Micropolis ;-)

Hi usualsuspect,
short answers:
  • Suspend: Currently I'm not able to detect, if a HTPC was booting, restarting or comes from the suspend state. Also I don't know, if any appropriate Windows API routines exists, sorry.
  • Homescreen Mode: I think, that's not the idea behind this plugin. Why don't you use (or combine it with) ScreenControl? This plugin offers you this functionality in a customizable way.

Cheers, Micropolis ;-)
 

usualsuspect

Portal Pro
May 12, 2009
631
98
Home Country
Germany Germany
AW: SleepControl plugin for MediaPortal v0.7.0

Thanks for your answer.
-the detecdtion should be possible. I will try to find some infos and forward them to you.
-I didn't try screencontrol till now. from the screenshots I got the impression that it did not offer the functionality. but I believe you :) and will give it a try.

thank you!

maybe this helps:
PBT_APMRESUMESUSPEND Event (Windows)

otherwise perhaps goersch (developer of gmps) might help...

one more thing, I still do not believe that screencontrol is able to do what I want.
example: watch tv and sleep after 60 minutes.

sleepcontrol will do this, but screencontrol won't because fullscreen is active and will stay active. so, at least for me, the suspend mode = home in sleep control would be a real improvement because ist would allow the combination with gmps.

edit: of course screencontrol will do it, if you disable the fullscreen detection.
but for a userfriendly idle-timer functionality still the activation/variation via user input is missing.
 

SilentException

Retired Team Member
  • Premium Supporter
  • October 27, 2008
    2,617
    1,130
    Rijeka, Croatia
    Home Country
    Croatia Croatia
    Re: ScreenControl plugin for MediaPortal v0.6.0

    Hey Micropolis,

    this is what i have found out using new version.. These are my settings:

    Code:
      <section name="Sleep Control">
        <entry name="TimerValue0">3</entry>
        <entry name="TimerValue1">10</entry>
        <entry name="TimerValue2">30</entry>
        <entry name="TimerValue3">45</entry>
        <entry name="TimerValue4">60</entry>
        <entry name="TimerValue5">120</entry>
        <entry name="TimerValue6">180</entry>
        <entry name="TimerValue7">240</entry>
        <entry name="TimerValue8">480</entry>
        <entry name="TimerValue9">720</entry>
        <entry name="TimerIncrementValue">5</entry>
        <entry name="TimerDefaultMethod">2</entry>
        <entry name="TimerAutoStart">no</entry>
        <entry name="TimerAutoStartValue">0</entry>
        <entry name="TimerAutoStartMethod">0</entry>
        <entry name="Title">Sleep Control</entry>
        <entry name="DisplayConfirmationDialog">no</entry>
        <entry name="DisplayExtendedMethodActions">yes</entry>
        <entry name="ForceMethodAction">no</entry>
        <entry name="TaskControl">yes</entry>
        <entry name="TaskControlRecording">yes</entry>
        <entry name="TaskControlMedia">yes</entry>
        <entry name="QuickActivation">yes</entry>
        <entry name="TimerActivationKey">5</entry>
        <entry name="TimerAlphanumericActivationKey">ž</entry>
        <entry name="TimerIncrementActivationKey">5</entry>
        <entry name="TimerIncrementAlphanumericActivationKey">đ</entry>
        <entry name="HibernateActivationKey">0</entry>
        <entry name="HibernateAlphanumericActivationKey">
        </entry>
        <entry name="StandbyActivationKey">0</entry>
        <entry name="StandbyAlphanumericActivationKey">
        </entry>
        <entry name="ShutdownActivationKey">0</entry>
        <entry name="ShutdownAlphanumericActivationKey">
        </entry>
        <entry name="TaskControlMode">1</entry>
        <entry name="HideTimerDialog">yes</entry>
      </section>

    * Go in Sleep Control GUI window.. Start the timer.. Stop the timer.. #SleepControl.Counter isn't reset to 0:00.. When timer is stopped this should be reset..if I didnt set it manually..

    * Is it possible when you open Sleep Method context menu to focus current method in the list.. Also, if you escape from that menu, Shutdown mode is set.. It shouldn't..

    * Start the timer with auto start key.. 3 minutes starts counting down.. Wait until 2:50, now press auto start key again to go to the next timer (10 min).. Timer counter starts counting down from 10:00 and yet it should be counting down from 9:50.. The auto start key should work similar to increment timer, not restarting it every time..

    * Start the timer with auto start key.. 3 minutes starts counting down.. Timer start is at 18:24, Timer end is at 18:27.. Increment the timer with increment key.. Timer end is now 5 minutes later, at 18:32.. Increment it again and timer end is at 18:37.. Now use auto start key to go to next timer.. Timer end is now at 18:34 (10 min timer) and I expected it to be at 18:54 (next timer - 30 min) because I already passed 10 min timer with manual increment.. If there is no new timer countdown should be stopped..

    Thanks! :)
     

    Micropolis

    Portal Pro
    July 22, 2009
    1,588
    1,796
    Bavaria
    Home Country
    Germany Germany
    Re: ScreenControl plugin for MediaPortal v0.6.0

    Hi SilentExcept,
    thx for testing the latest version.

    * Go in Sleep Control GUI window.. Start the timer.. Stop the timer.. #SleepControl.Counter isn't reset to 0:00.. When timer is stopped this should be reset..if I didnt set it manually..
    * Also, if you escape from that menu, Shutdown mode is set.. It shouldn't..

    Fixed.

    * Is it possible when you open Sleep Method context menu to focus current method in the list..

    I had implement another solution, that means you see a marker for the current selection. Using this I can ensure that all my plugins works in the same way.

    * Start the timer with auto start key.. 3 minutes starts counting down.. Wait until 2:50, now press auto start key again to go to the next timer (10 min).. Timer counter starts counting down from 10:00 and yet it should be counting down from 9:50.. The auto start key should work similar to increment timer, not restarting it every time..
    * Start the timer with auto start key.. 3 minutes starts counting down.. Timer start is at 18:24, Timer end is at 18:27.. Increment the timer with increment key.. Timer end is now 5 minutes later, at 18:32.. Increment it again and timer end is at 18:37.. Now use auto start key to go to next timer.. Timer end is now at 18:34 (10 min timer) and I expected it to be at 18:54 (next timer - 30 min) because I already passed 10 min timer with manual increment.. If there is no new timer countdown should be stopped..

    If I read this correct, you expect a new counter mode. Because of the complexity of your suggestion I do not realize this in the next version. Maybe in a future release it is possible to implement this, but for this some code and logic changes are required. And this need time... Sorry.

    Cheers, Micropolis ;-)
     

    SilentException

    Retired Team Member
  • Premium Supporter
  • October 27, 2008
    2,617
    1,130
    Rijeka, Croatia
    Home Country
    Croatia Croatia
    Re: ScreenControl plugin for MediaPortal v0.6.0

    * Start the timer with auto start key.. 3 minutes starts counting down.. Wait until 2:50, now press auto start key again to go to the next timer (10 min).. Timer counter starts counting down from 10:00 and yet it should be counting down from 9:50.. The auto start key should work similar to increment timer, not restarting it every time..

    * Start the timer with auto start key.. 3 minutes starts counting down.. Timer start is at 18:24, Timer end is at 18:27.. Increment the timer with increment key.. Timer end is now 5 minutes later, at 18:32.. Increment it again and timer end is at 18:37.. Now use auto start key to go to next timer.. Timer end is now at 18:34 (10 min timer) and I expected it to be at 18:54 (next timer - 30 min) because I already passed 10 min timer with manual increment.. If there is no new timer countdown should be stopped..

    If I read this correct, you expect a new counter mode. Because of the complexity of your suggestion I do not realize this in the next version. Maybe in a future release it is possible to implement this, but for this some code and logic changes are required. And this need time... Sorry.


    Consider the following simplified time line marking the timers set in settings:

    0----------10----------20----------30----------40----------50----------60

    10, 20, 30, 40, 50, 60 are the ONLY points where start timer key should position sleep timer exclusively. I'll call them MAIN TIMER POINTS.
    After you activate the timer at time 0, that time should be starting point for all the other timers too (until timer is stopped).

    Example:
    Activate first timer (10 minutes) by auto start key at 12:00 (time 0), ending time is 12:10..
    Press the same key at 12:07 (to go to next timer - 20 minutes), the end time should be 12:20..
    (As of now, it works so that time 0 is reset every time you go to next timer, so in the same scenario, ending time will be at 12:27).
    As you can see, all the timers are relative to time 0 once the timer was started.. So the ending times in the scenario above are exclusively 12:10, 12:20, 12:30, 12:40, 12:50, 13:00, STOPTIMER.

    Now for this, same as above applies. Only thing is the increment timer key is used in between. I have two scenarios (three actually), one that doesn't skip any main timer points, and one that does skip some..
    (1)
    Activate first timer (10 minutes) by auto start key at 12:00 (time 0), ending time is 12:10..
    At 12:07, increment timer (by 5 minutes, as configured in the settings), ending time is now 12:15..
    Press the auto start key at 12:14 (to go to next timer - 20 minutes), the end time should be 12:20 (in the current version, ending time will be 12:34).

    (2)
    Activate first timer (10 minutes) by auto start key at 12:00 (time 0), ending time is 12:10..
    At 12:07, increment timer (by 5 minutes, as configured in the settings), ending time is now 12:15..
    Increment the timer again (by 5 minutes, as configured in the settings), ending time is now 12:20..
    Press the auto start key at 12:14 (to go to next timer), next timer in this case is no longer 20 minute one (since we are already past that main timer point, next timer is 30 minutes, so the ending time should be 12:30..

    (3)
    Activate first timer (10 minutes) by auto start key at 12:00 (time 0), ending time is 12:10..
    At 12:07, increment timer (by 5 minutes, as configured in the settings), increment it that many times so that ending time is after 13:00..
    Press the auto start key at xx - doesn't matter when - (to go to next timer), there are no more main timer points after 60 minutes so the timer should just stop.

    Hope i made things more clear now, let me know what you think and if i need to clarify something :)


    * Is it possible when you open Sleep Method context menu to focus current method in the list..

    I had implement another solution, that means you see a marker for the current selection. Using this I can ensure that all my plugins works in the same way.

    About this, judging from my experience and from testing other plugins, selecting current item is very commonly used in menu dialogs instead of marking the selection. But it's your choice :) Do you use IsPlayed or IsRemote?
     

    Micropolis

    Portal Pro
    July 22, 2009
    1,588
    1,796
    Bavaria
    Home Country
    Germany Germany
    SleepControl plugin for MediaPortal v0.7.5

    Dear community,
    the updated version v0.7.5 of this plugin is ready for downloading.

    Informations for users:
    • Functionality to restart Autostart timer after standby/hibernate mode added.
    • Requested trigger functionality added (Added to ensure compatibility with some other plugins e.g. GMPS and PowerScheduler. Maybe later an appropriate interface to these plugins replaces this.).
    • Notification dialogs added.
    • Bugfixing for sleep mode configuration dialog, counter values and task control detection routines.

    Informations for skinners:
    • Image “sleepcontrol_trigger.png” added.

    Thx to usualsuspect and SilentExcept for this improvement ideas.

    usualsuspect: Please post a description here about the technical configuration for Trigger Mode and GMPS.


    Cheers, Micropolis ;-)
     

    usualsuspect

    Portal Pro
    May 12, 2009
    631
    98
    Home Country
    Germany Germany
    AW: SleepControl plugin for MediaPortal v0.7.5

    Thanks for the new version...
    @usualsuspect: Please post a description here about the technical configuration for Trigger Mode and GMPS.
    I did not try the new version yet, but here's the short idea how to use the trigger mode.

    gmps
    or mp's powerscheduler have built-in _idle_ timers which can be configured to run only when mp is in home window. this is working fine but the timers are fixed and there is no way to configure them from the mp-gui as sleep timers. with sleepcontrol you can now configure the sleeptimer to fall back into the home screen (but let the system awake). so, gmps/powerscheduler will be triggered to start their idle timers (e.g. 5 min) and afterwards send the system to sleep. advantage: _only_ gmps/powerscheduler will send the system to a suspend state and so you can be sure that before the next wakeup-time will be set correctly.
    that's all...
     

    sail323

    Portal Member
    December 28, 2009
    29
    2
    Home Country
    United States of America United States of America
    SleepControl Error

    When starting SleepControl in 1.1.00 RC3, I get the error message;
    Missing or Invalid File: c:\...... Sleepcontrol.xml
     

    Users who are viewing this thread

    Top Bottom