PDA

View Full Version : beginner help



andy176822
2009-09-17, 11:53
Hi,

Just need a pointer in the correct direction.

I would like to create an application that can query squeeze center and find out the following:

Is slim server running?
How many clients are connected.
Whay they are playing.

Is there any interface that I could use to create this application. I want it to be stand alone and not part of squeeze center.

Hoping to use .net.

Any help would be great.

Thanks in advance :)

iPhone
2009-09-17, 12:15
Hi,

Just need a pointer in the correct direction.

I would like to create an application that can query squeeze center and find out the following:

Is slim server running?
How many clients are connected.
Whay they are playing.

Is there any interface that I could use to create this application. I want it to be stand alone and not part of squeeze center.

Hoping to use .net.

Any help would be great.

Thanks in advance :)

Hello and Welcome to the Forum.

Maybe I am not following what you are trying to do, but if SqueezeCenter is not running because you want this to be stand alone, what are you going to Query to get the information? And if SC is running, why not just get the info there when you need it or with a Controller or iPeng on an Apple device?

Could we get more information as to what you are doing and why you want or need to do it?

radish
2009-09-17, 13:32
I wrote a basic .NET wrapper for the SC CLI, it's called SlimSliLib and you can get it as part of a remote control app called WinSlim here: http://www.adamreeve.com/software/

One of these days I'll get around to posting the source, if you need it drop me a pm.

andy176822
2009-09-17, 15:41
Could we get more information as to what you are doing and why you want or need to do it?

The setup is a follows:

My father had a PC running slim server with numerous squeezeboxes around the house.

The house has nothing else installed to get fast bootup (less then 30 seconds).

when a squeezebox is turned on, the wake-on-lan turns the PC on and boots up.

I wrote an app a few years back that simply listened for activity on the slim server process. if there was no activity for a certain amount of time it would shut down the PC.

Since upgrading slim server to squeeze center, my application has stopped working so I need to write a new one/fix it. It probably just can't find the process name (hardcoded) which I can easily fix.

But I was hoping for a more sophisticated solution where I could tell whether there was 0 connections to squeeze center rather then just waiting for activity.

This help?

Thanks

epoch1970
2009-09-18, 01:57
You could check for the perl scripts I've posted in the (huge) srvPowerControl thread in 3rd party plugin forum.
I (try to) use perl and CLI, I don't know the plugin framework. I have posted a script that looks for players alarms; it discovers players and get their status among other things. I have posted more recently an inetd power helper for the mac os X platform: it starts by trying to discover if an SC instance is running, and find a CLI port to connect to.
I also have something that looks for the player status when it is on SN, using JSON.

Perhaps you want to search that thread? Let me know if you can't find the scripts, I'll give you more precise pointers.

HTH
(and in case you read some of this code, excuse my French :)