PowerScheduler++ test versions (3 Viewers)

doveman

Portal Pro
February 12, 2008
2,326
178
Home Country
United Kingdom United Kingdom
Re: AW: Re: PowerScheduler++ Test Version 1.2.5.12 for MP 1.2.x / 1.3 Alpha

The controller is reinitialised on wakeup, but could not (re-)load your DVB-T cards ("Controller: card not found :Nova-DT DVB-T Tuner (Dev1 Path0) "). So I assume that your hardware is not able to "survive" a S3 supend / wakeup. You should try to use hibernate (S4) instead of S3 for standby (check "PS++ forces standby..." and set Standby mode to "Hibernate").

Strange, as it was working fine before I upgraded to 1.2.5.12. I have no desire to use S4 or have PS++ force standby, so I'll try rolling back to 1.2.5.10
 

michael_t

Portal Pro
November 30, 2008
1,258
813
Home Country
Germany Germany
AW: Re: AW: Re: PowerScheduler++ Test Version 1.2.5.12 for MP 1.2.x / 1.3 Alpha

From the logs provided it seems to me that you have not configured network and shares monitoring. But to be sure I would ask you to make a reboot or restart the tvservice before reproducing the error, so that I can see your PS++ settings in the logs (they are logged on tvservice startup). Then reproduce the error and take the log files and upload them.

Michael
 

larsbln

MP Donator
  • Premium Supporter
  • June 12, 2010
    337
    62
    Germany
    Re: PowerScheduler++ Test Version 1.2.5.12 for MP 1.2.x / 1.3 Alpha

    Did a restart of the TVService. Settings seem to be correct (20kb/s). Again the HTPC goes to standby in the middle of network activity.
     

    michael_t

    Portal Pro
    November 30, 2008
    1,258
    813
    Home Country
    Germany Germany
    AW: Re: PowerScheduler++ Test Version 1.2.5.12 for MP 1.2.x / 1.3 Alpha

    There is an error in the Network Monitor start routine that prevents network monitoring. I will check this and give you feedback...

    Michael
     

    doveman

    Portal Pro
    February 12, 2008
    2,326
    178
    Home Country
    United Kingdom United Kingdom
    Re: AW: Re: PowerScheduler++ Test Version 1.2.5.12 for MP 1.2.x / 1.3 Alpha

    The controller is reinitialised on wakeup, but could not (re-)load your DVB-T cards ("Controller: card not found :Nova-DT DVB-T Tuner (Dev1 Path0) "). So I assume that your hardware is not able to "survive" a S3 supend / wakeup. You should try to use hibernate (S4) instead of S3 for standby (check "PS++ forces standby..." and set Standby mode to "Hibernate").

    Strange, as it was working fine before I upgraded to 1.2.5.12. I have no desire to use S4 or have PS++ force standby, so I'll try rolling back to 1.2.5.10

    Well it seems all right with 1.2.5.10.

    On a separate matter, could you clarify how the EPG settings work. For instance, if I have "EPG Grabbing while idle" disabled and set PS++ to grab the EPG at e.g. 02:00 every day, and the system's always idle at that time, will it grab the EPG? What about if the tuner(s) are in use at that time, will it grab the EPG when the system becomes idle (even if "EPG Grabbing while idle" is disabled)?
     

    doveman

    Portal Pro
    February 12, 2008
    2,326
    178
    Home Country
    United Kingdom United Kingdom
    Re: PowerScheduler++ Test Version 1.2.5.12 for MP 1.2.x / 1.3 Alpha

    Bizarre. 1.2.5.10 has been no problem for 3-4 days of resuming, but this morning it failed to restart the TVservice (or at least I had to manually do it to get it working). With 1.2.5.12 this happened every time, so I think this version is better, but obviously there's still an issue somewhere.
     

    TomPP

    Portal Pro
    March 7, 2011
    65
    1
    Home Country
    United Kingdom United Kingdom
    Re: PowerScheduler++ shares settings

    I am currently using the stable PS++ version 1.2.2.1 and would
    be grateful if someone could advise on setting up the Shares
    option.

    The background is that I'm using a Roberts 205 internet radio
    whose Music Player can play music held on the HD of my Media PC
    (running Windows 7 and MP 1.2.2. Final) via a wi-fi connection
    to the network router. The PC is hard wired via LAN to the
    router. When the Music Player is started it wakens up the PC
    from standby and starts playing the track of the CD specified. However
    the PC goes back to standby at the end of the timeout period set
    in Powerscheduler++ (currently 5 minutes) and of course the
    music then terminates! I suspect some settings have to be
    specified in the Shares section to stop PS from doing this
    while connected to the network.

    Many thanks.
     

    michael_t

    Portal Pro
    November 30, 2008
    1,258
    813
    Home Country
    Germany Germany
    AW: Re: PowerScheduler++ shares settings

    doveman
    I did not change anything in the "Reinitialize service on wakeup" function in all the versions of PS++ since the first 0.x version. The option was labelled slightly different in the configuration GUI, but that's all... In the first versions of PS++ 1.2.5.x there was a bug in the "Run command before standby / after wakeup" function that made "Reinitialise service..." not to be performed at all, but this bug is fixed since 1.2.5.9. So if you experience different behaviour concerning the reinitialisation of the tv controller software, it cannot be caused by the different PS++ versions.
    And to clarify this again: PowerScheduler / PowerScheduler++ never did or does a restart of the whole tvservice, it only calls the deinit (on standby) and reinit (on wakeup) routines of the tv controller, a piece of software which belongs to the TVEngine and is not part of PowerScheduler(++).

    TomPP
    This is the forum thread for the test versions of PS++, so please post your requests for version 1.2.2.1 in the stable version's thread the next time. To answer your question you should have a look at the PowerSheduler++ wiki.

    Michael
     

    TomPP

    Portal Pro
    March 7, 2011
    65
    1
    Home Country
    United Kingdom United Kingdom
    Re: AW: Re: PowerScheduler++ shares settings

    @doveman
    I did not change anything in the "Reinitialize service on wakeup" function in all the versions of PS++ since the first 0.x version. The option was labelled slightly different in the configuration GUI, but that's all... In the first versions of PS++ 1.2.5.x there was a bug in the "Run command before standby / after wakeup" function that made "Reinitialise service..." not to be performed at all, but this bug is fixed since 1.2.5.9. So if you experience different behaviour concerning the reinitialisation of the tv controller software, it cannot be caused by the different PS++ versions.
    And to clarify this again: PowerScheduler / PowerScheduler++ never did or does a restart of the whole tvservice, it only calls the deinit (on standby) and reinit (on wakeup) routines of the tv controller, a piece of software which belongs to the TVEngine and is not part of PowerScheduler(++).

    @TomPP
    This is the forum thread for the test versions of PS++, so please post your requests for version 1.2.2.1 in the stable version's thread the next time. To answer your question you should have a look at the PowerSheduler++ wiki.

    Michael
    Sorry, Michael. I ended up here since I had been trying the test versions before returning to 1.2.2.1 after some problems. Many thanks for your efforts.
     

    doveman

    Portal Pro
    February 12, 2008
    2,326
    178
    Home Country
    United Kingdom United Kingdom
    Re: AW: Re: PowerScheduler++ shares settings

    @doveman
    I did not change anything in the "Reinitialize service on wakeup" function in all the versions of PS++ since the first 0.x version. The option was labelled slightly different in the configuration GUI, but that's all... In the first versions of PS++ 1.2.5.x there was a bug in the "Run command before standby / after wakeup" function that made "Reinitialise service..." not to be performed at all, but this bug is fixed since 1.2.5.9. So if you experience different behaviour concerning the reinitialisation of the tv controller software, it cannot be caused by the different PS++ versions.
    And to clarify this again: PowerScheduler / PowerScheduler++ never did or does a restart of the whole tvservice, it only calls the deinit (on standby) and reinit (on wakeup) routines of the tv controller, a piece of software which belongs to the TVEngine and is not part of PowerScheduler(++).

    OK, thanks for the info. I don't know why TVservice seems to work more often after resume with 1.2.5.10 than 1.2.5.12 then, but it's still not totally reliable, so I've amended restart.vbs (which MP uses to restart when the "Restart MP on resume" option is ticked in MP config) to also restart the TVService, so I'll just untick the "Reinitialise service" in PS++.

    I'm no coder, so there might be a better/neater way of doing this but it seems to work anyway. EDIT: My first attempt had various mistakes and I've also found that TVservice doesn't need to be restarted by the script, as it get's restarted when Mediaportal starts.

    Code:
    Option Explicit
    
    ' *********************************************
    ' This function checks if a process is running 
    ' *********************************************
    Function IsProcessRunning( strProcess )
        Dim Process, strObject
        IsProcessRunning = False
        strObject   = "winmgmts:\\.\root\cimv2"
        For Each Process in GetObject( strObject ).InstancesOf( "win32_process" )
    		If UCase( Process.name ) = UCase( strProcess ) Then
                IsProcessRunning = True
                Exit Function
            End If
        Next
    End Function
    
    
    Dim   Shell, Shell2, objFolder, objFolderItem, logpath, logold, lognew, syspath, FileSys, LogFile, TmpFile, strEcho, prockill, result, process, process2
    
    ' Values taken from http://msdn.microsoft.com/en-us/library/bb774096(VS.85).aspx
    Const ssfCOMMONAPPDATA = 35
    Const ssfSYSTEM        = 37
    
    process   = "MediaPortal"
    process2  = "net start TVservice"
    
    Set Shell         = CreateObject("WScript.Shell")
    Set Shell2        = CreateObject("Shell.Application")
    Set objFolder     = Shell2.Namespace(ssfCOMMONAPPDATA)
    Set objFolderItem = objFolder.Self
    
    logpath           = objFolderItem.Path & "\Team MediaPortal\MediaPortal\log\"
    lognew            = logpath + "\" + Wscript.ScriptName + ".log"
    logold            = logpath + "\" + Wscript.ScriptName + ".bak"
    
    Set objFolder     = Shell2.Namespace(ssfSYSTEM)
    Set objFolderItem = objFolder.Self
    
    syspath           = objFolderItem.Path
    
    Set FileSys = CreateObject("Scripting.FileSystemObject")
    If FileSys.FileExists(lognew) Then
    	Set TmpFile = FileSys.GetFile(lognew)
      TmpFile.Copy(logold)
    End If
    
    ' Clean up for all log files to avoid confusion
    If FileSys.FileExists(logpath + "\restart.log") Then
    	Set TmpFile = FileSys.GetFile(logpath + "\restart.log")
      TmpFile.Delete
    End If
    
    Set LogFile = FileSys.CreateTextFile(lognew,1)
    
    strEcho = Date() & "-" & Time() & ": Starting """ & Wscript.ScriptName & """ with """ & Wscript.FullName & """ (v. " & Wscript.Version & ")"
    LogFile.writeline strEcho
    
    strEcho = Date() & "-" & Time() & ": Looking for ""tskill.exe"" in """ & syspath & """"
    LogFile.writeline strEcho
    If FileSys.FileExists(syspath + "\tskill.exe") Then
    
      strEcho = Date() & "-" & Time() & ": Kill utility will be ""tskill"""
      LogFile.writeline strEcho
      ' Using tskill to fix Mantis issue 1529
      prockill = "tskill " & process
    
    Else
    
      strEcho = Date() & "-" & Time() & ": ""tskill.exe"" not found "
      LogFile.writeline strEcho
      strEcho = Date() & "-" & Time() & ": Kill utility will be ""taskkill"""
      LogFile.writeline strEcho	
      prockill = "taskkill /F /IM " & process & ".exe"
    
    
    End If
    
    strEcho = Date() & "-" & Time() & ": Executing """ & prockill & """"
    LogFile.writeline strEcho	
    result = Shell.Run (prockill, 0, True)
    strEcho = Date() & "-" & Time() & ": Killed  """ & process & """ (Exit code=" & result & ")"
    LogFile.writeline strEcho	
    prockill = "net stop TVService"
    result = Shell.Run (prockill, 0, True)
    strEcho = Date() & "-" & Time() & ": Killed  """ & process2 & """ (Exit code=" & result & ")"
    LogFile.writeline strEcho	
    
    ' Check for MediaPortal still running
    do
    	WScript.Sleep(100)
    loop while IsProcessRunning ( process & ".exe" )
    
    strEcho = Date() & "-" & Time() & ": Executing """ & process & """"
    LogFile.writeline strEcho	
    result = Shell.Run (process, 1, False)
    strEcho = Date() & "-" & Time() & ": Started """ & process & """ (Exit code=" & result & ")" & vbcrlf
    LogFile.writeline strEcho	
    
    LogFile.Close
     

    Users who are viewing this thread

    Top Bottom