Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How To: Logitech Squeeze Center Driver
#1
Getting Started

Before attempting to do anything with CQC, you need to install the SqueezeCenter server:

http://www.logitechsqueezebox.com/suppor...enter.html

After this, you need to get a player installed and music scanned into the SC database.

If you are installing a SB receiver by itself (no controller), see this How-To thread: http://www.charmedquark.com/vb_forum/sho...php?t=8392

It is best to verify that everything works within SC (you see your music, coverart, etc and can play on the installed player) before installing the CQC driver. This will eliminate questions about where problems lie.
Reply
#2
Driver Basics

The database portion of the driver handles 4 basic lists of information: albums, artists, tracks, and genres.

These lists are exposed as Stringlist fields named (surprisingly) Albums, Artists, Tracks, and Genres.

At driver load time, if the 'Use Database' box was checked at driver install, each of these stringLists is populated from the SqueezeCenter server. Along with each list is field with the count of the number of items in the list: AlbumCount, ArtistCount, TrackCount, and GenreCount.

The lists are loaded 20 items at a time - the first 20 items load along with the item count immediately and the rest of the list is populated in the background until all items have been loaded. The track list is only initially loaded with the tracks from the first album in the album list since that list could be huge if filled with all tracks in the database and there usually isn't a need to get all tracks at one time.

To get specific info about a list item, there are 4 fields to request the details about a list entry: RefreshAlbumInfo, RefreshArtistInfo, RefreshTrackInfo, and RefreshGenreInfo. These fields take a zero based index into its respective list as an argument. For example, if you have the list of tracks for an album, then doing a RefreshTrackInfo with index 0 will fill in TrackTitle, TrackAlbum, TrackArtist, TrackAlbumArtworkURL, TrackDuration, TrackYear, and TrackCookie, for the first track in the Tracks list. The Cookie fields may be used directly as arguments to PlayMedia, EnqueueMedia, and AddFavorite. A TrackCookie passed to PlayMedia plays that track, an album cookie plays all tracks in that album, an artist cookie plays all tracks by that artist, and a Genre cookie plays all tracks in that Genre.

Each of the lists may be filtered by the other lists. For example, tracks may be filtered by artist, and/or album, and/or genre. To filter the tracks list by a given album, set the TrackAlbumFilter to the index of the Album in the Album list you which to filter by. For example, to get the Tracks for the first Album in the Albums list, set the TrackAlbumFilter to 0 and then set the RefreshDatabase field to Track. The tracks list will now contain the list of the tracks of the first album. To get all albums for an artist, set the AlbumArtistFilter field to the index of the artist in the artist that you want the albums for. Set the ClearFilters field to All, Album, Artist, Track, or Genre to clear the filters for all lists or a specific list. A RefreshDatabase is then required to get the unfiltered list(s).

Additionally, each list may be filtered by a search criteria using the search filters available on each list. The fields AlbumSearchFilter, ArtistSearchFilter, TrackSearchFilter, and GenreSearchFilter may be set to a string to further qualify the associated list contents. For example, setting AlbumSearchFilter to "Th" and doing a RefreshDatabase(Album) would result in the Albums list containing all albums that contained a word starting with "Th". These filters may be combined with any of the other list filters to narrow the category lists.

Artwork

Album artwork is available via a http request from the SqueezeCenter server. The detail information for albums and tracks contains fields for the artwork urls. Until CQC has a url image widget, you have to use a web widget to display the artwork. I've built a parametrized html page that will display the artwork. Here is the source code for the page:

Code:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<script type="text/javascript">
var parameters = new Array();

function getParameters()
{
    var query = window.location.search.substring(1);
    var parms = query.split('&');
    for (var i=0; i<parms.length; i++)
    {
        var pos = parms[i].indexOf('=');
        if (pos > 0)
        {
            var key = parms[i].substring(0,pos);
            var val = parms[i].substring(pos+1);
            parameters[key] = val;
        }
    }
}
parameters['url']='';
parameters['width']='200';
parameters['height']='200';
getParameters();
</script>
</head>


<BODY leftMargin="0" topMargin="0" scroll="no" border="0" marginheight="0" marginwidth="0">
<script>document.write('<img src="'+parameters['url']+'" width="'+parameters['width']+'" height="'+parameters['height']+'" border="0">')</script>
</body>
</html>

Copy the above html source and save into a file called image.html and place that file in your htmlroot directory. On the web widget, you then set the url to: image.html?width=<widgetwidth>&height=<widgetheight>&url=<urlfield> where <widgetwidth> and <widgetheight> are the width and height of your web widget and <urlfield> is the value of the album or track artwork url field. There is a unique url for each album's artwork, so you have to set the URL on the web widget each time you select a new album or track and want the artwork to update.

Search

The Search field takes a search string and returns a Stringlist of search results in the... wait for it... SearchResults field. The results are separated into categories of Album, Artist, Genre, and Track. A write to the RefreshSearchInfo field with an index into the search results will fill in the SearchType, SearchCookie, and SearchIndex for the selected SearchResult along with the info that is appropriate for the type of result.

The SearchCookie can be direcly used with PlayMedia, EnqueueMedia, or AddFavorite.

The SearchType field returns one of Album, Artist, Track, Genre, Track, or None. You can use the SearchType contents to know which info to look at for a given result and what type of template to use to drill down into the results.

SearchIndex is the index into the list where the item resides. The list that the index refers to is indicated by the SearchType field. For example, if SearchType is Album and the index is 27, then the selected result is at index 27 in the Albums list. Note that the index refers to the unfiltered list index of all types except Tracks which only contains the tracks that match the search string.

Some of the stringlist entries contain headings that are used to categorize the results. A RefreshSearchInfo with the index of a heading will return a SearchType of None. These heading names may be changed via the SearchResultsHeadings fields if they need to be translated to another language or you want them to say something else. The SearchResultsHeadings field takes a comma separated list of strings in Album,Artist,Track,Genre format.

Playlists

The driver has new capabilities to manipulate current and saved playlists.

Writing to the SavePlaylist field with a playlist name as the argument will save the current playlist in the player as a saved playlist. Saved playlists can be removed by writing to the RemovePlaylist field with the index of the playlist in the Playlists field as the parameter.

The tracks for a saved playlist may be retrieved by using the TrackPlaylistFilter. This works like other filters except that it overrides all of the other filters that may be in effect for the tracks list. Set the TrackPlaylistFilter to the index of the playlist in the Playlists field for which you wish to get the tracks. A RefreshDatabase(Tracks) will then populate the Tracks list with the tracks for that playlist.

The details (Title, Album, Artist, Duration, etc) for each of these tracks are accessed in the same way as any other track in the track list: write to RefreshTrackInfo with the index of the track you would like details for.

Tracks in the playlist may be moved up or down by writing to the TrackMoveUp and TrackMoveDown fields with the index of the track to move. Tracks may be removed from the playlist by writing to the TrackRemove field with the track index. These fields only work on a track list that has been filtered by playlist.

Track details for the current player playlist may be accessed by writing to the RefreshPlaylistInfo field with the index of the track in the playlist. The detail information appears in the fields PlaylistTitle, PlaylistAlbum, PlaylistArtist, PlaylistYear, PlaylistDuration, and PlaylistAlbumArtworkURL.
Reply
#3
Screenshots


[Image: genres.JPG]

Genres template - select Rock and we get a list of Rock Artists:

[Image: artists.JPG]

Select 'Aerosmith' and we get a list of all Aerosmith albums:

[Image: albums.JPG]

Select 'Get A Grip' and get a list of the album tracks:

[Image: tracks.JPG]

The Red arrow takes you back to the previous screen, you can click twice on an item in the list or click the green star to go to the next level.

Select 'Search' and the keyboard pops out.

[Image: search.JPG]

Type 'wet' and get the results:

[Image: searchresults.JPG]

Albums, Artists, Genres, and Tracks matching the search criteria appear in the list.
You can play, enqueue, or favorite any of those items directly or drill down.
For example, drilling down into an 'Album' entry will bring up the tracks for that album.

The driver will now support viewing and modifying playlist details - you can delete tracks and move tracks up and down in the playlist.

[Image: playlisttracks.JPG]
Reply
#4
here's the link to the CQC User Group Webinar where jkish walked us through it. Right now it's both the Logitech walkthrough and some other stuff, once I get the split working right, i'll cut out the extraneous stuff and post just the Logitech webinar here.

BTW jkish, any chance of getting you to export those templates and uploading them? If you've never done that, it's via the Interface Editor, one of the options is something like 'export template pack'. You have to do it one template at a time, unfortunately, but you can zip them all up together to upload it. I can put that up on http://www.myhometheaterpc.com/downloads if the filesize is too big for an attachment and you have no other location.
------------------------------------
Devices I can't stand and wish I could replace: SmartThings, Hue, Concerto, VRUSB
My vlogs: https://www.youtube.com/c/IVBsHomeAutomation
Reply
#5
IVB Wrote:here's the link to the CQC User Group Webinar where jkish walked us through it. Right now it's both the Logitech walkthrough and some other stuff, once I get the split working right, i'll cut out the extraneous stuff and post just the Logitech webinar here.

BTW jkish, any chance of getting you to export those templates and uploading them? If you've never done that, it's via the Interface Editor, one of the options is something like 'export template pack'. You have to do it one template at a time, unfortunately, but you can zip them all up together to upload it. I can put that up on http://www.myhometheaterpc.com/downloads if the filesize is too big for an attachment and you have no other location.

Yep, they are coming...

I guess I have to figure out the images that are used in the templates as well and make an image pack or something like that.
Reply
#6
jkish Wrote:Yep, they are coming...

I guess I have to figure out the images that are used in the templates as well and make an image pack or something like that.

No need, if you make a template pack, the images are automatically included.
------------------------------------
Devices I can't stand and wish I could replace: SmartThings, Hue, Concerto, VRUSB
My vlogs: https://www.youtube.com/c/IVBsHomeAutomation
Reply
#7
Templates

Here's a basic set of templates that correspond to the screenshots above.

If nothing else, they should serve as a starting point for understanding by example how to interact with the driver to produce various results.

The keyboard template is based on Mikla's very nice work.

You will need to install these fonts: http://blog.guifx.com/2009/04/02/guifx-v...port-font/

Several actions contain references to Variable driver fields.

To get up and running, create a Variables driver with the moniker 'Variables' and define the following string fields:

CurrentOverlay
Message
Music-PlaylistMode
Music-Type

For Music-Type, set it to a default of Albums.
For Music-PlaylistMode, set to 2 for Jukebox

This should allow the templates to open and then you can remove/change the templates so they don't depend on these fields.

The templates assume that the SqueezeCenter driver is named Audio1 and the artwork html file is name image.html.

I'm sure I've probably left something out...

EDIT: Updated template set to include Radio, RadioIO, Pandora, and NowPlaying. Also fixed missing image on other templates.


Attached Files
.zip   Keyboard.zip (Size: 58.68 KB / Downloads: 61)
.zip   Templates.zip (Size: 53.67 KB / Downloads: 62)
Reply
#8
Sorry in advance if this question has an obvious answer, but I'm wondering about the ability to control multiple Squeezebox Receivers. Does there need to be one driver per hardware receiver or can the one driver be told which player to use? Since the driver talks to Squeezecenter and there's only one Squeezecenter it seems like one driver would be sufficient.

Mike
Reply
#9
MikeW Wrote:Sorry in advance if this question has an obvious answer, but I'm wondering about the ability to control multiple Squeezebox Receivers. Does there need to be one driver per hardware receiver or can the one driver be told which player to use? Since the driver talks to Squeezecenter and there's only one Squeezecenter it seems like one driver would be sufficient.

Mike

You install multiple instances of the driver if you have multiple players.

When you install the driver, you give it the address of the player that it is controlling as well as the address of the SC server.
Reply
#10
jkish Wrote:You install multiple instances of the driver if you have multiple players.

When you install the driver, you give it the address of the player that it is controlling as well as the address of the SC server.

OK, great. I think I'm in the same boat as others, but I used to run softsqueeze, but due to it's reliability I was not happy with it. I bought a Squeezebox Duet yesterday and today I'm going to order an extra Squeezebox Receiver. If this all works like I think it will I'll end up with four receivers (players). The wife's not too happy about the cost, but after I installed iPeng on the iPhone and showed it to her she was sold.

Thanks for the great work!

Mike
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  How To - Configure MyMovies Driver on Windows 7 x64 wuench 18 14,254 10-10-2016, 09:05 AM
Last Post: MikeA
  How to diagnose a runaway driver issue Dean Roddey 4 4,991 05-22-2013, 04:33 AM
Last Post: DaveAlvarado
  How to get the DataLogdb driver up and running Zanthic 20 19,627 01-17-2013, 03:20 PM
Last Post: Dean Roddey
  How To: Install Logitech Squeezebox Receiver without Controller (WinXP) Deephaven 13 68,140 08-01-2010, 11:02 AM
Last Post: SamVimes2
  How to setup the Weather Channel data feed driver. beelzerob 3 12,613 05-24-2010, 04:39 PM
Last Post: Dean Roddey
  HP T5720 as Multi-zone Player for Squeeze Center + GrandConcerto bjkiller 0 7,694 09-04-2009, 08:59 AM
Last Post: bjkiller
  Get Album Art Working with J. River Repository Driver Squiddy 0 5,765 11-23-2008, 06:15 PM
Last Post: Squiddy

Forum Jump:


Users browsing this thread: 1 Guest(s)