Tutorial¶
SoCo allows you to control your Sonos sound system from a Python program. For a quick start have a look at the example applications that come with the library.
Discovery¶
For discovering the Sonos devices in your network, use the soco.discover()
method.
zones = list(soco.discover())
Music¶
Once one of the available devices is selected, the SoCo
class can be used
to control it. Have a look at the The soco module for all available commands.
sonos = SoCo(ip)
sonos.partymode()