SlimServer Control from CTC

Discussion in 'Pascal Logic Code Examples' started by Matty, Jul 18, 2007.

  1. Matty

    Matty

    Joined:
    Oct 15, 2004
    Messages:
    131
    Likes Received:
    0
    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
     

    Attached Files:

    Matty, Jul 18, 2007
    #1
  2. Matty

    NickD Moderator

    Joined:
    Nov 1, 2004
    Messages:
    1,420
    Likes Received:
    62
    Location:
    Adelaide
    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
     
    NickD, Jul 18, 2007
    #2
  3. Matty

    NickLocke

    Joined:
    Oct 27, 2004
    Messages:
    141
    Likes Received:
    0
    Moving on

    Guys,

    Thanks for the pointers. I have built on your foundation and achieved an interface as shown here:
    [​IMG]
    If anyone wants a copy of the Homegate code etc., just shout.

    Nick
     
    NickLocke, Aug 4, 2008
    #3
  4. Matty

    ashleigh Moderator

    Joined:
    Aug 4, 2004
    Messages:
    2,392
    Likes Received:
    24
    Location:
    Adelaide, South Australia
    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 !!!!
     
    ashleigh, Aug 4, 2008
    #4
  5. Matty

    NickLocke

    Joined:
    Oct 27, 2004
    Messages:
    141
    Likes Received:
    0
    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 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
     

    Attached Files:

    NickLocke, Aug 5, 2008
    #5
  6. Matty

    nickrusanov

    Joined:
    Aug 5, 2004
    Messages:
    308
    Likes Received:
    0
    Location:
    russia
    thank you! =)
    very-very good thing to have
     
    nickrusanov, Sep 11, 2008
    #6
  7. Matty

    Woody

    Joined:
    Nov 19, 2006
    Messages:
    40
    Likes Received:
    0
    Location:
    Adelaide Hills
    CTC Squeezebox control

    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
     
    Woody, Nov 9, 2008
    #7
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.