SoCo 0.8 release notes
New Features
Re-added support for Python 2.6 (#154)
Added
SoCo.get_sonos_playlists()(#114)Added methods for working with speaker topology
soco.SoCo.groupretrieves thesoco.groups.ZoneGroupto which the speaker belongs (#132). The group itself has asoco.groups.ZoneGroup.memberattribute returning all of its members. Iterating directly over the group is possible as well.Speakers can be grouped using
soco.SoCo.join()(#136):z1 = SoCo('192.168.1.101') z2 = SoCo('192.168.1.102') z1.join(z2)
soco.SoCo.all_zonesandsoco.SoCo.visible_zonesreturn all and all visible zones, respectively.
soco.SoCo.is_bridgeindicates if theSoCoinstance represents a bridge.
soco.SoCo.is_coordinatorindicates if theSoCoinstance is a group coordinator (#166)
A new
soco.plugins.spotify.Spotifyplugin allows querying and playing the Spotify music catalogue (#119):from soco.plugins.spotify import Spotify from soco.plugins.spotify import SpotifyTrack # create a new plugin, pass the soco instance to it myplugin = Spotify(device) print 'index: ' + str(myplugin.add_track_to_queue(SpotifyTrack(' spotify:track:20DfkHC5grnKNJCzZQB6KC'))) print 'index: ' + str(myplugin.add_album_to_queue(SpotifyAlbum(' spotify:album:6a50SaJpvdWDp13t0wUcPU')))
A
soco.data_structures.URIitem can be passed toadd_to_queuewhich allows playing music from arbitrary URIs (#147)import soco from soco.data_structures import URI soc = soco.SoCo('...ip_address...') uri = URI('http://www.noiseaddicts.com/samples/17.mp3') soc.add_to_queue(uri)
A new
include_invisibleparameter tosoco.discover()can be used to retrieve invisible speakers or bridges (#146)A new
timeoutparameter tosoco.discover(). If no zones are found withintimeoutsecondsNoneis returned. (#146)Network requests can be cached for better performance (#131).
It is now possible to subscribe to events of a service using its
subscribe()method, which returns aSubscriptionobject. To unsubscribe, call theunsubscribemethod on the returned object. (#121, #130)Support for reading and setting crossfade (#165)
Improvements
Performance improvements for speaker discovery (#146)
Various improvements to the Wimp plugin (#140).
Test coverage tracking using coveralls.io (#163)