Re: [SlimDevices: Plugins] Execute script on server plugin

2010-03-08 Thread cran

bonze;523577 Wrote: 
> Have you tried installing the plugin via the Extensions Downloader?

thanks, that helped! I'm still used to download and unzip plugins
manually so I didn't think of this possibility.


-- 
cran

cran's Profile: http://forums.slimdevices.com/member.php?userid=10961
View this thread: http://forums.slimdevices.com/showthread.php?t=76020

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


Re: [SlimDevices: Plugins] Execute script on server plugin

2010-03-08 Thread bonze

Have you tried installing the plugin via the Extensions Downloader?


-- 
bonze

TranquilPC T2-WHS-A3 - SqueezeCenter Version: 7.5.0 - r30348 embedded
3 x wireless SB3 + a Duet

bonze's Profile: http://forums.slimdevices.com/member.php?userid=6150
View this thread: http://forums.slimdevices.com/showthread.php?t=76020

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


[SlimDevices: Plugins] Execute script on server plugin

2010-03-08 Thread cran

I am looking for a simple plugin that allows to choose from a list of
scripts that can be executed on the server.

The one ("Execute Script Plugin") listed under
http://wiki.slimdevices.com/index.php/PluginServerUtilities seems to be
dead unfortunately.

I would even consider doing it myself if somebody could give me some
hints how to start.


Sebastian


-- 
cran

cran's Profile: http://forums.slimdevices.com/member.php?userid=10961
View this thread: http://forums.slimdevices.com/showthread.php?t=76020

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


Re: [SlimDevices: Plugins] Execute Script

2009-10-05 Thread bluegaspode

danco;466710 Wrote: 
> 
> If Energy Saver works properly, then the machine will sleep after a set
> period if there is no keyboard, mouse, or hard drive activity. That
> means that if I am doing a BBC Listen Again, the machine is likely to
> sleep while I am listening.

SrvPowerControl has a 'while not idle'-option, which can call arbitary
scripts on a regular interval as long as music is playing.

This is how I made my NAS not fall into sleep (which it does when not
receiving WakeOnLan-events regularly).


-- 
bluegaspode

1x SB-Controller+Receiver, 1xSB-Boom. Server running on Linkstation NAS
(LS-CHL).
One radio to come when its available

bluegaspode's Profile: http://forums.slimdevices.com/member.php?userid=31651
View this thread: http://forums.slimdevices.com/showthread.php?t=69121

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


Re: [SlimDevices: Plugins] Execute Script

2009-10-05 Thread kdf
>
> kdf;467213 Wrote:
>> Unfortunately, I no longer make use of any of my plugins.  I have no
>> interest in porting them to fit the newer Squeeplay UI, so eventually
>> they will likely fall into unusable states.
>
> Understood. If you have better things to do, that's fair enough. Maybe
> someone else can port them (though there is the suggestion that
> svrPowerControl may do what I need) as it can be useful in many
> situations to be able to trigger a script.

That's the idea.  I didn't really intend to get into supporting plugins. 
Aside from the Alarm Clock, they were written more to exist as examples
for others as to how to control certain features of the time.

> Yes, all the scripts except Execute on Demand work.

When logging info starts to show up, the reasons might become clearer. 
Perhaps try the server.plugins debugging as well to make sure nothing is
happening during the initial loading.

> There seem to be two issues. One is that when I go into the Execute on
> Demand item and press the Play button it does not execute the script,
> which it used to, unless I am misremembering.

That's what I did to trigger what I attached in my last post.  The script
in my test case simply echos "hello" to the screen.

> The other is the issue with the script not activating when the button
> set in custom.map is pressed. This probably does relate to the IR
> changes. Can you explain this further, so that I can fiddle around with
> things.

https://bugs.slimdevices.com/show_bug.cgi?id=14423

>
> And this info should appear in server.log? Or somewhere else?

server.log.  You won't see the script itself as you do in my case (this
was running from the console), but you do get the messages for
"Executing..."

-k

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


Re: [SlimDevices: Plugins] Execute Script

2009-10-05 Thread danco

kdf;467213 Wrote: 
> Unfortunately, I no longer make use of any of my plugins.  I have no
> interest in porting them to fit the newer Squeeplay UI, so eventually
> they will likely fall into unusable states.

Understood. If you have better things to do, that's fair enough. Maybe
someone else can port them (though there is the suggestion that
svrPowerControl may do what I need) as it can be useful in many
situations to be able to trigger a script.

> However, Execute Script plugin should mostly still work with 7.4.

Yes, all the scripts except Execute on Demand work.

>   I'm certainly seeing logging with plugin.executescript set to DEBUG. 
> As for executing the play script when on_demand is triggered, that may
> be due to the more recent IR changes that follow the heirarchy back to
> the common mode.  

There seem to be two issues. One is that when I go into the Execute on
Demand item and press the Play button it does not execute the script,
which it used to, unless I am misremembering.

The other is the issue with the script not activating when the button
set in custom.map is pressed. This probably does relate to the IR
changes. Can you explain this further, so that I can fiddle around with
things.

> If you add the debug option to your startup, you should at least see
> info 

And this info should appear in server.log? Or somewhere else?


-- 
danco

danco's Profile: http://forums.slimdevices.com/member.php?userid=210
View this thread: http://forums.slimdevices.com/showthread.php?t=69121

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


Re: [SlimDevices: Plugins] Execute Script

2009-10-05 Thread kdf

danco;466454 Wrote: 
> kdf, I was sorry to see that your plugins are marked (in the
> SqueezeCenter repositories) as "legacy plugins, best soon forgotten". I
> find Execute Script pretty much essential for my use and I hope it will
> be maintained.

Unfortunately, I no longer make use of any of my plugins.  I have no
interest in porting them to fit the newer Squeeplay UI, so eventually
they will likely fall into unusable states.

However, Execute Script plugin should mostly still work with 7.4.  I'm
certainly seeing logging with plugin.executescript set to DEBUG.  As for
executing the play script when on_demand is triggered, that may be due
to the more recent IR changes that follow the heirarchy back to the
common mode.  

If you add the debug option to your startup, you should at least see
info about finding the scripts available when you load the settings page
in the web ui.  Here is a sample of my own testing just now on windows
(using 7.4.1 code):

[09-10-05 10:32:08.2425] Plugins::ExecuteScript::Plugin::scriptlist
(183) Execute:found test.bat
[09-10-05 10:32:10.3703]
Plugins::ExecuteScript::Plugin::commandCallbackPlay (245) Execute: Play
Started
[09-10-05 10:32:10.3713] Plugins::ExecuteScript::Plugin::doThisScript
(209) Execute: using server pref
[09-10-05 10:32:10.3720] Plugins::ExecuteScript::Plugin::doThisScript
(219) Execute: No Script Selected
[09-10-05 10:32:11.5987]
Plugins::ExecuteScript::Plugin::commandCallbackPlay (245) Execute: Play
Started
[09-10-05 10:32:11.5996] Plugins::ExecuteScript::Plugin::doThisScript
(209) Execute: using server pref
[09-10-05 10:32:11.6004] Plugins::ExecuteScript::Plugin::doThisScript
(219) Execute: No Script Selected
[09-10-05 10:32:11.9948]
Plugins::ExecuteScript::Plugin::commandCallbackPlay (245) Execute: Play
Started
[09-10-05 10:32:11.9957] Plugins::ExecuteScript::Plugin::doThisScript
(209) Execute: using server pref
[09-10-05 10:32:11.9966] Plugins::ExecuteScript::Plugin::doThisScript
(219) Execute: No Script Selected
[09-10-05 10:32:12.4958]
Plugins::ExecuteScript::Plugin::commandCallbackPlay (245) Execute: Play
Started
[09-10-05 10:32:12.4967] Plugins::ExecuteScript::Plugin::doThisScript
(209) Execute: using server pref
[09-10-05 10:32:12.4975] Plugins::ExecuteScript::Plugin::doThisScript
(219) Execute: No Script Selected
[09-10-05 10:32:13.0774]
Plugins::ExecuteScript::Plugin::commandCallbackPlay (245) Execute: Play
Started
[09-10-05 10:32:13.0783] Plugins::ExecuteScript::Plugin::doThisScript
(209) Execute: using server pref
[09-10-05 10:32:13.0791] Plugins::ExecuteScript::Plugin::doThisScript
(219) Execute: No Script Selected
[09-10-05 10:32:15.1249] Plugins::ExecuteScript::Plugin::__ANON__ (146)
Execute: path: C:\Documents and Settings\All Users\Application
Data\Squeezebox\prefs\scripts
[09-10-05 10:32:15.1258] Plugins::ExecuteScript::Plugin::__ANON__ (147)
Execute: file: C:\Documents and Settings\All Users\Application
Data\Squeezebox\prefs\scripts\test.bat
[09-10-05 10:32:15.1324] Plugins::ExecuteScript::Plugin::__ANON__ (148)
Execute: Executing: C:\Documents and Settings\All Users\Application
Data\Squeezebox\prefs\scripts\test.bat

c:\personal\slim\server>echo Hello
Hello
[09-10-05 10:32:15.1840]
Plugins::ExecuteScript::Plugin::commandCallbackPlay (245) Execute: Play
Started
[09-10-05 10:32:15.1849] Plugins::ExecuteScript::Plugin::doThisScript
(209) Execute: using server pref
[09-10-05 10:32:15.1904] Plugins::ExecuteScript::Plugin::doThisScript
(219) Execute: No Script Selected
[09-10-05 10:33:37.6007] Plugins::ExecuteScript::Plugin::__ANON__ (146)
Execute: path: C:\Documents and Settings\All Users\Application
Data\Squeezebox\prefs\scripts
[09-10-05 10:33:42.9030] Plugins::ExecuteScript::Plugin::__ANON__ (147)
Execute: file: C:\Documents and Settings\All Users\Application
Data\Squeezebox\prefs\scripts\test.bat
[09-10-05 10:33:42.9040] Plugins::ExecuteScript::Plugin::__ANON__ (148)
Execute: Executing: C:\Documents and Settings\All Users\Application
Data\Squeezebox\prefs\scripts\test.bat

c:\personal\slim\server>echo Hello
Hello
[09-10-05 10:33:42.9412]
Plugins::ExecuteScript::Plugin::commandCallbackPlay (245) Execute: Play
Started


---kdf


-- 
kdf

kdf's Profile: http://forums.slimdevices.com/member.php?userid=7
View this thread: http://forums.slimdevices.com/showthread.php?t=69121

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


Re: [SlimDevices: Plugins] Execute Script

2009-10-05 Thread danco

I don't think Energy Saver looks at network activity when deciding
whether or not to sleep (see Apple's  knowledge base articles) though it
may actually wake from sleep if there is networkactivity. And certainly
the other programs that deal with Energy Saver problems only seem to
look at keyboard and mouse activity.

I've tried lots of things at various times, fresh user, disconnecting
any external USB drives and hubs, resetting Power Management. Nothing
worked, and the various threads on Apple discussions and elsewhere do
indicate that there are many different issues involved. I finally
decided it was not worth investigating further, and that using one of
the third-party programs was by far the simplest answer. Unfortunately
all the programs I have tried prevent sleep only when there is mouse or
keyboard activity, not hard drive activity, and certainly not network
activity.

I will certainly keep looking at svrPowerControl and install it when it
is7.4 compatible.


-- 
danco

danco's Profile: http://forums.slimdevices.com/member.php?userid=210
View this thread: http://forums.slimdevices.com/showthread.php?t=69121

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


Re: [SlimDevices: Plugins] Execute Script

2009-10-05 Thread epoch1970

In the cases you describe, OS power management doesn't work properly.
Normally listening to the radio will cause network activity, and the
machine is not idle in this case. Same goes for drive access.
As I recall, my machines PPC, Intel, 10.4, 10.5 never slept to
interrupt a network flow they were serving. I've seen the case you
describe on linux machines, for sure. Actually, I doubt I've seen a
linux machine sleep over drive activity, but everything is possible with
linux :)

Are you streaming from the server, or directly from the players ? Did
you try resetting the firmware on the Mac, or evaluating how it behaves
with a fresh OS (installed on an external drive, for example) ?
Anyway, the newest "busy signal" of srvPowerControl provides a hook to
a script that could "move the mouse" or something. I'm not sure
srvPowerControl tries to read back the output of the script.

The current situation for srvPowerControl as I read it is as such:
- on a well behaved machine, that doesn't sleep when its system is
active somehow, srvPowerControl gives the right order at the right time.
With the desktop login/logout hooks, it will even work appropriately for
Desktop machines. The 3 macs I've had over the last few years all had
"smart enough" activity detection.
- on a machine that is poorly managed by the OS, srvPowerControl works
well for single-purpose servers: remove all PM independent of
srvPowerControl and let it decide alone when to sleep/wake the machine.


For multi-purpose machines (Desktops, audio + file + video server...)
with dubious activity detection at the OS level, either the OS PM or
srvPowerControl will manage to ruin the show.
Personally, I had developed, before srvPowerControl was out, a custom
PM daemon that watches different things on a multi-purpose linux server.
I integrate srvPowerControl mostly as a front-end for user-defined PM
actions in the web GUI and players menus. 
That daemon is a lot of awkward and platform/application specific code,
it performs adequately but is none too smart.

I think the silver bullet is in developing dummy a device driver for
SqueezeBox Server. Receiving power events, the driver could block or let
go OS sleep according to what the SBS wants. I had hopes the new control
panels for SBS would include this on OS X and windows but apparently
that is not the case.
I'm not sure a dummy driver with some sort of  bidirectional link to
SBS is really complex and hard to maintain. But it is platform-dependent
and has to be written in the language of the OS' device toolkit,
probably C or a derivative. 
Volunteers with knowledge of IOKit, D-bus and their Windows equivalent
are needed, first to evaluate this idea. 

Anyway, I invite you to check out the srvPowerControl thread regularly.
I am sure that, sometime, somehow, you'll get your machine to operate as
intended.


-- 
epoch1970

epoch1970's Profile: http://forums.slimdevices.com/member.php?userid=16711
View this thread: http://forums.slimdevices.com/showthread.php?t=69121

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


Re: [SlimDevices: Plugins] Execute Script

2009-10-04 Thread danco

Yes, I downloaded it, looked at the text information, and I think I can
see what to do. I will experiment when the 7.4 version comes out.

If Energy Saver works properly, then the machine will sleep after a set
period if there is no keyboard, mouse, or hard drive activity. That
means that if I am doing a BBC Listen Again, the machine is likely to
sleep while I am listening.

Solution is to run one of the little programs that prevent sleep by for
instance) simulating mouse movement. And a fairly natural thing to do is
to run such a program via Execute Script when I start playing something
and quit it when I stop playing. That's far neater than setting Energy
Saver to never and then setting it back.

Also, many people have found that Energy Saver just does not sleep when
it is supposed to. There seem to be loads of different reasons, and
no-one has got to the bottom of this. So,to ensure my machine sleeps, I
also use a program that forces sleep after the set Energy Saver time.
But the program I use (and others that I have seen) seem to sleep if
there is no keyboard or mouse action, even if there is hard drive
activity. So if I am listening from my music folder, I still need to
turn on a program that prevents sleep.


-- 
danco

danco's Profile: http://forums.slimdevices.com/member.php?userid=210
View this thread: http://forums.slimdevices.com/showthread.php?t=69121

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


Re: [SlimDevices: Plugins] Execute Script

2009-10-04 Thread epoch1970

Have a look at the 1st page of the 'giant thread for srvPowerControl'
(http://forums.slimdevices.com/showthread.php?t=48521) for the latest
info.

Fact is, sudo works in a totally standard way under X 10.5. (and 10.6 I
guess.) 
I had posted in the thread a launchd daemon that runs privileged
commands on behalf of a local Squeezebox Server. nc or telnet to replace
sudo. That was an overkill, but actually I didn't try the sudoers route
beforehand... So the code is there in the thread, just in case. 

Since 99% macs are desktop machines, Gharris999 has included a little
trick that blocks server shutdown commands as long as you're logged in
(uses logon/logout hooks). So the server never shuts down on you when
you have a session and possibly documents open. Logout to the login
window and  srvPowerControl will sleep the mac if the players are
inactive.
The mac is the 1st platform to have this. X11/Gnome desktops should
follow suit I guess.

That's a very nice feature set, IMHO. And since the mac is so reliable
at doing sleep/wake, using the plugin makes a lot of sense on this
platform.

May I ask what other tasks you run via your scripts ?

(I will check 10.6 later, probably around 10.6.2. But I think
Gharris999 has a mac as well.)


-- 
epoch1970

epoch1970's Profile: http://forums.slimdevices.com/member.php?userid=16711
View this thread: http://forums.slimdevices.com/showthread.php?t=69121

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


Re: [SlimDevices: Plugins] Execute Script

2009-10-04 Thread danco

Thanks for that information. On the plugins page (of Community) this
plugin is described as working on Windows and Linux, but if one looks at
the page for this specific plugin one learns that it also works on Mac
OS X, which I had not known.

There might be issues relating to use of 'sudo', as I do not run my Mac
as an admin user, but there should be ways round that.

That would get rid of the need for me to use the Execute on Demand
option of the Execute Script plugin, which is what I currently have
trouble with. I still need the other functions of the script, because of
oddities in the way my Mac behaves, so I do hope it will continue to
work in future versions of Squeezebox Server.


-- 
danco

danco's Profile: http://forums.slimdevices.com/member.php?userid=210
View this thread: http://forums.slimdevices.com/showthread.php?t=69121

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


Re: [SlimDevices: Plugins] Execute Script

2009-10-04 Thread epoch1970

I think you'll soon be happy with the srvPowerControl Plugin when the
author has released a version for 7.4.
This plugin works perfectly well under OS X (10.5 at least). 
It can do a lot more than sleeping the server. It is quite flexible, so
you can run your own scripts when a power management action is to be
taken. Any action can be tied to the "sleep+hold" button IR event. 

The current version does not install on 7.4. That should come within a
few weeks time.


-- 
epoch1970

epoch1970's Profile: http://forums.slimdevices.com/member.php?userid=16711
View this thread: http://forums.slimdevices.com/showthread.php?t=69121

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


[SlimDevices: Plugins] Execute Script

2009-10-04 Thread danco

kdf, I was sorry to see that your plugins are marked (in the
SqueezeCenter repositories) as "legacy plugins, best soon forgotten". I
find Execute Script pretty much essential for my use and I hope it will
be maintained.

I've just moved up to SqueezeBox Server 7.4, with Mac OS 10.6.1, and
have a few issues with it, though it mostly works.

(i) I have evidently forgotten where the log should be found, whether
it should just be part of server.log. Anyway, I have set Execute Script
to show a debug log, but nothing seems to show up in server.log when I
activate one of the scripts.

(ii) I thought that Execute on Demand worked by going to that item,
choosing a script, and pressing Play. As far as I can see (that's why I
wanted the log, to check if what I thought I was seeing was what was
actually happening) doing that in 7.4 does not activate the Execute on
Demand script, but instead activates the Execute on Play File script.

By the way, the main reason I use Execute on Demand is to let me make
my Mac sleep using the SqueezeBox or its remote. There does not seem to
be a plugin that works on Macs to make them sleep, though there is such
a plugin for Windows.  So I created a script to make the Mac sleep, and
used to call it using Execute on Demand.

(iii) This may be related to (ii) above. I had a Custom.map file
defined, which in 7.3 and below let me press the Sleep button on my
remote to activate the Execute on Demand script. The same file, in the
corresponding place for7.4, does not seem to work. Pressing Sleep just
produces the button's default behaviour.


-- 
danco

danco's Profile: http://forums.slimdevices.com/member.php?userid=210
View this thread: http://forums.slimdevices.com/showthread.php?t=69121

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


Re: [SlimDevices: Plugins] Execute Script Plugin- How To Set for Specific Player?

2008-07-12 Thread kdf
you can try usig retrobrowser on the controller.  This applet emuates 
the player ui onthe controller sceen.  I believe it is available from 
the wiki

-kdf
___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


Re: [SlimDevices: Plugins] Execute Script Plugin- How To Set for Specific Player?

2008-07-12 Thread Jayhawk

Thanks, Kevin... was afraid it would be a Duet issue.

I was able to see what Execute Script looks like on a squeezebox
receiver with VFD by using Softsqueeze Squeezebox skin... I now see how
it could be set for an individual receiver other than the one that comes
with Duet.

My problem is that, having only Duet receivers, Execute Script executes
the various tiggers when ANY receiver turns on/off, etc., rather than
when a specific receiver does so, which, for the application I had in
mind, is not useful.

Guess my only option at this point is to request that you modify the
plugin (if possible??) to allow specification of the player in the
SqueezeCenter Execute Script Plugin Settings (as you do for Extended
Alarm).  Doable??


-- 
Jayhawk

Jayhawk's Profile: http://forums.slimdevices.com/member.php?userid=17810
View this thread: http://forums.slimdevices.com/showthread.php?t=49546

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


Re: [SlimDevices: Plugins] Execute Script Plugin- How To Set for Specific Player?

2008-07-11 Thread kdf
>
> I tried looking under Extras having seen that mentioned in other
> posts... there are no entries for any plugins there (I'm running
> Extended Alarm in addition to Execute Script)... the only items listed
> under "Extras" on the remote (Duet)

Duet Controller is not a "remote". Remote refers to the IR device.
There is NO interface for the Controller for either the Extended Alarm or
the Execute Script plugin.  Also, the player UI is what appears on VFD
displays only, so you have no visual feedback in the case of the Duet
Receiver.

-kdf

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


Re: [SlimDevices: Plugins] Execute Script Plugin- How To Set for Specific Player?

2008-07-11 Thread Jayhawk

I tried looking under Extras having seen that mentioned in other
posts... there are no entries for any plugins there (I'm running
Extended Alarm in addition to Execute Script)... the only items listed
under "Extras" on the remote (Duet) are: 1) Information Browser, 2)
Podcasts, and 3) Sounds and Effects.  Even on SqueezeCenter, for either
one of the Players, the only thing listed under "Extras" is the same 3
above plus 4) SoftSqueeze and 5) "Switch to Squeeze Network".

I'm running SqueezeCenter 7.0.1 - Windows XP; two Duet remotes and two
players that came in the Duet package with "Firmware 23".


-- 
Jayhawk

Jayhawk's Profile: http://forums.slimdevices.com/member.php?userid=17810
View this thread: http://forums.slimdevices.com/showthread.php?t=49546

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


Re: [SlimDevices: Plugins] Execute Script Plugin- How To Set for Specific Player?

2008-07-11 Thread kdf
>
> Bump... can anyone help me get to the settings by player for Execute
> Script plugin?

use the remote, and access them through the Extras menu on the player.
-kdf

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


Re: [SlimDevices: Plugins] Execute Script Plugin- How To Set for Specific Player?

2008-07-11 Thread Jayhawk

Bump... can anyone help me get to the settings by player for Execute
Script plugin?


-- 
Jayhawk

Jayhawk's Profile: http://forums.slimdevices.com/member.php?userid=17810
View this thread: http://forums.slimdevices.com/showthread.php?t=49546

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


[SlimDevices: Plugins] Execute Script Plugin- How To Set for Specific Player?

2008-07-05 Thread Jayhawk

>From an earlier post:

> 3. I am confused by this sentence on the web settings page: "Any
> individual player settings will override unless left undefined or
set
> to "(server)"" What does it mean? Is there a setting for each player
> (SB?)?

yes. If you use the player interface to set scripts, then that is the 
setting for that player only. If you choose "(server)" then that sets 
the script to be used according to the server preference set through 
the web interface.



I have two Duet Squeezeboxes and want to execute a script only when one
of them starts to play music.

Where do I find the "player interface to set scripts"?  I am not seeing
on the remote (Duet) settings, or on the Squeeze Center display for a
specific Squeeze Box (Player), any way to set Execute Script settings
by Player.  I can only find Execute Script plugin settings under the
Squeeze Center Plugin and Advanced Tabs, and no way on there to
indicate that the settings are for a specific Player.

I read somewhere on the forum that the plugins would appear under
"Extras" for a specific Player.  Under Extras, I see only Information
Browser, Podcasts, Sounds & Effects, SoftSqueeze, and Switch To
SqueezeNetwork.  No plugin listings... should there be any?


-- 
Jayhawk

Jayhawk's Profile: http://forums.slimdevices.com/member.php?userid=17810
View this thread: http://forums.slimdevices.com/showthread.php?t=49546

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


Re: [SlimDevices: Plugins] Execute script troubles on SC 7.01

2008-05-17 Thread kdf

On 17-May-08, at 7:37 AM, DomLoff wrote:
>
> Can someone explain why the scripts do not work when starting
> normally?
>
do you run as a service or an application?
It may be that the service is not allowed to run outside programs.   
Not really a bad thing when you think about what a system service  
could do if a problem was misbehaving.

> Does this mean due to this bug in the code (somewhere I'll have to
> start squeezecenter from the cmd prompt now?

Again, it's probably the system not allowing the program to run.  The  
code for execute script simply asks the system to run a script.  If  
the system doesn't want to, that's possible.
If it is actually working from the command prompt, then I really can't  
think of anything in the code itself that would be able to do anything  
differently (aside from requiring the scripts to be written in perl,  
then loaded by the plugin as if it were part of the plugin).

-kdf
___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


Re: [SlimDevices: Plugins] Execute script troubles on SC 7.01

2008-05-17 Thread DomLoff

Hi

I've also had problems with the execute script plugin.

I couldn't get the script to execute, but when I started squeezecenter
form the cmd prompt it does work!

Can someone explain why the scripts do not work when starting
normally?

Does this mean due to this bug in the code (somewhere I'll have to
start squeezecenter from the cmd prompt now?

Thanks!

Dom


-- 
DomLoff

DomLoff's Profile: http://forums.slimdevices.com/member.php?userid=17561
View this thread: http://forums.slimdevices.com/showthread.php?t=47087

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


Re: [SlimDevices: Plugins] Execute script troubles on SC 7.01

2008-05-02 Thread danco

Philip Meyer;298141 Wrote: 
> 
> KDF - are there any instructions for your plugin?  I'm wondering if the
> Execute On Demand setting means that there is some remote key bound to
> execute this script (or do I have to configure a custop map button to
> invoke this?).
> 
> I'd like to extend the plugin to include an "On Sleep" event option, if
> SqueezeCenter provides such an event.  i.e. when sleep time hits 0, it
> would invoke the script.  And also if sleep.hold is pressed to manually
> invoke the On Sleep event.
> 
> Phil

The point about Execute on Demand is that one can navigate to it using
the remote Right and UP/Down buttons, and then press Play to execute.
And the scripts for all other events remain unchanged. Before we had
this option, the only way to manually execute a script was to select it
in one of the other options and press Play, and that would change what
happened automatically on that option. (Hope that's clear.)

You need to set up a Custom.map file in the IR folder (wherever that
lives - depends on the OS) to get a remote key to execute the script.

I chose the Sleep button, and my Custom.map reads

[common]
sleep = modefunction_Plugins::ExecuteScript::Plugin->execute_on_demand


I would guess that rather than changing the plugin to allow for On
Sleep, it would be easier to change the script do that the main script
did not run until a timer had occurred.

Does the script you have created work when it is invoked directly?


-- 
danco

danco's Profile: http://forums.slimdevices.com/member.php?userid=210
View this thread: http://forums.slimdevices.com/showthread.php?t=47087

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


Re: [SlimDevices: Plugins] Execute script troubles on SC 7.01

2008-05-02 Thread Phil Meyer
I've been trying to do something similar.

I've created a script, which I have in the correct folder - I can attempt to 
select it in the web UI settings page in the various drop-down lists.

However, when I pick the script and press Apply, it refreshes and says "(none)".

I'm seeing a load of missing string messages in the log, but nothing else.  The 
Web UI settings page looks fine - all text in English.

[20:37:52.3354] Slim::Utils::Strings::string (397) Error: missing string 
SETUP_PLUGIN-EXECUTE-PREF_STOP_DESC
[20:37:52.3361] Slim::Utils::Strings::string (397) Backtrace:

   frame 0: Slim::Utils::Log::logBacktrace 
(P:/Music/SlimServer/trunk/server/Slim/Utils/Strings.pm line 397)
   frame 1: Slim::Utils::Strings::string 
(P:/Music/SlimServer/trunk/server/Slim/Web/HTTP.pm line 2210)
   frame 2: Slim::Web::HTTP::__ANON__ 
(P:\Music\SlimServer\trunk\server\Plugins\ExecuteScript\HTML\EN\plugins\ExecuteScript\settings\basic.html
 line 9)
   frame 3: (eval) 
(P:\Music\SlimServer\trunk\server\Plugins\ExecuteScript\HTML\EN\plugins\ExecuteScript\settings\basic.html
 line 36)
   frame 4: (eval) 
(P:\Music\SlimServer\trunk\server\Plugins\ExecuteScript\HTML\EN\plugins\ExecuteScript\settings\basic.html
 line 7)
   frame 5: Template::Document::__ANON__ 
(P:\Music\SlimServer\trunk\server\CPAN/Template/Document.pm line 155)
   frame 6: (eval) (P:\Music\SlimServer\trunk\server\CPAN/Template/Document.pm 
line 153)
   frame 7: Template::Document::process 
(P:\Music\SlimServer\trunk\server\CPAN/Template/Context.pm line 346)
   frame 8: (eval) (P:\Music\SlimServer\trunk\server\CPAN/Template/Context.pm 
line 320)
   frame 9: Template::Context::process 
(P:/Music/SlimServer/trunk/server/Slim/Web/Template/Context.pm line 40)
   frame 10: Slim::Web::Template::Context::process 
(P:\Music\SlimServer\trunk\server\CPAN/Template/Service.pm line 97)
   frame 11: (eval) (P:\Music\SlimServer\trunk\server\CPAN/Template/Service.pm 
line 94)
   frame 12: Template::Service::process 
(P:\Music\SlimServer\trunk\server\CPAN/Template.pm line 71)
   frame 13: Template::process 
(P:/Music/SlimServer/trunk/server/Slim/Web/HTTP.pm line 2293)
   frame 14: Slim::Web::HTTP::_generateContentFromFile 
(P:/Music/SlimServer/trunk/server/Slim/Web/HTTP.pm line 2246)
   frame 15: Slim::Web::HTTP::filltemplatefile 
(P:/Music/SlimServer/trunk/server/Slim/Web/Settings.pm line 256)
   frame 16: Slim::Web::Settings::handler (Plugins/ExecuteScript/Settings.pm 
line 65)
   frame 17: Plugins::ExecuteScript::Settings::handler 
(P:/Music/SlimServer/trunk/server/Slim/Web/HTTP.pm line 1086)
   frame 18: Slim::Web::HTTP::generateHTTPResponse 
(P:/Music/SlimServer/trunk/server/Slim/Web/HTTP.pm line 938)
   frame 19: Slim::Web::HTTP::processURL 
(P:/Music/SlimServer/trunk/server/Slim/Web/HTTP.pm line 749)
   frame 20: Slim::Web::HTTP::processHTTP 
(P:/Music/SlimServer/trunk/server/Slim/Networking/Select.pm line 243)
   frame 21: (eval) (P:/Music/SlimServer/trunk/server/Slim/Networking/Select.pm 
line 243)
   frame 22: Slim::Networking::Select::select 
(P:\Music\SlimServer\trunk\server\slimserver.pl line 503)
   frame 23: main::idle (P:\Music\SlimServer\trunk\server\slimserver.pl line 
453)
   frame 24: main::main (P:\Music\SlimServer\trunk\server\slimserver.pl line 
1012)


KDF - are there any instructions for your plugin?  I'm wondering if the Execute 
On Demand setting means that there is some remote key bound to execute this 
script (or do I have to configure a custop map button to invoke this?).

I'd like to extend the plugin to include an "On Sleep" event option, if 
SqueezeCenter provides such an event.  i.e. when sleep time hits 0, it would 
invoke the script.  And also if sleep.hold is pressed to manually invoke the On 
Sleep event.

Phil
___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


Re: [SlimDevices: Plugins] Execute script troubles on SC 7.01

2008-05-01 Thread sellars

Running squeezecenter from command line worked. Thanks.


-- 
sellars

sellars's Profile: http://forums.slimdevices.com/member.php?userid=525
View this thread: http://forums.slimdevices.com/showthread.php?t=47087

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


Re: [SlimDevices: Plugins] Execute script troubles on SC 7.01

2008-05-01 Thread sellars

Thanks KDF, I will try that out later.
I forgot to mention that I am running SC under a Windows user account.
That user has log on as service and act as part of the os user rights.
I do see a black DOS window pop up on the server's screen whenever I
execute the script
Anyhow, I'll keep you posted.


-- 
sellars

sellars's Profile: http://forums.slimdevices.com/member.php?userid=525
View this thread: http://forums.slimdevices.com/showthread.php?t=47087

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


Re: [SlimDevices: Plugins] Execute script troubles on SC 7.01

2008-05-01 Thread kdf

Try running SqueezeCenter from a command prompt. Some kinds of error
output will not show in the log, but will when you run it as c:\program
files\squeezecenter\server\squeezecenter.exe

It is working for me on my setup, so I'm not really sure what could be
wrong.  I do know that batch files named without an extension will not
work when the path contains spaces, but I have a .bat and .cmd working.
Hopefully the command line will show something.  Try also adding some sort
of echo output, just in case it's the psshutdown command that simply won't
run when called by SC (perhaps you are running as a service and the
command doesn't like that?)

-kdf

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


[SlimDevices: Plugins] Execute script troubles on SC 7.01

2008-05-01 Thread sellars

Hi,
I am running 

SqueezeCenter Version: 7.0.1 - 17897 - Windows XP - EN - cp1252

and the latest ExecuteScript-Plugin_r41for SC 7.0 (downloaded last
night). I am trying to remotely shut down a machine with psshutdown,
have a script in 
C:\Documents and Settings\All Users\Application
Data\SqueezeCenter\prefs\scripts
called shut.cmd
with the following command:
c:\windows\psshutdown -c -s -n 10 -m "Scqueezecenter" -u *** -p
*** \\evil

It works if I double click on the cmd on the server, but it will not do
it if I execute the script via remote control from the player (pressing
"Play" while having shut.cmd selected)

Please help

Debug log tells me this:


[08-05-01 08:55:36.7231] Plugins::ExecuteScript::Plugin::scriptlist
(185) Execute: loading scripts from C:\Documents and Settings\All
Users\Application Data\SqueezeCenter\prefs\scripts
[08-05-01 08:55:36.7247] Plugins::ExecuteScript::Plugin::scriptlist
(196) Execute:found shut.cmd
[08-05-01 08:55:42.7214] Plugins::ExecuteScript::Plugin::__ANON__ (131)
Execute: path: C:\Documents and Settings\All Users\Application
Data\SqueezeCenter\prefs\scripts
[08-05-01 08:55:42.7220] Plugins::ExecuteScript::Plugin::__ANON__ (132)
Execute: file: C:\Documents and Settings\All Users\Application
Data\SqueezeCenter\prefs\scripts\shut.cmd
[08-05-01 08:55:42.7225] Plugins::ExecuteScript::Plugin::__ANON__ (133)
Execute: Executing: C:\Documents and Settings\All Users\Application
Data\SqueezeCenter\prefs\scripts\shut.cmd
[08-05-01 08:55:42.8051]
Plugins::ExecuteScript::Plugin::commandCallbackPlay (258) Execute: Play
Started
[08-05-01 08:55:42.8062] Plugins::ExecuteScript::Plugin::doThisScript
(222) Execute: using server pref
[08-05-01 08:55:42.8071] Plugins::ExecuteScript::Plugin::doThisScript
(232) Execute: No Script Selected


-- 
sellars

sellars's Profile: http://forums.slimdevices.com/member.php?userid=525
View this thread: http://forums.slimdevices.com/showthread.php?t=47087

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


Re: [SlimDevices: Plugins] Execute Script

2008-03-06 Thread danco

Got it from the link you give.

But I note that the plugins link to www. deane-freeman.com/slimserver/
redirects to a page that ends in list/ rather than list, but is
otherwise the same. I don't know if that is the issue.


-- 
danco

danco's Profile: http://forums.slimdevices.com/member.php?userid=210
View this thread: http://forums.slimdevices.com/showthread.php?t=44267

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


Re: [SlimDevices: Plugins] Execute Script

2008-03-06 Thread kdf

> The requested URL /p/kdfplugins/downloads/list/ was not found on this
> server
>
> A Google issue? Or an error on the Plugins page?

Google problem I expect.  It's accessible from here:
http://code.google.com/p/kdfplugins/downloads/list
-kdf

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


Re: [SlimDevices: Plugins] Execute Script

2008-03-06 Thread danco

I tried to get to the fixed version from the Plugins section a few
minutes ago and got the message

The requested URL /p/kdfplugins/downloads/list/ was not found on this
server

A Google issue? Or an error on the Plugins page?


-- 
danco

danco's Profile: http://forums.slimdevices.com/member.php?userid=210
View this thread: http://forums.slimdevices.com/showthread.php?t=44267

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


Re: [SlimDevices: Plugins] Execute Script

2008-03-06 Thread kdf

On 6-Mar-08, at 3:43 AM, danco wrote:

>
> p0wer_off (second character is a zero, not a letter)

this is a typo, and a fixed version is posted, thanks.
-kdf
___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


[SlimDevices: Plugins] Execute Script

2008-03-06 Thread danco

I was looking at the settings.pm and executescript.prefs files and I
noticed an oddity. 

I don't know if it affects anything, but thought I should mention it.

The migratelines of settings.pm contain a mention of 

p0wer_off (second character is a zero, not a letter)

and this is also in the prefs file.

But later in the settings file we have a mention of 

power_off.

Looks like a misprint to me, but what do I know.

The reason I have been digging so closely into this and other plugin
files is that I find ExecuteScript useful for running scripts on
various events, but - perhaps I just have a blind spot - if I want to
run a script manually I find the user interface horribly unintuitive.

In 6.5 I have been using the ShutDownServer plugin for running a
specific script. I have been trying to get it working for SC 7. But I
don't really know what I am doing, and am largely working in the dark
by analogy with other plugins. At the moment I seem fairly stuck. Maybe
someone else would feel like updating ShutdownServer. It seems to be no
longer available, but I have a copy if anyone wants to try.


-- 
danco

danco's Profile: http://forums.slimdevices.com/member.php?userid=210
View this thread: http://forums.slimdevices.com/showthread.php?t=44267

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


Re: [SlimDevices: Plugins] Execute Script not working

2006-08-10 Thread kdf


On 10-Aug-06, at 8:55 AM, danco wrote:



I know that Execute Script used to work for me, but recently it fails.
It sees the script I want to run, says it is running the script, but
nothing happens on my computer.

right after it says it's running, the plugin makes a system call to run 
the script.
there is nothing to debug there.  check that the slimserver user has 
permission to run the script, try running slimserver manually in 
terminal so that you might see any shell messages that come back from 
trying to run the script, etc.


I'll see if I can add some trapping of any errors that come back from 
the system call.

-kdf

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


[SlimDevices: Plugins] Execute Script not working

2006-08-10 Thread danco

I know that Execute Script used to work for me, but recently it fails.
It sees the script I want to run, says it is running the script, but
nothing happens on my computer.

I've tested the script running it on my computer (and even created
another script for testing), and there's nothing wrong with the shell
scripts.

Mac OS 10.4.7, SlimServer 6.3.1, and the current Execute Script (1.7).

I'm not sure when it stopped working, presumably at one of the upgrades
of either SlimServer or Mac OS.

Any ideas, or advice on what switches to use for debugging, would be
welcome.


-- 
danco

danco's Profile: http://forums.slimdevices.com/member.php?userid=210
View this thread: http://forums.slimdevices.com/showthread.php?t=26279

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


Re: [SlimDevices: Plugins] Execute Script plugin

2006-02-24 Thread kdf

Quoting danco <[EMAIL PROTECTED]>:



By the way, the description in Execute.pm still claims it to be 1.0,
even on the latest version.


ignore that.  it's $VERSION that matters:
$VERSION = substr(q$Revision: 1.12 $,10);

-k
___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


[SlimDevices: Plugins] Execute Script plugin

2006-02-24 Thread danco

This is a bit of a weirdy, as I can't think of any changes I have made
that could be relevant. But my script (to make my computer sleep) has
suddenly stopped working, though it used to work fine.

The script is ok, it runs fine from my computer. But if I try to run it
from my SB, it appears to run (it shows "running script ...") but does
not make my computer sleep.

I have double-checked that the script is executable for all users.

Mac OS 10.4.4, SlimServer 6.2.1.

By the way, the description in Execute.pm still claims it to be 1.0,
even on the latest version.


-- 
danco

danco's Profile: http://forums.slimdevices.com/member.php?userid=210
View this thread: http://forums.slimdevices.com/showthread.php?t=21444

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


Re: [SlimDevices: Plugins] Execute Script Functionality

2006-01-23 Thread Kevin Deane-Freeman

jonheal wrote:

Kevin,

Is it possible to run a script on the POWER OFF event with Execute
Script?

  
I've posted v1.12 for 6.5 builds that should now have the added feature 
of tracking power off.


-kdf
___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


Re: [SlimDevices: Plugins] Execute Script Functionality

2006-01-23 Thread kdf

Quoting jonheal <[EMAIL PROTECTED]>:



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
___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


[SlimDevices: Plugins] Execute Script Functionality

2006-01-23 Thread jonheal

Kevin,

Is it possible to run a script on the POWER OFF event with Execute
Script?


-- 
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
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


Re: [SlimDevices: Plugins] Execute Script plugin

2005-11-03 Thread kdf

Quoting danco <[EMAIL PROTECTED]>:



I am looking at the Execute Script plugin, and trying to understand it,
with only a vague understanding of perl.

I think it could do with a bit more documentation.  Specifically,

1. What precisely is the defualt location for the scripts?


see line32.
$Bin is where slimserver.pl or slim.exe is executed from 
(/usr/local/slimserver,

c:\program files\slimserver\server\, etc)
for mac, it's ~/Library/SlimDevices/scripts


2. If one wants to change this location (say to
/mydisk/myfolder/mysubfolder) how does one do it?


change line 32, or if you are on a mac: line 35 so say:
$scriptpath = '/mydisk/myfolder/mysubfolder';



3. What's the situation with a Mac? The syntax seems more complicated,
but I'm not at all sure that following this syntax is the way to go. It
might be simpler just to put the scripts in a conveient folder.


it was a provided patch, since I dont run the server on a mac and that
particular user didn't seem to like the idea of having the path related to the
location os slimserver.pl

-k
___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


[SlimDevices: Plugins] Execute Script plugin

2005-11-03 Thread danco

I am looking at the Execute Script plugin, and trying to understand it,
with only a vague understanding of perl.

I think it could do with a bit more documentation.  Specifically,

1. What precisely is the defualt location for the scripts?

2. If one wants to change this location (say to
/mydisk/myfolder/mysubfolder) how does one do it?

3. What's the situation with a Mac? The syntax seems more complicated,
but I'm not at all sure that following this syntax is the way to go. It
might be simpler just to put the scripts in a conveient folder.


-- 
danco
___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins