MySleepTimer (1 Viewer)

Anthrax

Portal Pro
February 15, 2007
157
48
pretty much in the center
Home Country
Germany Germany
Hi MediaPortal afficinados,

anybody around here using MediaPortal as his/her over-the-counter (but highly addictive) sleeping agent?

Well, I sure as heck do ;)

Ever since I started using MediaPortal some two years ago, I was missing the essential funtionality every cheap old TV has - a simple push-button sleep timer...
So spending one sleepless night I finally managed to program one myself.

So I'd like to share this with you guys.


MySleepTimer - MediaPortal Process Plugin
=========================================

- just install "MySleepTimer.mpi" (should appear in "MediaPortal Plugins-Skins Installer" some time soon as well)
- configure via MediaPortal configuration

- ActionType: Sets the desired MediaPortal Action/Event to trigger and set up the sleep timer inside MediaPortal
- when using the default "ACTION_REMOTE_YELLOW_BUTTON"
- make sure you have your Remote set up to perform this action when pressing this button (the attached config pic shows the DEFAULT configuration - make sure the Action "Remote Yellow Button" is set for ALL CONDITIONS that you need)
- ShutdownType: This is what should happen once the timer elapsed
(- force: this should be handled with care ;))
- maximum sleep time: Sets the maximum amount of minutes you want to set
- steps: everytime the selected 'action' is performed the sleep time is incremented by this many minutes
- notification interval: Sets the interval for the notification window to pop up telling you how much time is left​
- usage inside MediaPortal

- perform the selected 'action' to enable the timer (a little popup window is displayed)
- repeat this action to increase the sleep time
- once you go beyond the maximum sleep time the timer is stopped until you do 'action' once again
- when set a notification window will show you how much time is left

[Update thx to xmats: when there is any type of playback running, the first time you perform 'action' will set the timer to use the remaining playtime + 1 minute. Do 'action' and increase the timer value as usual]

regards,
Anthrax

PS: tell me want you think about it and please don't be shy :p

[IMGLINK]https://www.team-mediaportal.com/images/stories/homepageV3/MosTree/download4.png[/IMGLINK]

Changelog:
[COLLAPSE]
  • v1.0.4.3660
    • deployment via MediaPortal extension package
    • reworked configuration
    • multi language support
  • v1.0.3.0
    • Thx to Zdeny there have been some improvements in the timer setup logic inside MediaPortal
  • v1.0.2.0
    • Code redesign
    • delayed notification
    • button time out
    • sleep behavior
  • v1.0.1.1
    • Bugfix Release: fixed the doubled action bug (thx to Paranoid Delusion)
[/COLLAPSE]

Release archive:
SourceForge.net Repository - [mp-plugins] Index of /trunk/plugins/MySleepTimer/releases

Source code:
 

Attachments

  • MySleepTimer_01.png
    MySleepTimer_01.png
    510.8 KB
  • MySleepTimer_02.png
    MySleepTimer_02.png
    555.1 KB
  • MySleepTimer_03.png
    MySleepTimer_03.png
    546.8 KB
  • MySleepTimer_04.png
    MySleepTimer_04.png
    43.4 KB
  • MySleepTimer_logo.png
    MySleepTimer_logo.png
    35.7 KB
  • config.png
    config.png
    36.8 KB

catavolt

Design Group Manager
  • Team MediaPortal
  • August 13, 2007
    14,368
    10,406
    Königstein (Taunus)
    Home Country
    Germany Germany
    Hi Anthrax,

    This issue has been solved a loooooong time ago with myAlarm. There you have a button for the sleeptimer. Have a good night!
     

    Paranoid Delusion

    Moderation Manager
  • Premium Supporter
  • June 13, 2005
    13,062
    2,978
    Cheshire
    Home Country
    United Kingdom United Kingdom
    Anthrax

    This is a feature that has been asked for, for a very long time, rtv was going to do one, if my memory servers me correctly, but may not be seen till MP1.0 is out the door.

    This really does need to be handled by the menu's inside MP (not everyone has mce remote, doing both would be great) and some sort of visual indicator that it is active, S in corner of screen would be cool, with minutes left even cooler :), or maybe a visual time left displayed at your defined interval ie 15mins, saw that in options, do not know how its meant to work, as nothing shown, is there are no graphical changes involved for this to work.

    Love the various options that can be set, that definately knocks MyAlarms basic sleeptimer, which if you are dozing off is a pain to access, so very unuser friendly.

    Will definately give this a try, just wish i knew what i was setting exactly, because pressing a remote button x amount of times can easily lead to one press to many :(
     

    Anthrax

    Portal Pro
    February 15, 2007
    157
    48
    pretty much in the center
    Home Country
    Germany Germany
    Hi guys,

    kinda developed/released this in a hurry so i might've given some more explanations... :)

    catavolt: that's what i was using ever since - but to be honest and as Paranoid Delusion said: it's a pain in the butt to set up when you're in the twilight zone between awake and asleep ;)

    @ Paranoid Delusion: this plugin is not limited to the MCE Remote (just works perfectly on my one). You can set a load of predefined actions in the config screen. Just try "ACTION_PAUSE" (space bar per default) and press this inside MediaPortal some times - then it should all make sense to you, because there is a little notification window popping up as you press space... try pressing it numerous times and you see how easy it would be to set it up. then wait for the notification interval to elapse and keep an close eye on the screen, because there will be a 3sec popup window telling you how much time there is left ;)

    bye and good night,
    Anthrax
     

    Paranoid Delusion

    Moderation Manager
  • Premium Supporter
  • June 13, 2005
    13,062
    2,978
    Cheshire
    Home Country
    United Kingdom United Kingdom
    Nice, just tried PAUSE, now thats what i mean when i say show in GUI for a couple of secs when time reached, looking good for a plugin that is much wanted :)

    :D
     

    disaster123

    MP Donator
  • Premium Supporter
  • May 14, 2008
    3,558
    434
    Home Country
    Germany Germany
    Hi Anthrax

    this is a really long time awaited plugin (for me). I'll try it tomorrow.

    Here a few features i like:
    - define a free key / shortcut on the keyboard for this plugin
    - off / sleep time should be displayed on the top left corner when pressing the defined key
    - at a specific remaining time (free configurable) a counter should be displayed until shutdown
    - that's all :)
     

    xmats

    MP Donator
  • Premium Supporter
  • January 5, 2008
    20
    0
    Home Country
    Sweden Sweden
    Been looking for something like this for a while, since I usually fall asleep watching a movie.

    Does the plugin take into account if something is playing ? I'd want to set it up to go to sleep/shut down 10 minutes after the movie has stopped playing unless I do something ?
     

    Anthrax

    Portal Pro
    February 15, 2007
    157
    48
    pretty much in the center
    Home Country
    Germany Germany
    Hi xmats,

    maybe i dont get your point - why do you want it to shutdown 10 min after the movie is finished?
    I bet you are one these guys who wake up just before the final twist of the movie - i wish i would have this skill (no more sitting through the boring part of a movie) ;-)

    Anybody else feeling the need for this feature?
    How would you like to set it up?
    As of now when you go beyond the maximum sleep time the timer stops - so maybe i could fit this setting between reaching the max and stopping the timer?
     

    xmats

    MP Donator
  • Premium Supporter
  • January 5, 2008
    20
    0
    Home Country
    Sweden Sweden
    Hi

    I'm not very good at waking up before the movie ends unfortunately :)

    I just don't want to leave the computer on all night after I've fallen asleep and the movie has ended, so I'm looking for a way to shut it off automatically.

    I guess I can set the sleeptimer to 5 or 10 minutes longer than the movie is, but it would be nice if the plugin could determine when the movie is playing and suspend countdown during that time, and then when the movie stops and MP returns to the menu, the timer would re-start ?
     

    Users who are viewing this thread

    Top Bottom