

Query 6: List Songs in a Particular Saved Queue (Playlist) Query 4: See What’s Available to Query System-wide Query 3: See What’s Available to Query In Terms of Searching for Music RequestedCount = 100 (or something high enough to get what you want if the queue is very big consider doing this in several operations) Query 1: Get a Count of What’s in the Queue To get the XML from the Result field to the clipboard place your cursor in the field and CTRL + A to select all. For now you can post the XML in Notepad to get a sense of what it contains. In each query, you fill in the fields as shown and hit Invoke and the results will be in the Result field as XML. The queries end with Query 6 which is what we really want, displaying what’s in a playlist. Step 4: Fill in the parameters in the Browse Action as shown in each query below. Step 3: Open (double click or right Invoke Action) the Browse Action. Step 2: In DeviceSpy, go to a zone master expand the Media Server Device, and expand the Content Directory Service. **update: Maybe easier is to just create a group of one zone and work with that then you are assured it is the master.

The master is the zone you started the zone group with. To start with just put all the zone players in the same zone to make it easy.** the handheld or the iPhone application) the master is the first item in the zone list*. If all your zones are in one group and you look at a Sonos controller (e.g. This approach is discussed here: WPF Application to Save and Import Sonos Playlists.įirst Approach – Manual Step 1: Open DeviceSpy and go to a zone player that is a master. This is a C# program running on Windows 7/8 which can extract one or many playlists. (This may be useful for just capturing what's in a queue in general.) This approach requires some knowledge of how to run a basic Java program. See A Simple Sonos JavaScript and Java Application for details on how to do this. (Code is on GitHub.) You have to specifically load a playlist in a queue to download it. The third approach is a simple Java program that takes the IP address of a Sonos device and then spits out what's in its queue. This approach is discussed below, but only in comparison to the first approach. See A Simple Sonos JavaScript and Java Application for details on how to use this program. (Code is on GitHub.) It requires you to configure your browser so that it can communicate to the Sonos devices (disable same origin policy).

The second approach extracts playlists using JavaScript in a browser page. Second Approach - Javascript in the Browser.(If you need info on DeviceSpy see the Exploring Sonos via UPnP.) This approach is discussed in detail below. The approach requires minimal programming – you work with DeviceSpy (or something equivalent), issue a command, get the returned XML, and transform it. Still later (a year), we developed a WPF application (see WPF Application to Save and Import Sonos Playlists) to extract lists. A reader of the latter blog entry asked the question about generating playlists, and then contributed a Java program which does it (on GitHub). First we showed how to explore your Sonos UPnP topology and then we wrote a simple program using JavaScript to query Sonos (via SOAP requests) to display basic information about what was playing (on GitHub). We’ve written about Sonos a couple of other times in the blog. First, let’s start with a little history.

In this post we’ll talk about some simple ways to do it. (The code on this page was last checked and verified in June 2014.)ĭid you ever want to extract a Sonos playlist so you could share it or keep it for your records outside of Sonos? Well you can.
