MPstandbyHandler (1 Viewer)

josch.hh

MP Donator
  • Premium Supporter
  • March 29, 2008
    476
    77
    Hamburg
    Home Country
    Germany Germany
    That is easy,
    MP was not running during standby. MPstandbyhandler remembers on wakup if MP did run during suspend. Only if MP was running it will be started/restarted.

    I did this for a good reason. I didn't what this application to be a autostart tool for MP.
    Otherwise MP/TVS would always be started after you put your pc into standby.
     

    Snader

    MP Donator
  • Premium Supporter
  • September 5, 2007
    270
    10
    Aalsmeer
    Home Country
    Netherlands Netherlands
    This is what I needed! Sometimes, I don't know why, mediaportal wasn't closed correctly. I even once had 3 instances running of mediaportal while that should'nt be possible. This program seems to do the job just fine. The restarting of the TVservice was one thing I hoped for in a future release of mediaportal; but now it is here! Thanx!
     

    joystick

    MP Donator
  • Premium Supporter
  • January 26, 2006
    892
    39
    Home Country
    Germany Germany
    hi
    I just tried your app, but everytime I resume from standby/hibernate I get the MP Log tool, that tells me MP has been shutdown and caused an error.
    Neverltheless MP is restarting as configured, though.


    Here are the logs :
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Good morning,

    I have installed Tourettes new powerscheduler.dll in TV-Service and I tried with 15 seconds before the restart of TV-service and got:

    2008-09-04 06:26:56.656250 [1]: Exception :confused:ystem.Runtime.Remoting.RemotingException: Remoting configuration failed with the exception 'System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted
    at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)

    TV-Service logs attached.

    Is this still happening with the latest SVN?
     

    J-B-N

    Portal Pro
    December 29, 2005
    196
    20
    Sweden
    Home Country
    Sweden Sweden
    Is this still happening with the latest SVN?

    Yes soo it seems. I actually decided to use the sunday to install Vista on my HTPC in hope this would solve it but it seems not. So MP could not establish contact with the tv-server.

    I got the following (in swedish an am said to say).

    2008-09-12 07:31:26.169800 [Info.][MPMain]: Unable to start plugin:MediaPortal.Plugins.Process.PowerSchedulerClientPlugin exception:confused:ystem.Net.WebException: Det går inte att ansluta till fjärrservern ---> System.Net.Sockets.SocketException: Det gick inte att göra en anslutning eftersom måldatorn aktivt nekade det 127.0.0.1:31457
    vid System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
    vid System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)
    vid System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)


    Thanx for any help, and let me know if I can do some more testing.
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    2008-09-12 07:31:26.169800 [Info.][MPMain]: Unable to start plugin:MediaPortal.Plugins.Process.PowerSchedulerClientPlugin exception:confused:ystem.Net.WebException: Det går inte att ansluta till fjärrservern ---> System.Net.Sockets.SocketException: Det gick inte att göra en anslutning eftersom måldatorn aktivt nekade det 127.0.0.1:31457
    vid System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
    vid System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)
    vid System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)

    Actually thats a completely different error. Client is not able to connect at all as the port is closed. Sounds like a firewall issue.
     

    dans1982

    Portal Member
    September 8, 2008
    46
    0
    Home Country
    England England
    Hi I get the following error when testing resume. Somthing to do with UAC on vista??

    17/09/2008 10:55:51 :: Info :: Service Stop - Trying to stop (10s): TVService
    17/09/2008 10:55:51 :: Error :: Service Stop - Cannot open TVService service on computer '.'.
    17/09/2008 10:55:51 :: Info :: Process Stop - Trying to KILL TvService (10000ms) (id:2344)
    17/09/2008 10:55:51 :: Error :: Process Stop - Access is denied

    Dan
     

    josch.hh

    MP Donator
  • Premium Supporter
  • March 29, 2008
    476
    77
    Hamburg
    Home Country
    Germany Germany
    Hi I get the following error when testing resume. Somthing to do with UAC on vista??

    17/09/2008 10:55:51 :: Info :: Service Stop - Trying to stop (10s): TVService
    17/09/2008 10:55:51 :: Error :: Service Stop - Cannot open TVService service on computer '.'.
    17/09/2008 10:55:51 :: Info :: Process Stop - Trying to KILL TvService (10000ms) (id:2344)
    17/09/2008 10:55:51 :: Error :: Process Stop - Access is denied

    Dan

    Yes, turn off the UAC and it should work.

    ... the other possibility is, that i modify MPstandbyHandler to be system service with admin rights.
    but i am not sure if this makes sence or if someone here like to see this application to be a service.
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    I want to use your tool, it looks quite good for me.

    One thing I'm currently missing (also in my batch files...):
    I also use devcon to restart my 2 tt cards. Sometimes I get "At least one device requires reboot" message, this card won't work in TVService.

    Question 1:
    Would it be possible to watch the STDOUT of the called application for a keyword (i.e. "requires reboot") and cause the system to reboot?

    Question 2:
    The order of execution of the commands is not exactly what I would need:
    a) end the tvservice
    - stop tvservice (per net stop)
    - send WM_CLOSE to tvservice (works sometimes when "kill" would hang...)
    - kill tvservice (last try ;-)
    b)
    - devcon restart tv cards
    c)
    - start tvservice

    you see, step b) would be between stop and start, not the first action. Can this be configured by a parameter?


    Thank you
    Morpheus_xx
     

    Users who are viewing this thread

    Top Bottom