NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Add-ons (3rd party plugins, utilities and skins) Old Stuff (Legacy) v
« Previous 1 … 10 11 12 13 14 … 125 Next »
Using with the standby button on the MCE remote

 
  • 0 Vote(s) - 0 Average
Using with the standby button on the MCE remote
erik
Offline

Posting Freak

Posts: 1,138
Threads: 123
Joined: Apr 2005
#1
2008-08-16, 04:12 PM
After considerable time spend I believe I have a workable use case for the standby button on the MCE remote.

The idea is simple.

When the PVR/TV/Amplifier are in standby you press once and voila, on go the PVR/TV/Receiver
When everything is on and you press again the standby button on the MCE remote the PVR/TV/Amplifier all go to standby unless the PVR is recording, then it waits with standby till the recording is finished.

All this without a universal programmable remote.

There may be many ways to get this working, I have chosen for the following approach.

Windows is set to go to standby after 5 minutes of inactivity. Playing music is enough to prevent going to standby, all user activities or watching recordings/video is also enough to prevent going to standby.

When a recording is ongoing and the PC is awake then, using HIP, the standby key has two functions.
When PVRX2.exe is not running, pressing the standby key wakes the TV, the Amplifier, resumes video wtih fullresume.exe and starts PVRX2.exe
When PVRX2.exe is running pressing the standby key puts the TV and amplifier to standby and kills PVRX2.exe (this is needed because sometimes after playing audio windows is not able to decide the PC should go to standby.)

When the PC is in standby the standby key on the MCE remote is not managed by HIP but will wake the PC.
Using a small autoit script I detect whether is PC is woken automatically or by a user action. If it is a user action I execute the same actions as when the standby key is pressed without PVRX2.exe running.

On the MCE remote I have an additional key to put the TV in standby or wake it up again for when listening to music (yes, music is very important to me and my whole collection is on the central server in lossless format)

What I still need to do is to add some code that will put the TV/Amplifier in standby and kill PVRX2.exe when the PC wants to go to standby in case I fall in sleep while watching video and the video has ended. This can be done using the WM_POWERBROADCAST message and the PBT_APMSUSPEND event but it must be finished within two seconds.

In case someone is interested I can post the autoit script and some other settings
P4 3GHz 1GB, 250GB, nVidia dualTV, GBPVR 1.3.11, XP
Support Comskip, visit the forum and donate at http://www.comskip.org/
psicotron3
Offline

Member

Posts: 134
Threads: 17
Joined: Jan 2007
#2
2008-08-16, 04:57 PM
I have a similar setup, but I´d like to see the script ou use on this part:

"Using a small autoit script I detect whether is PC is woken automatically or by a user action. If it is a user action I execute the same actions as when the standby key is pressed without PVRX2.exe running."

Also, how do you send the TV to standby? On my setup I installed a blaster on the amplifier, but for the tv I use nircmd to make windows put the monitor in standy.
erik
Offline

Posting Freak

Posts: 1,138
Threads: 123
Joined: Apr 2005
#3
2008-08-16, 07:08 PM
I use a blaster for the TV, through good contacts with the manufacturer I received the separate TV_on and TV_off IR codes instead of the power toggle IR code normally used in a remote.
For the Amplifier (Denon) I use a serial connection, a system integrators dream, everything is remote controllable with good status reporting for synchronization
This is the autoit script
Code:
#include <GUIConstants.au3>

Global $WM_POWERBROADCAST     = 536
Global $PBT_APMRESUMESUSPEND  =  0x0007
Global $PBT_APMSUSPEND         = 0x0004

$hGUI       = GUICreate("Test", 100, 100,1,1)
GUIRegisterMsg($WM_POWERBROADCAST, "Standby")
GUISetState()
While 1
    $GUIMsg = GUIGetMsg()
    Switch $GUIMsg
        Case $GUI_EVENT_CLOSE
            ExitLoop
    EndSwitch
WEnd
;
Exit
;
Func Standby($hWnd, $Msg, $wParam, $lParam)
    If $wParam = $PBT_APMRESUMESUSPEND Then
        Run("wakeafterresume.cmd")
    EndIf
    If $wParam = $PBT_APMSUSPEND Then
        Run("prepareforstandby.cmd")
    EndIf

wakeafterresume.cmd is a batch file that executes all the waking up actions to prepare for human use.
prepareforstandby.cmd is a (not yet used) batch file that has 2 seconds to prepare the system for standby (not yet tested)

The autoit script is run from the windows "startup" program group. I have to add minimizing and hiding of the window of the script.

In HIP I connect the standby button with the wakeafterruseme.cmd batch file to make sure that when the PC is already awake the same wakeup commands are executed.
When PVRX2.exe is running HIP connects the standby button to the prepareforstandby.cmd batch file.
P4 3GHz 1GB, 250GB, nVidia dualTV, GBPVR 1.3.11, XP
Support Comskip, visit the forum and donate at http://www.comskip.org/
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  iMon VFD and Remote time_lord 7 5,631 2010-07-19, 04:29 AM
Last Post: time_lord
  Remote control problem seascape 4 3,139 2008-11-13, 10:37 PM
Last Post: seascape
  Older Plug-Ins/Remote 235301 2 2,094 2008-01-05, 04:04 PM
Last Post: 235301
  Success! coolsat 5000 controlled by GBPVR using wintv mce remote! tvshowman 1 1,493 2007-12-14, 06:24 PM
Last Post: sgilani
  XRecord - Pending displayed, Play button jumps to show name starting with P Wakalaka 1 1,272 2007-03-30, 03:38 PM
Last Post: fla
  XRecord and Home button doesn't go back to Main Menu Wakalaka 0 1,075 2007-02-28, 07:04 PM
Last Post: Wakalaka
  my programs and use mame with a remote? DoPeFiSh 2 1,541 2007-01-26, 03:48 PM
Last Post: nbarsley
  How to change colour of only some button? blizard 6 2,015 2006-12-10, 07:52 PM
Last Post: stefan
  Transcode button does not appear in video library Bdunkin 5 1,986 2006-11-21, 06:59 PM
Last Post: Bdunkin
  remote reference for Myvideos bhays 1 1,476 2006-03-26, 07:58 AM
Last Post: reven

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode