* Refactor of Squeezebox connection code
* Refactor of Squeezebox connection code
* Typos
* Make Python 3.4 friendly
* Addressing comments
* Improving docstring
* Using discovered port
* Style better
* Accept new disco object
* Revert "Accept new disco object"
* Make it obvious that port isn't discovered yet
* Flake8. ;)
* Work better with password-protected Squeezebox / LMS servers, including getting file art. Refactored to only have a single method calling the telent lib. (Should make it easier to convert to the more appropriate JSON interface)
* Update squeezebox.py
* Update squeezebox.py
* Update squeezebox.py
* Update squeezebox.py
* Update squeezebox.py
* Added play media to squeezebox
The squeezebox component can now add a URI to an existing playlist or just over write it to force a stream to play.
* Cleaned up flake8 issues with formatting.
Spacing... The end of the world! Fixed. Once day the tools will fix this on the fly, one day...
[x] ./homeassistant/components/media_player/squeezebox.py:307:1: W293 blank line contains whitespace
[x] ./homeassistant/components/media_player/squeezebox.py:366:1: W391 blank line at end of file
[x] ./homeassistant/components/media_player/squeezebox.py:366:1: W293 blank line contains whitespace
Updated SUPPORT_SQUEEZEBOX to add SUPPORT_PLAY_MEDIA
[x] ./homeassistant/components/media_player/squeezebox.py:13:1: F401 'homeassistant.components.media_player.SUPPORT_PLAY_MEDIA' imported but unused
* Updates from review
Updated the comments to indicate they are developer / API comments and not for end users.
Marked the private functions with a leading underscore (_)
* Fixed Lint issues.
202ERROR: InvocationError: '/home/travis/build/home-assistant/home-assistant/.tox/lint/bin/flake8'
203lint runtests: commands[1] | pylint homeassistant
204************* Module homeassistant.components.media_player.squeezebox
205C:322, 0: Trailing whitespace (trailing-whitespace)
Because the LMS discovery mechanism uses the SlimProto protocol to discover the
presence of a Logitech Media server which operates on port 3483/udp and
3483/tcp. But HA uses a different 'CLI' protocol that is typically on port
9090/tcp to query player state.
However the CLI port number is configurable and if someone runs the CLI on a
different port, and has the server configured in configuration.yaml, we get an
error in the logs when we try to connect to 9090/tcp when we find the server
through discovery. Because of the way local slim player discover the server
using SlimProto we can be fairly certain only a single server will run on a
given IP address so if one is already configured with a user defined port, we
should ignore the discovered one that assumes the default port.