1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

MySleepTimer

Discussion in 'MediaPortal 1 Plugins' started by Anthrax, October 25, 2008.

  1. Anthrax

    Anthrax Portal Pro

    Joined:
    February 15, 2007
    Messages:
    157
    Likes Received:
    46
    Location:
    pretty much in the center
    Ratings:
    +48 / 0
    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:
    Show Spoiler
    • 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)


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

    Source code:
     

    Attached Files:

    • Like Like x 15
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. catavolt
    • Team MediaPortal
    • Administrator

    catavolt Design Group Manager

    Joined:
    August 13, 2007
    Messages:
    11,389
    Likes Received:
    4,410
    Gender:
    Male
    Occupation:
    Technical Documentation, Translation
    Location:
    Glashütten (Hochtaunus)
    Ratings:
    +6,481 / 38
    Home Country:
    Germany Germany
    Show System Specs
    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!
     
  4. Paranoid Delusion
    • Team MediaPortal

    Paranoid Delusion Moderation Manager

    Joined:
    June 13, 2005
    Messages:
    13,062
    Likes Received:
    1,481
    Gender:
    Male
    Occupation:
    Electrical Engineer
    Location:
    Cheshire
    Ratings:
    +1,482 / 0
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    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 :(
     
  5. Anthrax

    Anthrax Portal Pro

    Joined:
    February 15, 2007
    Messages:
    157
    Likes Received:
    46
    Location:
    pretty much in the center
    Ratings:
    +48 / 0
    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
     
  6. Paranoid Delusion
    • Team MediaPortal

    Paranoid Delusion Moderation Manager

    Joined:
    June 13, 2005
    Messages:
    13,062
    Likes Received:
    1,481
    Gender:
    Male
    Occupation:
    Electrical Engineer
    Location:
    Cheshire
    Ratings:
    +1,482 / 0
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    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
     
  7. TranceManNZ

    TranceManNZ Portal Pro

    Joined:
    July 30, 2006
    Messages:
    209
    Likes Received:
    15
    Ratings:
    +20 / 0
    I'm excited ! !!whoop whoop

    giving it a go now. This is looooong over due.

    Thanks Anthrax
     
  8. disaster123
    • Premium Supporter

    disaster123 MP Donator

    Joined:
    May 14, 2008
    Messages:
    3,546
    Likes Received:
    417
    Ratings:
    +430 / 2
    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 :)
     
  9. xmats
    • Premium Supporter

    xmats MP Donator

    Joined:
    January 5, 2008
    Messages:
    20
    Likes Received:
    0
    Ratings:
    +0 / 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 ?
     
  10. Anthrax

    Anthrax Portal Pro

    Joined:
    February 15, 2007
    Messages:
    157
    Likes Received:
    46
    Location:
    pretty much in the center
    Ratings:
    +48 / 0
    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?
     
  11. xmats
    • Premium Supporter

    xmats MP Donator

    Joined:
    January 5, 2008
    Messages:
    20
    Likes Received:
    0
    Ratings:
    +0 / 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 Viewing Thread (Users: 0, Guests: 0)

  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Like Us On Facebook

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!