[other] Away Mode capability (1 Viewer)

jameson_uk

Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    my thoughts were
    https://forum.team-mediaportal.com/improvement-suggestions-46/mpii-powerscheduler-72099/

    I guess I kind of avoided away mode as it is Vista and Win7 only and I am on XP. My TV and amp are turned off when I am not using them so I only want the PC to wake and record and then sleep again; I don't really care what is happening to the video and audio output. I see what you are saying though and I guess if you press the power button and the screen goes black it is better than pressing the power button and nothing happening (again I just let the machine timeout to standby anyway)

    Eitherway I am in total agreement as with my other post that powerscheduler need a massive overhaul. Unfortunately MP1.1 is having a feature freeze and I doubt this will get anything done about it (you only need to look at the powerscheduler client code to see how messy it has become). MP2 will hopefully sort a lot of this out;
     

    usualsuspect

    Portal Pro
    May 12, 2009
    631
    98
    Home Country
    Germany Germany
    my thoughts were MPII - PowerScheduler
    I am not using powerscheduler anymore as gmps just works. I do not know, how goersch coded it, but it works fine!

    I guess I kind of avoided away mode as it is Vista and Win7 only and I am on XP
    I guess MPII will no longer support xp, will it?

    again I just let the machine timeout to standby anyway
    that's not user friendly. the user wants to turn off things. You turn off the TV when you do not want to watch anymore. You turn off your DVD-recorder, when you are finished. You turn off your car when you arrived and do not wait till it's finished (if the engine is hot, and the fan is still running, it will run till it's ok, but you turned off the car) - quite a bad example, but anyway :)
    with away mode the user does not turn off the pc (when it's busy) but he thinks, he does. so everything is fine.

    Unfortunately MP1.1 is having a feature freeze and I doubt this will get anything done about it
    with gmps away mode can be implemented by a plugin, despite featurefreeze.
     

    Goersch

    MP Donator
  • Premium Supporter
  • November 10, 2007
    428
    25
    jameson,

    I looked thru your post. I mean the GMPS code is in most of the parts for other programmers horrendous as well; but right now I'm the only one working on it ...

    Anyway my suggestion for MPII is to have a seperate windows service handling standby. This would mean a single thread to actually handle putting the machine into standby (I am sure some of the problems I have are with the client plugin triggering a standby just as the TV server plugin does etc) and also make the code a million times more simple. All this would need is a plugin on both client and TV server that responded to "CanIGoToSleep" type message and a "WhatTimeDoYouWantMeToWakeYouUp" type message.
    GMPS is a single program - not service, but it provides the "CanIGotoSleep" by
    a) a MP PlugIn, which communicates with GMPS on the server. If MP is not in Homedialog, the Server will not rundown - even if MP is not running on the Server
    b) you can define as many processes on a client as you want which will block the Server to go down (an so called "GMPS Remote" is necessary)

    I was going to code up this for MP I but since I have turned off the client plugin (and close MP when I am done) I have not had any more issues and I am not sure I can spend the time on doing this properly. In the meantime I think I will create an alternative client plugin which will force the machine to stay awake using SetThreadExecutionState() with ES_CONTINUOUS | ES_DISPLAY_REQUIRED values to prevent standby by default. I will then set a timer and just check there is nothing playing on the global player and we are in home screen. Then after 10 mins I will reset SetThreadExecutionState() to normal values allowing the TV server to take over standby duties
    Have a look at GMPS - there are still some problems, but most of the things you request are done in GMPS.

    The latest version can be found here : GMPS-Scheduler • Thema anzeigen - Beta Version 0.3.1.23

    (If it comes up in German : Go to "Optionen\Sprachen" you can change the language there.)

    I'm right now working on Version 0.3.2.0 which will have some more improvements and an updated documentation (German is done, I'm working on the English part).



    Well, anyway, all doesn't help with my previous questions; so just for a reminder for everybody else:

    I understand that all developers are focused on MPII - which might be released next year: long time and then it might take several months till the Away Mode is realized. In the meantime I can offfer this function via GMPS: All I would need to get this function done are two - for a MP developer easy - functions:

    1) static void EnterAwayMode()
    a) MP saves the current status (current window, played music/video/tv channel/and so on)
    b) MP stops player
    c) MP switches to Home Dialog

    2) static void EnterUserMode()
    a) MP gets back to the saved situation of 1a)

    I know how to to do
    1b) g_Player.Pause() for non-TV playback, g_Player.Stop() for TV (to release the tuners; very important !).
    1c) GUIWindowsManger.ActiveWindow (windowId)

    But I have no idea how to realize 1a and 2a. If one of the developers can help - or may be - there is already such a function available, that would help very much.
    I do not even need these functions within MP. CSharp Code with necessary calls are Ok as well. I will then implement this code into the GMPS MP PlugIn.
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Eitherway I am in total agreement as with my other post that powerscheduler need a massive overhaul. Unfortunately MP1.1 is having a feature freeze and I doubt this will get anything done about it (you only need to look at the powerscheduler client code to see how messy it has become). MP2 will hopefully sort a lot of this out;

    So true, and the worst thing is that it works really nicely for team members so no one has been eager to touch it for MP1. It is really time consuming thing to debug S3/S4 state errors.
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    1) static void EnterAwayMode()
    a) MP saves the current status (current window, played music/video/tv channel/and so on)
    b) MP stops player
    c) MP switches to Home Dialog

    most likely step A cannot be done within a plugin as MP doesn't provide needed methods for such. Please have a look in d3dapp.cs and MediaPortal.cs how standby is handled. I think the away mode would require changes in MP itself. B & C should be possible.
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    again I just let the machine timeout to standby anyway
    that's not user friendly. the user wants to turn off things. You turn off the TV when you do not want to watch anymore. You turn off your DVD-recorder, when you are finished. You turn off your car when you arrived and do not wait till it's finished (if the engine is hot, and the fan is still running, it will run till it's ok, but you turned off the car) - quite a bad example, but anyway :)
    with away mode the user does not turn off the pc (when it's busy) but he thinks, he does. so everything is fine.

    I find it personal much easier when I don't have to turn things down but instead they are intelligent enough to turn them off when they arent used anymore. But it is just a preference how different people see the use cases.

    What comes to the away mode. It wont be supported by MP1 as the development is going to be only bug fixes from now on. If it is possible to handle it thru a plugin, then it would be even better as it wont bring any regression risk to the current implementation.
     

    Goersch

    MP Donator
  • Premium Supporter
  • November 10, 2007
    428
    25
    most likely step A cannot be done within a plugin as MP doesn't provide needed methods for such. Please have a look in d3dapp.cs and MediaPortal.cs how standby is handled. I think the away mode would require changes in MP itself. B & C should be possible.
    Thanks tourettes - I will have a look.
     

    ssjunior

    Portal Member
    October 7, 2009
    23
    2
    Home Country
    Brazil Brazil
    I was doing some digging last week and was reading about "away mode". I did not to much into it but my understanding was that it basically left everything on but blanked the monitor (not quite but not far off). As far as I could tell there was nothing to reduce power to CPU, GPU etc so I am struggling to see why this is of use.... I get it makes things a little easier but by the same token you can prevent standby and just wake the monitor when there is any user interaction???

    would be very interested in real world experience of it. Also would be interested if anyone has any statistic on whether away mode power consumption is any less than normal on.
    Jameson,

    If you use Windows Media Center with Away Mode for a week, you will understand how difficult is to go back to MediaPortal. In WMC I just click OFF in my remote control and do not worry about what is going on, if the system is recording or not. It just works. If it is working the system will appear to be turned off but will continue to record (as in ANY set top box) and after that the system will be turned off. The first time I saw this happening I was amazed and could not understand why this did not exist before.

    Imagine I am trying to explain to my wife: NOOOOOOO you cannot click OFF button because the system will stop recording. The OFF button cannot be used to turn off the system. Whaaaaaaaatt?? So why it exists?

    It is just a matter of usability and confort to hundreds of users around the world that are nos as geek as we are. Please open up your minds and remember that not all of users are tech guys like us.

    :)

    kind regards
     

    usualsuspect

    Portal Pro
    May 12, 2009
    631
    98
    Home Country
    Germany Germany
    ...you will understand how difficult is to go back to MediaPortal
    goersch has released gmps 3.2.0 alpha with full away mode integration a few hours ago. hopefully by end of this week there will be 3.2.0 final. with that away mode capability is mainly implemented in mp. just the resume playback function when coming back from away mode to user mode is lacking.
    so welcome back :)
     

    ssjunior

    Portal Member
    October 7, 2009
    23
    2
    Home Country
    Brazil Brazil
    goersch has released gmps 3.2.0 alpha with full away mode integration a few hours ago. hopefully by end of this week there will be 3.2.0 final. with that away mode capability is mainly implemented in mp. just the resume playback function when coming back from away mode to user mode is lacking.
    so welcome back :)

    I am already testing GMPS and will off course test new version too!! :) I think that not having resume playback is a minor issue compared to what GMPS is giving to us. :) :D
     

    Users who are viewing this thread

    Top Bottom