This aims to control one 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
Tested with Libratone Zipp 1, firmware 809.
See example in CLI.py
. You have to be able to listen to 3333/udp
and 7778/udp
!
Other files:
Test_SendCommandReceiveMessage.py
is used to shoot one command for tests purposes.Test_LibratoneMessage.py
is to check LibratoneMessage class against a real message
I'm currently happy with this coverage, so don't expect any updates other than maintenance.
The only thing I'm very interested is defining Favorites!
- Module
- Clean text variables, declare variable on top instead of using text like "play"
- Create a Command Line Interface - CLI client
- Publish on PyPi
- Handle exit properly - but need max _KEEPALIVE_CHECK_PERIOD seconds to exit
- Make the module usable with multiple speaker
- Use discovery method instead of fixed IP
- Make the module compatible with async from Home Assistant
- Playback status with Spotify & Radio
- Retrieve basic playback status: play, pause, stop
- Retrieve volume
- Retrieve current playback source
- Retrieve current title
- Retrieve mute status - but no logic implemented!
- Playback with Bluetooth or USB
- Retrieve basic playback status: play, pause, stop
- Retrieve media type: Bluetooth, aux, radio, ...
- Retrieve extended playback status: shuffle, repeat
- Set extended playback status: shuffle, repeat
- Playback control
- Set basic playback status: play, pause, stop, next, prev
- Set volume
- Standby
- Retrieve actual speaker state
- Calculate actual speaker state: UNKOWN, SLEEPING, ON, PLAYING, PAUSED, STOPPED
- Set to immediate standby and wakeup
- Set a standby timer
- Retrieve the defined duration of the standby timer
- Calculate the actual standby timer
- Voicing & Room Setting
- Set a Voicing
- Retrieve active Voicing
- Retrieve all Voicing
- Set Room Setting
- Retrieve current Room Setting
- Retrieve all Room
- Favorites
- Play a Favorite
- List configured favorite but no processing (
_channel_json
) - Set a Favorite
- Extended current playback info
- Set Source
- Retrieve current source
- Speaker configuration
- Retrieve current firmware
- Retrieve speaker name
- Retrieve speaker color
- Set speaker name
- Map out color codes + Set speaker color
- Retrieve current serial number
- Retrieve current battery level
- Retrieve AC information
- Network
- Retrieve current IP
- Retrieve current Wi-Fi configuration
- Retrieve current Wi-Fi information
- Set Wi-Fi configuration
- Multi-room
- Implement SoundSpace Link
Following commands where identified but not implemented and/or implemented but not processed due to lack on data
investigation. The list is not exhaustive!
From Android application, com.libratone.model.LSSDPNode
:
command | function | notes |
---|---|---|
10 | fetchSourceInfo | |
103 | fetchDeviceState | |
152 | fetchSource | |
281 | fetchMusicServiceCapability | Answer a JSON |
304 | fetchLimitedFunctionList | Answer 3 bytes |
520 | fetchMuteStatus | Implemented but not processed |
530 | fetchOtaAutoDownLoadStatus | |
537 | fetchWifiLinein | |
1284 | fetchChargingStatus | Implemented but not processed |
1285 | fetchPrivateMode | |
1536 | fetchUsbCurrentPlayId | |
1537 | fetchUsbPlayMode | |
1538 | fetchUsbSongInfo |
This work is based on the following:
- The Libratone command list is coming from this work from Benjamin Hanke
- A lot of further work is based on APK decompilation
- Entity to use: Media Player
- Example of integrations:
- Simple: Harman Kardon AVR integration which use this module
- Simple: Clementine Music Player integration
- Async: Frontier Silicon integration with this module
- Async with extended features: Yamaha integration with this module
- Async and simple: anthemav integration with this module
See LICENSE file