* Sonos responsiveness improvements (async_ coroutines, event based updating, album art caching) + Better radio station information
* Docstring fixes.
* Docstring fixes.
* Updated SoCo dependency + fixed file permissions.
* Only fetch speaker info if needed.
* PEP8 fixes
* Fixed SoCoMock.get_speaker_info to get test to pass.
* Regenerated requirements_all.txt + async fetching of album art with caching + added http_session to HomeAssistant object.
* Unit test fixed.
* Add blank line as per flake8
* Fixed media image proxy unit test.
* Removed async stuff.
* Removed last remnants of async stuff.
* Sonos improvements: media_* properties delegate to coordinator if speaker is a slave, media_image_url and media_title now works for radio streams, source selection/list takes speaker model into account, commands on slaves delegate to coordinator.
* Fixed failing unit tests.
Changelog: https://github.com/SoCo/SoCo/releases/tag/v0.12
Backwards Compatability changes:
Dropped support for Python 3.2
Methods relating to the music library (get_artists, get_album_artists, get_albums and others) have been moved to the music_library module. Instead of device.get_album_artists(), please now use device.music_library.get_album_artists() etc. Old code will continue to work for the moment, but will raise deprecation warnings
Made a hard deprecation of the Spotify plugin since the API it relied on has been deprecated and it therefore no longer worked
Dropped pylint checks for Python 2.6
* add media_player/clear_playlist and line-in/tv support to sonos
* add support source radio
* fix bug
* print TV/Line-In as media_title
* implement universal player
* add to demo platform
* Update demo.py
Better handling for demo object
* add unit tests
* fix unit test
Sonos platform supports a `party mode` feature that groups all
available players into a single group, of which the calling player
will be the coordinator.
Sonos (SoCo) supports add_uri_to_queue capability, making it possible
to stream media available via HTTP for example. This patch extends
media_player component and sonos platform to support this feature
Sonos players can be dynamically set in various modes, for example
as TV players or Line-IN or straming from radios channels, therefore
some methods could not be available, and when invoked they cause
long exceptions to be logged. This partially solves the problem
reducing the output and logging some more informative error message
Some Sonos devices (e.g SUB) does not have
a upnp media renderer, but are discovered as sonos
devices. Creating a SonosDevice object from such a
device will fail.
When a sonos player goes offline an endless stream of
exceptions is raised. That happens because homeassistant keeps trying
to refresh its status.
This can happen even when a sonos player has gone offline **before**
homeassistant is started. The sonos players take some time before
realizing one of their mates is no longer online, leading to the same
stream of exceptions inside of homeassistant.
Three types of exceptions of can be raised:
- `requests.packages.urllib3.exceptions.MaxRetryError`
- `requests.packages.urllib3.exceptions.NewConnectionError`
- `TimeoutError`
It's not possible to handle all of them with a single `except` block
because they are raised in a random order and after some delays. That
means a 2nd or 3rd exception can take place while handling the 1st one.
The only solution is to check whether a a player is actually reachable
by attempting to connect to a service that must be running on it.
Also all the players in a 'unknown' state should not be polled by
homeassistant (despite of their brand).
I'm going to upstream the `_is_reachable` method I added to the
`sonos.py` file into `SoCo`. In the meantime we must ship this piece
of code with homeassistant.
Signed-off-by: Flavio Castelli <fcastelli@suse.com>
Currently we interact with players regardless of thir coordinator
role, hence soco.exceptions.SoCoSlaveException are thrown. The use
of the decorator for each interactive method should address this
* From configuration.yaml is easy to provide iterable elements like lists,
this adds the possibility to provide a list of Sonos hosts using a yaml
and still supports the comma separated string version
* Remove superfluous host reassignment
Config can now specify one or more hosts to connect and
also a interface_addr to multicast on if multiple interfaces exists.
Signed-off-by: Robert Marklund <robbelibobban@gmail.com>
This is due to the soco library logging very excessively and it using
requests to connect to each Sonos speaker every 10 seconds (by default).
This makes the logs much more pleasant to use for finding real issues.