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

Use SonosExtrasCLI as a shell command:

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

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

Installation

pip install sonos-extras

Requirements

python 3.8

Compatibility

Python 3.8

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.

Source Distribution

sonos_extras-0.1.20.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sonos_extras-0.1.20-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file sonos_extras-0.1.20.tar.gz.

File metadata

  • Download URL: sonos_extras-0.1.20.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/57.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.8.11

File hashes

Hashes for sonos_extras-0.1.20.tar.gz
Algorithm Hash digest
SHA256 b5e3b92ee25890deb56fe28eaeb983f5efea4a1ffa5c713957e10a56aae700a4
MD5 8ea30031b0233be34c3bc06953be9e07
BLAKE2b-256 59821f07ccf6c893c7bb07a18dc00df68f19516f5410439999dc5174f4f9fad0

See more details on using hashes here.

File details

Details for the file sonos_extras-0.1.20-py3-none-any.whl.

File metadata

  • Download URL: sonos_extras-0.1.20-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/57.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.8.11

File hashes

Hashes for sonos_extras-0.1.20-py3-none-any.whl
Algorithm Hash digest
SHA256 efaa93e436e1e5894a38ea0be3aaa3fbef947f08365ebb2ebf679545bdfa23d8
MD5 5b36ed0986f8bbb9a853a63a63e9ad90
BLAKE2b-256 c12959e44435d5e13ca2cce405fcbb6e39681a01fc1cff1f36deac925950b847

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page