Commit Graph

431 Commits (f63a79ee8fb8b28854e15db94433c595977973aa)

Author SHA1 Message Date
dasos 754d536974 Work better with password-protected Squeezebox / LMS servers (#3953)
* 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
2016-10-21 22:37:35 -07:00
AlucardZero 62b8e54235 Upgrade SoCo to 0.12 (#3951)
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
2016-10-20 22:51:00 -07:00
Pascal Vizeli c32afcd961 Bugfix sonos (#3926)
* Bugfix Sonos

* lint

* Use player uid for looking of exists

* fix lint

* fix unittest

* Change player_id to unique_id
2016-10-20 08:36:48 -07:00
Sean Dague 7da47852d4 Yamaha zones (#3920)
* Enhance yamaha component

This enhances the yamaha component to create 1 player per zone,
instead of only one play, which provides direct control of the various
zones for the player.

It also exposes play_media for NET_RADIO sources, which allows direct
setting of that.

This requires code changes in rxv 0.2.0, so the requirement dependency
is raised.

* Support current playback metadata for NET_RADIO

When on NET RADIO, support the currently playing information.
2016-10-18 18:04:15 -07:00
Lewis Juggins 09bcd7321a Reset Bravia playing info to ensure state reflects correctly (#3903) 2016-10-17 23:13:35 -07:00
Jan Harkes 4d716cec2b Bump pychromecast dependency to 0.7.6 (#3864) 2016-10-13 21:24:54 -07:00
Scott Reston 39a446c43c Proper title, added album and artist for Squeezebox (#3735)
* Proper title, added album and artist

Title had previously concatenated artist - title.

* Made changes suggested by @balloobbot
2016-10-13 09:07:10 -07:00
Vittorio Monaco e031b8078f Fixes an issue where Chromecast audio groups were not properly discovered (#3630)
* Fixes an issue where Chromecast audio groups were not properly discovered

* Forgot to commit the main fix

* Removes unused variable

* Doesn't use a protected API anymore

* PR remarks

* Fixes tests, adds comment

* Restores line as it was in the original commit, rephrases comment

* Should fix lint issues

* Trailing whitespace

* Some more lint
2016-10-13 08:51:43 -07:00
Fabian Affolter dc95b28487 Use voluptuous for Russound RNET (#3689)
* Migrate to voluptuous

* Remove wrong default
2016-10-09 16:40:54 +02:00
Erik Eriksson 1c24018fbb Improved exception handling (#3746) 2016-10-07 17:16:35 -07:00
Fabian Affolter 8b059e9aad Migrate to voluptuous (#3687) 2016-10-06 16:11:08 +02:00
Sytone d5912f41fb Added play media to squeezebox (#3306)
* 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)
2016-09-23 00:05:33 -07:00
irvingwa 65b1a731ca Added check for channel in kodi media player to play channel from PVR. (#3475)
* Added check for channel in kodi media player to play channel from PVR.

* test
2016-09-22 23:50:07 -07:00
Simon Szustkowski 4c625d09aa Add the ability to manually specify a Yamaha AVR via it's IP address (#3451)
* Added the possibility to manually specify a Yamaha Receiver

* Added the possibility to manually specify a Yamaha AVR

* Using string formatting

* Hostname checks for None now

* Do not use add_devices for each if-branch separately

* Fixed linting
2016-09-20 22:26:43 -07:00
Lewis Juggins 81928b1a6b Update pychromecast (#3416) 2016-09-17 22:51:40 -07:00
Dan d1b08824e8 Implemented onkyo reconnect (#3061)
* Implemented onkyo reconnect

Connection object is cleared after a failed command. It will be
automatically recreated upon the next command running. This should allow
for failed connections to be restored.

* Remove reduntant error catching

* Run all update commands with command wrapper.

* Handle errors better

* Removed unused global

I have no idea how that got there.
2016-09-14 18:21:01 -07:00
Fabian Affolter 4791b5679e Use voluptuous for iTunes (#3344)
* Migrate to voluptuous

* Add support for SSL/TLS
2016-09-13 23:01:51 -07:00
Nolan Gilley 2c01a67446 short sleep (#3115) 2016-09-13 21:46:11 -07:00
Fabian Affolter 68def21615 Use voluptuous for Yamaha receiver (#3210)
* Migrate to voluptuous

* Add missing configuration variables
2016-09-13 21:39:03 -07:00
Daniel Høyer Iversen 3411c4c7c3 Merge pull request #3260 from home-assistant/issue_#3250
issue #3250
2016-09-09 09:33:26 +02:00
Brian Karani Ndwiga 53c8115f82 Updated braviatv's braviarc version to 0.3.5 (#3271) 2016-09-09 08:38:32 +02:00
Daniel b3d2db45de issue #3250 2016-09-08 08:43:05 +02:00
Daniel Høyer Iversen 4d41c5cd0f Fix issue #3250 (#3253) 2016-09-07 19:17:16 +02:00
Pascal Vizeli d7b757fb97 fix bugfix with unique_id (#3217) 2016-09-06 18:31:56 -07:00
Fabian Affolter 5ec6eaf7d0 Update ordering (#3216) 2016-09-05 22:53:23 +02:00
Fabian Affolter e0a6d7941c Migrate to voluptuous (#3200)
🐬
2016-09-05 11:34:35 -06:00
Fabian Affolter 428db4a644 Use voluptuous for SqueezeBox (#3212)
* Migrate to voluptuous

* Remove name
2016-09-05 19:27:06 +02:00
Fabian Affolter ea1e4ea215 Migrate to voluptuous (#3214) 2016-09-05 19:22:26 +02:00
Fabian Affolter 6b787ee01e Migrate to voluptuous (#3209)
🐬
2016-09-05 10:05:27 -06:00
Fabian Affolter 6be20883f0 Migrate to voluptuous (#3208)
🐬
2016-09-05 10:04:46 -06:00
Fabian Affolter 95ea0c02b9 Migrate to voluptuous (#3207) 2016-09-05 10:03:25 -06:00
Fabian Affolter 5059d8dde9 Migrate to voluptuous (#3206) 2016-09-05 10:01:50 -06:00
Fabian Affolter 909b5ffa5b Migrate to voluptuous (#3202)
🐬
2016-09-05 09:51:18 -06:00
Fabian Affolter e324885ff6 Use extend of PLATFORM_SCHEMA (#3199) 2016-09-05 09:47:53 -06:00
Fabian Affolter 8afed2cafa Migrate to voluptuous (#3198)
🐬
2016-09-05 09:46:57 -06:00
Fabian Affolter 6bbe3483d9 Migrate to voluptuous (#3197) 2016-09-05 09:45:06 -06:00
Fabian Affolter 9c600012a1 Migrate to voluptuous (#3194)
🐬
2016-09-05 09:40:57 -06:00
Fabian Affolter aed59aea7d Migrate to voluptuous (#3193) 2016-09-05 09:39:21 -06:00
Fabian Affolter 892f6a706a Use voluptuous for Bravia TV (#3165)
🐬
2016-09-04 19:22:01 -06:00
Fabian Affolter 3b1c0a7502 Migrate to voluptuous (#3162)
🐬 and 🍪 for fixing quotes!
2016-09-03 20:20:45 -06:00
Fabian Affolter 6a2f0fc456 Migrate to voluptuous (#3163)
🐬
2016-09-03 20:18:11 -06:00
Fabian Affolter 2aab77a486 Migrate to voluptuous (#3164)
🐬
2016-09-03 20:14:28 -06:00
Tomi Tuhkanen dedc4a129c Updated braviatv's braviarc version to 0.3.4 (#2997)
* Updated braviarc version to 0.3.4

* Updated braviarc version to requirements_all.txt
2016-09-02 15:07:40 +02:00
happyleavesaoc 451f0cb3f1 snapcast update (#3012)
* snapcast update

* snapcast update

* validate config

* use conf constants
2016-09-01 22:36:14 -06:00
Martin Hjelmare 1699885907 Fix media_player descriptions and select_source (#3030)
🐬
2016-08-28 20:00:43 -06:00
Nolan Gilley 61ef2683c5 Add volume and seek control to gpmdp (#2953) 2016-08-23 23:32:00 -07:00
Nolan Gilley 0c91ba4a50 improve gpmdp (#2951) 2016-08-23 19:09:43 -07:00
Paulus Schoutsen 3fae4fefbf Bust cache for new media player covers (#2882) 2016-08-20 15:14:57 -07:00
Paulus Schoutsen bafc9413a3 Fix media player art (#2879) 2016-08-18 22:45:42 -07:00
Nolan Gilley 09d531b3b9 fix gpmdp (#2864)
* fix gpmdp

* fix balloobs comments

* move create_connection
2016-08-18 00:08:58 -07:00
Roi Dayan 98f236c754 Add webos customize option to add custom sources (#2561)
Currently there are only hw inputs in the sources list.
Other interesting inputs can be live tv (dvbt) and vod apps.

* add customize option for webos
* add short names for livetv, youtube, mako apps
* add current app as a source
* use large icon (largeIcon is the same as icon if doesn't exists)
* filter out hw inputs that are not connected

Signed-off-by: Roi Dayan <roi.dayan@gmail.com>
2016-08-17 23:39:37 -07:00
Tomi Tuhkanen 9c636ab6fd Fix for braviatv get mac regex none case (#2808)
* Fix for braviatv get mac regex none case

* E128 fix
2016-08-13 09:45:49 -07:00
Brent Hughes 0df229773f Removed error log on roku connection error (#2809) 2016-08-13 09:45:09 -07:00
Dean Camera 5ff9e59b79 Update to latest Plex API, add music support. (#2739)
* Update to latest Plex API, add music support.

* Fix PyLint errors.

* Update Plex sensor module to latest PlexAPI.

* Oops - update Python sensor import.

* According to PlexAPI docs, this is the new API for Plex Pass members.

* More pylint STFUs.

* Move pylint suppression.

* Use plexapi NA type directly.

* Pylint objects to short variable names.
2016-08-08 08:55:58 -07:00
Assaf Inbal bb22ad3064 Proxy requests to the media player's media image (#2693)
This is needed when the media server and UI client are not on the same network.
2016-08-02 18:31:15 -07:00
Assaf Inbal 51d5268f9f Added a screenshot to LG Netcast TVs (#2694) 2016-07-31 21:58:55 -07:00
Stephen Hoekstra 125059c5ac Add 5 second timeout to Kodi connections (#2683) 2016-07-31 13:47:24 -07:00
Dean Camera ce3c89db6e Add MPC-HC Media Player Component (#2635)
* Initial media_player component for the MPC-HC web API.

* Update .coveragerc to exclude the MPC-HC media player component.

* We don't need a session for every HTTP fetch.

* Use host in configuration YAML to match Kodi component.

* Fix PyLint errors.

* Fix PEP8 errors and use more idiomatic Python to get dict() values.

* Add MPC-HC remote command capabilities for basic control.
2016-07-28 20:54:22 -07:00
Cameron Bulock 0eac187d97 DirecTV Receiver Media Player Component (#2559)
* DirecTV receiver component

* styling cleanup

* Updated coveragerc and requirements all

* using string format

* linter fixes
2016-07-25 23:20:56 -07:00
Neil Lathwood 34ca1dac7d Added Russound RNET support (#2591)
* Added Russound RNET support

* Fixed farcy issues

* Updated volume_level + fixed requirements_all.txt

* Updated syntax + changed variable
2016-07-23 10:51:56 -07:00
Scott O'Neil 46216c3bda Fix services registration, and adding schema util to sonos (#2558)
* Moving service registration into def so that it can be called for both discovery methods

* Adding use of schemas to sonos
2016-07-19 22:37:24 -07:00
Pascal Vizeli 1877906fdf small bugfix (#2532) 2016-07-16 11:06:36 -07:00
Pascal Vizeli 6694f29918 add media_player/clear_playlist and line-in/tv support to sonos (#2527)
* 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
2016-07-15 09:00:41 -07:00
Michaël Arnauts 63356fb5eb supported_media_commands should check for SERVICE_SELECT_SOURCE instead of SUPPORT_SELECT_SOURCE (#2482) 2016-07-14 11:14:49 -07:00
Neil Lathwood 978ebb9c59 Updated braviatv media player to support power status (#2470)
* Updated braviatv media player to support power status

* Updated requirements_all.txt
2016-07-07 18:28:01 -07:00
Dale Higgs 86e3fdee1c Fix flood of errors if Plex server goes offline (#2447) 2016-07-05 10:50:43 -07:00
Brent ef74bd9892 Updated to version 3.1.2 and fixed invalid host setup error (#2431) 2016-07-03 15:17:08 -07:00
patkap 952b1a3e0c kodi platform: following jsonrpc-request version bump (0.3), let kodi file abstraction layer handle a collection item, url or file to play (#2398) 2016-06-30 16:35:20 -07:00
Lewis Juggins 21be4c1828 Add Sonos unjoin functionality (#2379) 2016-06-30 14:21:57 -07:00
patkap 7582eb9f63 jsonrpc-request version bump (0.3) (#2397) 2016-06-30 08:40:01 -07:00
Fabian Affolter 419ff18afb Docstrings (#2395)
* Replace switch with lock

* Update docstrings

* Add link to docs

* Add link to docs and update docstrings

* Update docstring

* Update docstrings and fix typos

* Add link to docs

* Add link to docs

* Add link to docs and update docstrings

* Fix link to docs and update docstrings

* Remove blank line

* Add link to docs
2016-06-30 10:33:34 +02:00
Brent 3c5c018e3e Fixed issue with roku timeouts throwing exceptions when roku losses n… (#2386)
* Fixed issue with roku timeouts throwing exceptions when roku losses networking

* Fixed pylint errors
2016-06-28 20:26:37 -07:00
Fabian Affolter 7a73dc7d6a Upgrade websocket-client to 0.37.0 (#2382) 2016-06-27 23:47:35 -07:00
Paulus Schoutsen 6714392e9c Move elevation to core config and clean up HTTP mocking in tests (#2378)
* Stick version numbers

* Move elevation to core config

* Migrate forecast test to requests-mock

* Migrate YR tests to requests-mock

* Add requests_mock to requirements_test.txt

* Move conf code from bootstrap to config

* More config fixes

* Fix some more issues

* Add test for set config and failing auto detect
2016-06-27 09:02:45 -07:00
Matthew Treinish 1c1d18053b Add cmus media device (#2321)
This commit adds support for the cmus console music player as a media
device.
2016-06-25 00:06:36 -07:00
Antonio Párraga Navarro cbc0833360 Support for Sony Bravia TV (#2243)
* Added Sony Bravia support to HA

* Improvements to make it work on my poor raspberry 1

* Just a typo

* A few fixes in order to pass pylint

* - Remove noqa: was due to the 80 characters max per line restriction
- Move communication logic to a separate library at https://github.com/aparraga/braviarc.git
- Added dependency and adapt the code according to that

* A few improvements

* Just a typo in a comment

* Rebase from HM/dev

* Update requirements by executing the script/gen_requirements_all.py

* More isolation level for braviarc lib

* Remove unnecessary StringIO usage

* Revert submodule polymer commit

* Small refactorization and clean up of unused functions

* Executed script/gen_requirements_all.py

* Added a missing condition to ensure that a map is not null

* Fix missing parameter detected by pylint

* A few improvements, also added an empty line to avoid the lint error

* A typo
2016-06-19 22:35:26 -07:00
Nick Touran e7ea6ecf5a Better handling for when user hasn't properly configured Pandora client (#2317) 2016-06-18 08:23:35 -07:00
Nick Touran 5c601f1d5f Stability improvement in Pandora and proper shutdown in LIRC (#2299)
* Pandora cleanups and enhancements

Added media_content_type
reduced debug messages
made more robust station list
Eliminated auto-pause detection issue

* Added proper de-init of LIRC

* Now won't re-spawn Pandora client if turn_on command is sent twice
2016-06-14 22:42:54 -07:00
Nick Touran 65d1f7af50 Added Pandora radio media player (#2274)
* Added Pandora media player utilizing the Pianobar client

* Added Pandora to .coveragerc ignore

* Fixes some docstring formats in Pandora

* More minor formatting tweaks for Pandora

* Eliminated non-portable assumption from Pandora component

* Updated Pandora to properly update currently-playing song.

* Docstring fixes in Pandora

* Added check to ensure Pianobar client is available in path for Pandora.

* Made Pandora client verification a function instead of method.

* Better handling of dependency verification in Pandora.
2016-06-12 18:35:12 -07:00
thejacko12354 e437151881 Update samsungtv.py (#2286)
Changed line 75 'KEY_POWER' to 'KEY'
Fixes the problem that every 10 sec the tv interprets that the Up-button is pressed
2016-06-12 16:03:40 -07:00
Paulus Schoutsen 30f74bb3ca Migrate to generic discovery method (#2271)
* Migrate to generic discovery method

* Add tests for discovery
2016-06-11 17:43:13 -07:00
Michaël Arnauts 868c08e34b Add stop command to google cast component (#2269)
* Add stop command to google cast component

* Add SUPPORT_STOP capabilities to google cast component
2016-06-10 21:12:50 -07:00
Dan Sullivan ce829d194c Added Sonos snapshot feature (#2240)
* Added Sonos snapshot feature

* Fix lint errors

* Use snake case

* Import dependency in a method
2016-06-08 21:47:49 -07:00
Adam Mills 027c0b3168 Add turn_off_action to kodi media player (#2224)
A new configuration option `turn_off_action` is added to kodi. It may be
one of: none, quit, hibernate, suspend, reboot, or poweroff. The
appropriate command is sent to kodi when the turn_off action is
requested. Default value is none.

Kodi will only report turn_off supported if it is configured to
something other than none.
2016-06-07 19:18:25 -07:00
Brent e886303f08 Fixed roku exception when device is powered off or looses connection (#2173) 2016-05-29 14:24:06 -07:00
wokar 88bb136813 lg_netcast: fix exception on missing access_token (#2150)
* specified default value for acccess_token to prevent exception on init
2016-05-24 08:36:40 -07:00
Dan dee6355cc5 Onkyo updates (#2084)
* use sane defaults for openzwave config

Use sane default if libopenzwave is installed. In most cases this will
mean that the zwave config path will not need to e manually specified.

* Resuming work on onkyo component

* Source control added to UI for onkyo receiver

Source will now display in the UI. Source mappings can be defined in the
config, and a rudimentary mapping is defined by default as a fallback.
When the onkyo source is updated, it will resolve to a defined name if
possible. This may break existing automations.

* fix lint errors

* Updated Onkyo receiver

Now takes an optional ip/name in additional to atempting to discover
deivces.

Source select will now take a sources mapping in the config. It will
provide default values if no source mapping is provided.

example:

- platform: onkyo
  host: 10.0.0.2
  name: receiver
  sources:
    HTPC: 'pc'
    Chromecast: 'aux1'
    Bluray: 'bd'
    Wii U: 'game'

* fix pylint error

* Use HA's error log instead of stack trace

* Flipped source mappings, code cleanup
2016-05-21 10:04:08 -07:00
Fabian Affolter 7f0b8c5e70 Docs (#2124)
* Add link to docs

* Update link
2016-05-21 16:59:52 +02:00
Alexander Fortin 7eeb623b8f Add media_player.sonos_group_players service (#2087)
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.
2016-05-20 09:54:15 -07:00
Alexander Fortin a4409da700 Add add_uri_to_queue support to (sonos) media player (#1946)
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
2016-05-19 23:30:19 -07:00
wokar f7b401a20e Added the lg_netcast platform to control a LG Smart TV running NetCast 3.0 or 4.0 (#2081)
* Added the `lgtv` platform to control a LG Smart TV running NetCast 3.0
(LG Smart TV models released in 2012) and NetCast 4.0 (LG Smart TV models released in 2013).

* Fixed multi-line docstring closing quotes

* Rename lgtv to lg_netcast

* Rename lgtv to lg_netcast

* Extracted class to control the LG TV into a separate Python package 'pylgnetcast' and changed requirements accordingly.

* regenerated requirements_all.txt with script

* now uses pylgnetcast v0.2.0 which uses the requests package for the communication with the TV

* fixed lint error: Catching too general exception Exception
2016-05-19 23:27:47 -07:00
Alexander Fortin 7208ff515e Better handle exceptions from Sonos players (#2085)
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
2016-05-16 22:58:57 -07:00
Brent 88d13f0ac9 Added support for the roku media player (#2046) 2016-05-15 13:00:31 -07:00
Rowan 429bf2c143 Google Play Music Desktop Player component (#1788)
* Added GPM Desktop Plaeyr component

* Updated requirements_all.txt

* Pylint fix

* Updated GPMDP.py to include @balloob's comments

* Updated to work with the latest version of GPMDP

* Removed setting "self._ws.recv()" as a variable

* Made line 52 shorter

* Updated to check weather it is connected or not

* Pylint and @balloob fixes

* Updated with simplified code and pylint fix

* Made `json.loads` shorter

* Pylint fix
2016-05-14 13:28:42 -07:00
happyleavesaoc c341ae0a39 Media Player - MPD: handle more exceptions (#2045) 2016-05-11 21:53:56 -07:00
Kyle Hendricks 4a28be9a94 [Pioneer AVR] Display the currently select input source as the media title (#1974) 2016-05-06 17:57:57 -07:00
Hernán 393bd88091 Add Media Player Stop command + Kodi support for it (#1960)
* Started adding Stop command to Kodi media player

* minor

* minor

* minor

* abstract-method fixed
2016-05-06 17:57:00 -07:00
Kyle Hendricks f2176e54ba Add Pioneer AVR media_player support (#1968) 2016-05-02 22:09:27 -07:00
Dennis Karpienski 953223b81b Yamaha: added mapping and exclude lists (#1880)
* added mapping and exclude lists

* reworked pr

* made code more pythonic
2016-04-28 12:03:24 +02:00
Fabian Affolter d608153dbb Upgrade jsonrpc-requests to 0.2 (#1937) 2016-04-28 10:06:15 +02:00