kdf Wrote: 
> Quoting jonheal <jonheal.223jtb (AT) no-mx (DOT)
> forums.slimdevices.com>:
> 
> >
> > Kevin,
> >
> > Is it possible to run a script on the POWER OFF event with Execute
> > Script?
> 
> nto at this time, but it could be modified.  If you are using 6.2.1 or
> 
> any of the 6.2.2 builds, you could turn power on into power oss just by
> 
> changing line 341 to:
> 
> elsif (($paramOne eq "power_toggle") && 
> !Slim::Utils::Prefs::clientGet($client, 'power')) {
> 
> Then you just have to remember that power on, really means power off
> :)
> 
> If you use 6.5, then there is a new version but the CLI has changed a 
> fair bit.  The event covers "power_toggle" as a command, but not the 
> 'power' command.  It will need some rewriting, including the proper 
> song start event.
> 
> manual running of scripts should be unaffected.
> 
> -kdf
Kevin,

I'm not really a PERL guy, but based on the snippet you provided above,
I added bits to the Execute.pm script for 6.2.x to fire on both the
POWER ON and POWER OFF events. It seems to work. I'm using it to send
messages to a CM11A OXC, which in turn sends commands to an X-10 module
that turns my amp on and off when I turn the SqueezeBox on and off.

Keep or discard the changes as you see fit.

Best Regards,
Jon


+-------------------------------------------------------------------+
|Filename: Execute.pm                                               |
|Download: http://forums.slimdevices.com/attachment.php?attachmentid=792|
+-------------------------------------------------------------------+

-- 
jonheal

Jon Heal says:
Have a nice day!
http://www.theheals.org/
------------------------------------------------------------------------
jonheal's Profile: http://forums.slimdevices.com/member.php?userid=2133
View this thread: http://forums.slimdevices.com/showthread.php?t=20336

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins

Reply via email to