Welcome to SoCo’s documentation!
SoCo (Sonos Controller) is a high level Python 3 library to control your Sonos ® speakers with:
# Import soco and get a SoCo instance
import soco
device = soco.discovery.any_soco()
# Get all albums from the music library that contains the word "Black"
# and add them to the queue
albums = device.music_library.get_albums(search_term='Black')
for album in albums:
print('Added:', album.title)
device.add_to_queue(album)
# Dial up the volume (just a bit) and play
device.volume += 10
device.play()
To get up and running quickly with SoCo, start by reading the getting started page, with installation instructions and a small tutorial and then wet your appetite with the micro examples. Then optionally follow up with any of the advanced topics that pique your interest: Speaker Topologies, Events and UPnP Services. Finally dive into the the full module reference documentation.
If you have a question, start by consulting the FAQ. If your question remains unanswered, post a question in the SoCo/SoCo Gitter chat room or in the SoCo Google group.
If you are interested in participating in the development, plase read the development documentation and file a bug or make a pull request on Github.
Contents
- Getting started
- Examples
- Frequently Asked Questions
- Why can’t I play a URI from music service X with the
play_uri()
method? - Why can’t I add a URI from music service X to the queue with the
add_uri_to_queue()
method? - Can I make my Sonos® speaker play music from my local hard drive with SoCo?
- How can I save, then restore the previous playing Sonos state ?
- Why can’t I play a URI from music service X with the
- Plugins
- Authors
- soco package
- Subpackages
- Submodules
- soco.alarms module
- soco.cache module
- soco.compat module
- soco.config module
- soco.core module
- soco.data_structures module
- soco.discovery module
- soco.events module
- soco.events_base module
- soco.events_twisted module
- soco.exceptions module
- soco.groups module
- soco.ms_data_structures module
- soco.music_library module
- soco.services module
- soco.snapshot module
- soco.soap module
- soco.utils module
- soco.xml module
- SoCo releases
- SoCo 0.21 release notes
- SoCo 0.20 release notes
- SoCo 0.19 release notes
- SoCo 0.18 release notes
- SoCo 0.17 release notes
- SoCo 0.16 release notes
- SoCo 0.15 release notes
- SoCo 0.14 release notes
- SoCo 0.13 release notes
- SoCo 0.12 release notes
- SoCo 0.11.1 release notes
- SoCo 0.11 release notes
- SoCo 0.10 release notes
- SoCo 0.9 release notes
- SoCo 0.8 release notes
- SoCo 0.7 release notes
- SoCo 0.6 release notes