MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » MediaPortal 1 » Community Skins and Plugins » Plugins


Plugins Plugins developed and maintained by users. Want to create your own plugin? Start a thread in here.

Reply
 
Thread Tools Display Modes
Old 2006-05-17, 22:50   #1 (permalink)
Portal Member
 
Join Date: May 2006
Location: Aarhus Denmark
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts


Default Waking from standby - powerbroadcasts..

I am working on a plugin that is able to turn my TV on and off when the PC is going into / coming out of standby.
This does allready work.. sort of.

If I press the power button when the PC is in standby, I get a WM_POWERBROADCAST: 18, followed by a WM_POWERBROADCAST: 7
The latter has this constant: PBT_APMRESUMESUSPEND
I cant seem to find a constant for the first one, does anyone know the meaning of it ?

Also, I want to be able to distinct between when the PC wakes because it need to record a program (I use PVR scheduler) or when it is started manually.

The only difference I have found so far is that the WM_POWERBROADCAST: 7 is not fired when PVR scheduler wakes the PC.

Any thoughts ?
__________________
HTPC: Silverstone LaScala LC13, MSI K7N2 Delta2, AMD Athlon 3200+, 512 MB Kingston DDR3200, Club3D GeForce 6600GT, Hauppauge Nova-t
Mods: Passive cooled North Bridge and GFX card.
KXE_DENMARK is offline   Reply With Quote
Old 2006-05-17, 23:19   #2 (permalink)
Portal Member
 
Smirnuff's Avatar
 
Join Date: Dec 2004
Location: United Kingdom
Posts: 630
Thanks: 0
Thanked 2 Times in 1 Post

My System

Default

Quote:
I get a WM_POWERBROADCAST: 18
18 is PBT_APMRESUMEAUTOMATIC.

Here's the full list in case you don't have the Platform SDK installed:

Code:
#define PBT_APMQUERYSUSPEND             0x0000
#define PBT_APMQUERYSTANDBY             0x0001

#define PBT_APMQUERYSUSPENDFAILED       0x0002
#define PBT_APMQUERYSTANDBYFAILED       0x0003

#define PBT_APMSUSPEND                  0x0004
#define PBT_APMSTANDBY                  0x0005

#define PBT_APMRESUMECRITICAL           0x0006
#define PBT_APMRESUMESUSPEND            0x0007
#define PBT_APMRESUMESTANDBY            0x0008

#define PBTF_APMRESUMEFROMFAILURE       0x00000001

#define PBT_APMBATTERYLOW               0x0009
#define PBT_APMPOWERSTATUSCHANGE        0x000A

#define PBT_APMOEMEVENT                 0x000B
#define PBT_APMRESUMEAUTOMATIC          0x0012
Can't help with latter question.

Cheers,
Smirnuff.
Smirnuff is offline   Reply With Quote
Old 2006-05-17, 23:25   #3 (permalink)
Retired Team Member
 
mzemina's Avatar
 
Join Date: Feb 2005
Location: Ft Smith, AR
Posts: 2,045
Thanks: 36
Thanked 12 Times in 12 Posts

Country:


Default

Smirnuff - Always nice to see your young face (and valuable information you provide) in the forums!
mzemina is offline   Reply With Quote
Old 2006-05-18, 09:06   #4 (permalink)
MP Donator
 
Aquarius's Avatar
 
Join Date: Nov 2004
Location: NRW
Posts: 234
Thanks: 1
Thanked 0 Times in 0 Posts

Country:

My System

Default interesting plugin !

Hi,
sounds like a very interesting plugin !

May I raise the question how you electrically want to get the TV on ? Do you want to switch power on or set some signal for the TV to recognize an external source ?

TVs ( at least in Europe) have a so called SCART Adapter. There you have to put +5V on a certain pin and the TV switches to the external source.

Are you intending to do such things ?

Regards
/Gerd
Aquarius is offline   Reply With Quote
Old 2006-05-18, 09:19   #5 (permalink)
Portal Member
 
Join Date: May 2006
Location: Aarhus Denmark
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts


Default

@Smirnuff: thanx I'll just have to look into it some more.

@Aquarius: I own a LG 32LX2 which have a serial (D sub9) connection. With this it is possible to command the TV to do most of the commands from the remote. It is possible to poll states of the TV as well. Quite cool actually (at least I think, as I'm a geek of nature ).

Anybody can give me a hint as what to look for, to be able to distinct between manually wake and scheduled wake ?
__________________
HTPC: Silverstone LaScala LC13, MSI K7N2 Delta2, AMD Athlon 3200+, 512 MB Kingston DDR3200, Club3D GeForce 6600GT, Hauppauge Nova-t
Mods: Passive cooled North Bridge and GFX card.
KXE_DENMARK is offline   Reply With Quote
Old 2006-05-18, 09:22   #6 (permalink)
Portal Member
 
wewe's Avatar
 
Join Date: Aug 2005
Location: Herxheim
Age: 47
Posts: 355
Thanks: 0
Thanked 0 Times in 0 Posts

Country:


Default

have you seen 'Autostart'? ( http://www.team-mediaportal.com/file...tion/Autostart )

The frist thing I see fom my PC when I switch it on is fullscreen TV even after resume from standby! :lol:

(I am using PBT_APMRESUMESUSPEND by the way)

thanks+regards
WeWe
__________________
Hard: ASUS K8M-VX, Sempron 3100+, MSI NX6200AX-TD256, Spinpoint SP2004C, WinTV PVR 150, MCE Remote + Keyboard / Soft: Win XP MCE, MP 0.2.1.0
wewe is offline   Reply With Quote
Old 2006-05-18, 19:05   #7 (permalink)
MP Donator
 
Aquarius's Avatar
 
Join Date: Nov 2004
Location: NRW
Posts: 234
Thanks: 1
Thanked 0 Times in 0 Posts

Country:

My System

Default Q

Quote:
I own a LG 32LX2 which have a serial (D sub9) connection.
So you saying you are controlling COMx of HTPC with this plugin ?
That's really cool and could be well extended !

Sending commands to your - specific - TV seems to a bit propietary. Could I also switch the control lines of COMx (e.g. RTS /CTS ) ?

Regards
/Gerd
Aquarius is offline   Reply With Quote
Reply

Bookmarks

Tags
powerbroadcasts, standby, waking

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Resume from standby with remote pjam001 General Support 12 2008-03-25 06:10
Resolving standby issues - MCE Standby tool mba General Support 7 2007-11-29 15:47
recording problems after waking up from standby wunschkind General Support 2 2007-01-11 19:08
Windows freeze on hardware standby rgies General Support 0 2006-09-18 18:01
wake from standby over a lan maurij OffTopic 1 2005-04-22 09:18


All times are GMT +1. The time now is 05:51.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 Protected by Akismet Blog with WordPress
Advertisement System V2.6 By   Branden