Skip to main content

Control a Libratone Zipp speaker with a Python library

Project description

Libratone Zipp controller library in Python

This aims to control a Libratone Zipp speaker with a Python library, potentially usable in Home Assistant with this module.

Install it with pip install python-libratone-zipp - pip page

Acknowledgment

This work is based on the following:

Usage

Functions return True if they are successful

Command Action
Initialization
from python_libratone_zipp import LibratoneZipp Import the library
zipp = LibratoneZipp('192.168.1.99', "Zipp") Instanciate the LibratoneZipp class
Properties
zipp.name Name of the speaker
zipp.host IP adress of the speaker
Playback commands
zipp.state State of the speaker - see below
zipp.play() Play command
zipp.pause() Pause command
zipp.stop() Stop command
zipp.next() Next track command
zipp.prev() Previous track command
Voicing (sound mode) commands
zipp.voicing Current voicing
zipp.voicing_list List of all <voicing_id>
zipp.voicing_set(<voicing_id>) Set the speaker to <voicing_id>

States

State variable Variable content Description
STATE_OFF "OFF" The speaker is off or cannot be reached
STATE_SLEEP "SLEEP" The speaker is in sleep mode (nightingale is off)
STATE_IDLE "IDLE" The speaker is active but don't play anything
STATE_PLAY "PLAY" The speaker is playing
STATE_PAUSE "PAUSE" The speaker is on pause - Not sure if it's a "true" state

Roadmap

Module improvement

  • Clean text variables, declare variable on top instead of using text like "play"
  • Create a client
  • Use discovery method instead of fixed IP

Functionnality coverage

  • v1.0
    • Set basic playback status: play, pause, stop, next, prev
    • Set a Favorite
    • Calculate state - But this is not use in HA
    • Make it work with Home Assistant
    • Publish on PyPi
  • v1.1
    • Set a Voicing
  • v2.0
    • Retrieve basic playback status: play, pause, stop, next, prev
  • v3.0
    • Make the module async

Other functionalities:

  • Volume
    • Set volume
    • Retrieve volume
  • Current Playback info
    • Retrieve current playback source
    • Retrieve current title
    • Retrieve media type: bluetooth, spotify, aux, radio, ...
  • Standby
    • Set to immediate standby
    • Set a standby timer
    • Retrive a standby timer
  • Voicing & Room Setting
    • Retrieve current Voicing
    • Set Room Setting
    • Retrieve current Room Setting
  • Favorites
    • Play a favorite
    • Set a Favorite
  • Extended current playback info
    • Set extended playback status: shuffle, repeat
    • Retrieve extended playback status: shuffle, repeat
    • Set Source
    • Retrieve current source
  • Speaker configuration
    • Retrieve speaker name
    • Retrieve speaker color
    • Set speaker name
    • Set speaker color
    • Retrieve current firmware, IP, serial number
    • Retrieve current battery and AC information
  • Network
    • Retrieve current wifi information
    • Set wifi information

License

See LICENSE file

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

python_libratone_zipp-1.1.1.tar.gz (7.3 kB view hashes)

Uploaded Source

Built Distribution

python_libratone_zipp-1.1.1-py3-none-any.whl (7.1 kB view hashes)

Uploaded Python 3

Supported by

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