Skip to main content

Some extra useful commands for Sonos systems, based on SoCo.

Project description

Latest PyPI version

Some extra useful commands for Sonos systems, based on SoCo.

Usage

Simple example:

from sonos_extras import SonosExtras
client = SonosExtras("192.168.1.10") # replace with your speaker's IP
client.get_current_track_info()

Methods

stop_after() : stops after the current track is finished

Command Line Interface

SonosExtrasCLI is a shell command line interface that is added automatically upon installation of the module.:

usage: SonosExtrasCLI [-h] [-i SPEAKER_IP]
                    {version,ver,current,c,queue,q,play,p,pause,stop,s,stop_after,sa,playlists,pls,volume,v,line_in,li,resume_queue,rq}
                    ...

optional arguments:
-h, --help            show this help message and exit
-i SPEAKER_IP, --speaker-ip SPEAKER_IP
                        IP of the speaker to connect to. Also can be set as
                        SONOS_EXTRAS_IP environment variable

sub-commands:
Valid sub-commands. Use -h for each sub-commands to get detailed help.

{version,ver,current,c,queue,q,play,p,pause,stop,s,stop_after,sa,playlists,pls,volume,v,line_in,li,resume_queue,rq}
    version (ver)       Print the current version.
    current (c)         Print the current status, and playback item, if
                        available.
    queue (q)           Print the current queue.
    play (p)            Play.
    pause (p)           Pause.
    stop (s)            Stop.
    stop_after (sa)     Stop after the current track.
    playlists (pls)     List sonos playlists.
    volume (v)          Get/set the volume
    line_in (li)        Select LineIn for playback.
    resume_queue (rq)   Resume playback from the given index of the current
                        queue.

Installation

pip install sonos-extras

Requirements

python 3.6

Compatibility

Python 3.6

Licence

The MIT License (MIT)

Copyright (c) 2019 MaziarA

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Authors

sonos_extras was written by MaziarA.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for sonos-extras, version 0.1.15
Filename, size File type Python version Upload date Hashes
Filename, size sonos_extras-0.1.15-py3-none-any.whl (9.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size sonos_extras-0.1.15.tar.gz (9.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page