PowerEvent plugin www

Xlobby plugin development

PowerEvent plugin www

Postby lar282 on Mon Aug 11, 2008 7:50 am

#
http://www.xlobby.com/files/Shaggy/powe ... Events.jpg
##
PowerEvent plugin for xlobby. Runs events / Applications on standby and/or Resume of the computer.
###

Download:
http://www.xlobby.com/files/Shaggy/powe ... Events.zip

Unzip and copy all files to your xlobby directory. some files goes to your skin as well. Look at the directory structure..............


PowerEvents.Xml in the xlobby directory controls the plugin. Pretty much selfexplanitory.

<entry name="WaitAfterWakeUp">7</entry>
<entry name="ResumeApplication"></entry>
<entry name="ResumeApplication_Parameters"></entry>
<entry name="StandbyApplication"></entry>
<entry name="StandbyApplication_Parameters"></entry>
<entry name="Standby_XLEvent">AtStandby</entry>
<entry name="Resume_XLEvent">AtResume</entry>
<entry name="killzoomplayerAtStandby">yes</entry>
<entry name="weather_wait">120</entry>
<entry name="waitforapp">yes</entry>

Events that will run when resume from standby has to be in an event group called PowerEvents, Then the event can be called whatever sepicified in the xml file. default is atResume and Atstandby.

Also a variable weather_wait is set to 120 seconds by default. this means that the event called Wake_Weather in the group PowerEvents will execute after 120 seconds after the computer wakes up. Seems like XL has some prob with refreshing weather right after resume, so I added this.


killzoomplayerAtStandby yes/no will kill zoomplayer when the computer will go into standby. Handy when u press the powerbutton on the computer when a movie is playing. Then when it wakes up, zoomplayer is closed.

If u have problem, look at the log file \log\XPowerPlugin.log

Regards

//Lasse
Last edited by lar282 on Mon Aug 11, 2008 2:13 pm, edited 1 time in total.
lar282
 
Posts: 1624
Joined: Thu Apr 01, 2004 4:13 pm
Location: Helsingborg, Sweden

Re: PowerEvent plugin www

Postby P3rv3rt B3ar on Mon Aug 11, 2008 8:34 am

lar282 wrote: I use the Run Event. Dont think that exist in the freeware version.



Im pretty sure uve mistaken there.
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Re: PowerEvent plugin www

Postby lar282 on Mon Aug 11, 2008 8:36 am

P3rv3rt B3ar wrote:
lar282 wrote: I use the Run Event. Dont think that exist in the freeware version.



Im pretty sure uve mistaken there.



Then its a good thing.

//Lasse
lar282
 
Posts: 1624
Joined: Thu Apr 01, 2004 4:13 pm
Location: Helsingborg, Sweden

Re: PowerEvent plugin www

Postby P3rv3rt B3ar on Mon Aug 11, 2008 8:42 am

lar282 wrote:
P3rv3rt B3ar wrote:
lar282 wrote: I use the Run Event. Dont think that exist in the freeware version.



Im pretty sure uve mistaken there.



Then its a good thing.

//Lasse


So does that mean it should work in freelobby? or are there differences in SDK between free and new version?
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Re: PowerEvent plugin www

Postby lar282 on Mon Aug 11, 2008 9:18 am

there is a diff but should work since I do not use any of the SDK features except the one I said.


try it and let me know.
//Lasse
lar282
 
Posts: 1624
Joined: Thu Apr 01, 2004 4:13 pm
Location: Helsingborg, Sweden

Re: PowerEvent plugin www

Postby scottw on Mon Aug 11, 2008 12:33 pm

P3rv3rt B3ar wrote:
lar282 wrote: I use the Run Event. Dont think that exist in the freeware version.



Im pretty sure uve mistaken there.

Yeah Run Event is available in the free version...I use it all the time :D

This looks like a great plugin...thanks for sharing :D
scottw
 
Posts: 774
Joined: Mon Feb 06, 2006 4:21 pm
Location: Glen Burnie, Maryland

Re: PowerEvent plugin www

Postby PhilB on Mon Aug 11, 2008 3:20 pm

XL can wake up in the morning and make coffee!
PhilB
 
Posts: 283
Joined: Sat Feb 18, 2006 6:38 pm

Re: PowerEvent plugin www

Postby lar282 on Mon Aug 11, 2008 8:08 pm

PhilB wrote:XL can wake up in the morning and make coffee!


Now we're talking. Guess I have to unplug one of the X10 modules and hook it up to the coffey machine.

-:)


//Lasse
lar282
 
Posts: 1624
Joined: Thu Apr 01, 2004 4:13 pm
Location: Helsingborg, Sweden

Re: PowerEvent plugin www

Postby m_ski on Mon Sep 01, 2008 11:19 am

lasse,

Looks like a useful plugin to replace some of my girder code.
Does the plugin detect a remote wakeup or just a wakeup with user present (i.e. mouse or keyboard)? I currently have problems to run some stuff when my HTPC is automatically woken up for recording TV.
m_ski
 
Posts: 204
Joined: Wed Dec 08, 2004 7:57 am
Location: Kent, United Kingdom

Re: PowerEvent plugin www

Postby lar282 on Mon Sep 01, 2008 11:48 am

I do not know? Try it and if it doesn't work for u we can fix it!

I use both the powerbutton on the chassi and the remote to wake up my machine, and this works.

PS:Do u have mst installed?:DS

//Lasse
lar282
 
Posts: 1624
Joined: Thu Apr 01, 2004 4:13 pm
Location: Helsingborg, Sweden

Re: PowerEvent plugin www

Postby Marbles_00 on Thu Sep 04, 2008 6:31 am

This plugin is awesome :!: :!:

Before, on resume, with my Mirage skin, I had to manually start Xmenu via button on the remote. Now this takes care of that, which is just incredible.

Only problem I'm having is with that starting overlay. I like the message, but I can't seem to close it. I've tried to mouse to it, no go. I've tried to add events to the AtResume to automatically generic:close overlay (yes I have an event like that), and to run event>generic:close overlay. Nothing seems to work. The other catch is that I'm using a WinLIRC circuit with Girder/XRemote, and it seems that until I kill that overlay, it leaves the remote useless.

I like the message, but is there somehow you could add a variable to use the overlay or not?
Marbles_00
 
Posts: 1867
Joined: Wed Apr 06, 2005 12:44 pm
Location: Canada

Re: PowerEvent plugin www

Postby lar282 on Thu Sep 04, 2008 6:35 am

Marbles_00 wrote:This plugin is awesome :!: :!:

Before, on resume, with my Mirage skin, I had to manually start Xmenu via button on the remote. Now this takes care of that, which is just incredible.

Only problem I'm having is with that starting overlay. I like the message, but I can't seem to close it. I've tried to mouse to it, no go. I've tried to add events to the AtResume to automatically generic:close overlay (yes I have an event like that), and to run event>generic:close overlay. Nothing seems to work. The other catch is that I'm using a WinLIRC circuit with Girder/XRemote, and it seems that until I kill that overlay, it leaves the remote useless.

I like the message, but is there somehow you could add a variable to use the overlay or not?

Thanks Marbles....

You shouldn't close the overlay. It will close automatically when the event is finished. If u set the variable to wait for the event to finish and your event never finish, the overlay will never close. Check the xml file, and change it to no.
<entry name="waitforapp">no</entry>

I will add a variable for the text just for you. Give me a few hours.
EDIT: Hmm, the text is in the overlay screeen powerevent.xml . Just change the text there.:EDIT

regards

//Lasse
lar282
 
Posts: 1624
Joined: Thu Apr 01, 2004 4:13 pm
Location: Helsingborg, Sweden

Re: PowerEvent plugin www

Postby Marbles_00 on Thu Sep 04, 2008 6:50 am

Playing around with it while I was typing the last post, I noticed some things.

Since I couldn't seem to close the overlay, I ended up moving the overlay out of the skin directory. I then went to sleep, and on resume, I noticed that the overlay was still there. This is odd I thought. So I ended up restarting xlobby.

After Xlobby restart, I put the system to sleep. On the subsequent resume, the overlay was no longer there, but I notice a small bar above where the task bar is...as though some program is minimized, so something is still resident, which is leaving my start screen (menu) useless, until I can navigate XMenu to a different screen. Kicker here is that I can't use the remote, but have to use the keyboard to navigate. Once I'm away from the menu screen (closing that resident program), I have remote functionality and everything is fine from there.

***EDIT***
I think I solved the problem. I first used the <entry name="ResumeApplication"></entry> field and placed the XMenu executable location there. This seemed to give me issues.

I then took out that entry, and used the os:execute command to start XMenu, and placed that under AtResume. That seemed to work fine, and I have full control with remote when the system is resumed from sleep. So currently everything is good, I'm just not using the overlay message.

One other thing, the event <entry name="WaitAfterWakeUp">7</entry>, I'm assuming 7 seconds. When exactly does that timer start...right at the initial power up, or when Windows realizes that it is awake, or are you looking for some other system variable or event?
Marbles_00
 
Posts: 1867
Joined: Wed Apr 06, 2005 12:44 pm
Location: Canada

Re: PowerEvent plugin www

Postby Marbles_00 on Thu Sep 04, 2008 6:52 am

Sorry, I noticed you posted in between my posts. I tried to add and update on the fly. I think I'm starting to understand things more now. The way it works is that the plugin was waiting for Xmenu (when I had it entered in the Resume Application section) to finish executing. But that would not happen until I exited the menu screen. I didn't realize that last variable was closely tied to the Resume Application variable.

Hey, no need to add anything, I don't think...now that I'm understanding this more, everything is making sense and it is running fine.

Again, class A+ plugin.
Marbles_00
 
Posts: 1867
Joined: Wed Apr 06, 2005 12:44 pm
Location: Canada

Re: PowerEvent plugin www

Postby lar282 on Thu Sep 04, 2008 6:58 am

I added the overlay there so the wife and kids wouldn't touch the remote until the computer is awaka properly.it should work....

waitafter.. is seconds yes and it starts counting when my plugin realizes that it just woke up. PowerEvents are not really easy so sometimes it misses by a second or so. Check the log file and u will see the events (\log\XPowerPlugin.log)

So it works now? I don't have to do anything?

//Lasse
lar282
 
Posts: 1624
Joined: Thu Apr 01, 2004 4:13 pm
Location: Helsingborg, Sweden

Next