PDA

View Full Version : SlimServer Control from CTC


Matty
18 Jul 07, 01:18 PM
Here is some logic code that uses sockets to make a connection to the SlimServer software. This code extracts current album/artist and gives some control of a Squeezebox from HomeGate/CTC.

For more info on SlimServer and SqueezeBox:
www.slimdevices.com

To use this you will first need to enter the constants SqueezeBoxMac, SlimServerIP, SlimServerPort and username/password if used.

The SlimServer command port will need to be changed to 20050. This can be done under the Server Settings, Plugins section of the SlimServer web interface. The port will need to be above 20000 as the CTC firewall only has a certain range that can be opened by the user. The port will need to be opened in the CTC using the network utility in this case I have used port 20050.

Big thanks to NickD for his work on this.

Regards,

Matty

NickD
18 Jul 07, 02:34 PM
Just a note :

This project is far from being a fully functional interface, but it serves as an example of how a more fully featured control of the Squeezebox could be easily implemented in the logic engine.

It was really just a product of Matt's and my own initial experiments to get it running.

Nick

NickLocke
05 Aug 08, 06:45 AM
Guys,

Thanks for the pointers. I have built on your foundation and achieved an interface as shown here:
http://nick.21jubileepark.com/squeezebox.jpg
If anyone wants a copy of the Homegate code etc., just shout.

Nick

ashleigh
05 Aug 08, 09:20 AM
Hey NickLocke, looks very cool indeed. Why not just post the CTD project file and let an openish-sourcish community spring up to bolt on features and enhancements !!!!

NickLocke
05 Aug 08, 09:58 PM
Why not just post the CTD project file and let an openish-sourcish community spring up to bolt on features and enhancements !!!!

Sounds like that could open the flood gates but, hey, why not!

It only searches by Artist (because that's what we always do). So, put in some letters of the artist's name and click Search. The area below the keyboard will show matching artists. Click an artist and the same area will change to show all that artist's tracks. Click a track and it will be inserted as the next track to play in the current playlist. The playlist is shown on the left side (and refreshes every two seconds).

Code wise, I was new to Pascal at the start of this, so am still refining to (eg) pass parameters rather than always using global variables. Lots of error checking still to do. I have tried to use "SS" as a prefix to distinguish from other logic in the same file. You'll see lots of red crosses for missing graphics.

Future plans - use the forthcoming change to how "preset" is handled in HomeGate (http://www.cbusforums.com/forums/showthread.php?t=4431) to show feedback on only the key that has been clicked (at the moment all of the keys where I have put the logic flicker for any key).

Also plan to have some "sub screens" to show some things in more detail. As things stand, I need to do that by making the main screen a theme page. Support for "overlays" or "popups" would be tremendous!!

A way to make buttons "disabled" rather than "still clickable, but do nothing" would be great too - this would need to be able to display a different icon for enabled/disabled (not the same as active/inactive).

I have reported a bug which, sometimes, causes HomeGate to crash when editing SystemIO entries - and it messes up the ones that are already there. Seems to be when an edit is attempted while the logic engine is running - there's no "warning, logic will stop", it just keels over and if you then inadvertantly save, the damage is done.

How about allowing arrays of SystemIO - Playlist(1), Playlist(2) would be much easier to handle (eg within loops) than PlayList1, PlayList2.

Ooops, bit of a wish list there!

All thoughts on the Squeezebox stuff gratefully received.

Nick

nickrusanov
11 Sep 08, 09:09 PM
thank you! =)
very-very good thing to have

Woody
09 Nov 08, 05:14 PM
Cheers Nick these Squeezeboxes are great.

I installed your interface the other day & is working perfectly.
Has anyone improved on it by adding internet radio control.
If I could understand the command set, I would try and give it a go.

Shane :D:D:D