SoCo

Controlling your Sonos speakers from Python and the commandline


Project maintained by the SoCo-Team Hosted on GitHub Pages — Theme by mattgraham

Welcome to SoCo

SoCo (Sonos Controller) lets you control your Sonos speakers from Python or the commandline.

Python example

When using Python, you need the soco package (see GitHub project). Flattr this

import soco
speakers = soco.discover()

# Display a list of speakers
for speaker in speakers:
    print "%s (%s)" % (speaker.player_name, speaker.ip_address)

# Play a speaker
speakers.pop().play()

For all features, have a look at the documentation.

Commandline example

For the commandline interface you need the socos package (see GitHub project). Flattr this

$ socos list
(1) 192.168.0.129 Living room
(2) 192.168.0.130 Bedroom

$ socos play 192.168.0.129

Discuss

If you want to ask questions or start a discussion, you can find us on Google Groups.

Related Projects