Commit Graph

757 Commits (0100f87ff27d51839259611f4f76b867e1c3f3af)

Author SHA1 Message Date
Paulus Schoutsen d29bdddaa7 Add bind_hass to components (#8502)
* Add bind_hass to components

* Add bind_hass to group
2017-07-16 10:14:46 -07:00
dersger 9373d5e901 Fix media_position for cast component (#8452)
* Make it available during state paused.

* Don't adjust for media_position_updated_at. I.e. do as vlc, sonos etc
  so that returned position is the position at the time of
  media_position_updated_at, not now.
2017-07-13 20:00:23 -07:00
Abílio Costa 2eeeb9075a Plex: Add exception handler when connection fails (#8179)
* add exception handler when connection fails

* plex: improve exception handling

* remove uneeded exception handler
2017-07-13 08:01:12 -07:00
Niccolò Maggioni 229000b834 Support for Plex servers with enforced SSL (#8341)
* Support for Plex servers with enforced SSL

* Fixed HoundCI warnings

* Fixed HoundCI warnings (2nd)

* Configurator data validation

* Travis linting
2017-07-11 23:26:29 -07:00
Vlad Korniev ef94b5c77a Vizio SmartCast support (#8260)
* Vizio SmartCast support

* Requested changes
Added new config params

* Vizio SmartCast support

* Requested changes
Added new config params
2017-07-11 22:55:46 +02:00
Oliver 3be0103259 Marrantz SR5006 & SR5006 treated as AVR-X device | Fixed Mapping of Media Player and AUX input functions (#8409) 2017-07-08 16:02:59 +02:00
Tom Matheussen 233920f22c Sets spotify media_type to music (#8387)
* Sets spotify media_type to music

* Removed whitespace

* Update spotify.py
2017-07-07 07:52:11 -07:00
Charles Blonde 9bc5cd2d4b Add Soundtouch support for playing an HTTP url (#8370) 2017-07-06 22:28:09 -07:00
Paulus Schoutsen 46e030662d Fix pylint 1.7.2 no-else-return issues (#8361)
* Fix pylint 1.7.2 no-else-return issues

* Update tomato.py
2017-07-05 23:30:01 -07:00
Paulus Schoutsen 5779d64e98 Fix some issues for PyLint 1.7.2 (#8356)
* Fix some issues for PyLint 1.7.2

* More fixes

* Revert position change for cover
2017-07-05 20:02:16 -07:00
Pierre Ståhl ea5bec3ef4 Add new feature to Apple TV platform (#8122)
* Lift Apple TV to pyatv 0.3.2

Update code to use basic new features.

* Support button presses in Apple TV

* Support device authentication

* Convert Apple TV to a component

A media_player platform and a remote platform will be loaded for each
manually configured or discovered device.

* Move device auth to apple_tv component

* Update requirements and coverage config

* Add scan support to apple_tv
2017-07-04 21:37:18 -07:00
John Mihalic f8527e9773 Update pyEmby to fix media images (#8331) 2017-07-04 08:02:29 +02:00
Adam Baxter f02d169864 Fix Plex component to use port number in discovery. (#8197)
* Fix Plex component to use port number in discovery.

* Break line

* Correctly save port to config

* Handle port with fewer code changes

* This is stuck configuring and I'm not sure why

* Changes suggested by @dale3h
2017-06-25 18:06:15 -05:00
Oliver 1b563b0640 Pushed to version 0.5.1 of the library (#8190) 2017-06-24 12:14:57 -07:00
Fabian Affolter 61cb6ec3dc Upgrade libsoundtouch to 0.6.2 (#8149) 2017-06-22 13:27:42 +02:00
Oliver 2e3b279873 Add support of Zone2 and Zone3 (#8025)
* Add support of Zone2 and Zone3

* Changes from balloobs feedback
2017-06-21 22:54:10 -07:00
Charles Blonde 9a239d1afb Upgrade libsoundtouch to prevent Python3.6 errors with enum. #7733 #8103 (#8143) 2017-06-21 22:20:30 +02:00
Eugenio Panadero 35132f9836 media player Kodi: handle TransportError exceptions when calling JSONRPC API methods (#8047)
* handle TransportError exceptions when calling JSONRPC API

* use double quotes for log messages; show TransportErrors as in async_ws_connect

* fix spaces around keyword / parameter

* fix logging message

* review changes
2017-06-18 23:00:02 +02:00
Michael Auchter fb0ee34f10 mpd: implement support for seek, shuffle, and clear playlist (#8090)
* mpd: add shuffle and clear_playlist support

* mpd: implement seek
2017-06-18 18:31:45 +02:00
John Mihalic 33d381731f Bump pyEmby version to account for API changes (#8070) 2017-06-17 18:41:35 +02:00
Jean-Michel Ruiz 8af6bacfd0 media_player.firetv - Adding support for https. (#8022)
* Adding support for https.

This change allows to access a firetv-server instance that runs over https (via a reverse proxy for exemple).
Default stays http, but if `ssl: true` is set in the configuration the connection goes over https.

Successfully tested.

* respecting the 79 characters line limit
2017-06-15 22:23:10 -07:00
Tom Matheussen bf2fe60cb5 Take in account Spotify account permissions (#8012)
* only show Spotify actions when Premium account is used

* Fix indentation, stupid autoformat
2017-06-14 00:45:00 +02:00
Fabian Affolter 9189cbdc8b Remove globally disabled pylint issues (#8005) 2017-06-13 11:10:32 +02:00
Sören Oldag 03f916ed10 Fixed bug in spotify component. (#7976) 2017-06-11 22:24:01 -07:00
Oliver 1f226cffe9 Bugfixing with version 0.4.4 of denonavr (#7995) 2017-06-11 12:02:32 +02:00
mwsluis 49d642741d Nadtcp component (#7955)
* initial commit

* class name and requirements_all.txt

* removed mentions of D7050

* changed default name

* catch oserror in update, travis errors.

* use nad_receiver pip version

* update coveragerc
2017-06-09 14:53:07 -04:00
Paulus Schoutsen a223efb840 Prevent Roku doing I/O in event loop (#7969) 2017-06-08 22:18:33 -07:00
Barry Williams e4d100d54d Fixed metadata issue (#7932) 2017-06-08 21:41:24 -07:00
Oliver 482db94372 Add option to display all input sources / Add support for favourite channels / Treat Marantz SR5008 as Denon AVR-X device (#7949)
* add option to display all sources / pushed to version 0.4.3 of library

* Add show_all_sources option for auto discovery too

* change code style for hass

* fix lint
2017-06-08 09:46:26 +02:00
joopert 790610525b update to 006 (#7945) 2017-06-08 07:30:07 +02:00
Juggels 36eb0ceff3 [media_player.sonos] Send media_stop on turn_off (#7940) 2017-06-07 13:15:29 +01:00
Fabian Affolter f303f6a191 Move consts to 'const.py' (#7909) 2017-06-05 16:59:59 +02:00
joopert e50588afe1 Change nad_receiver to pypi (#7852)
* Change to pypi

* add requirements
2017-06-03 17:01:51 +03:00
Erik Eriksson e11ec88482 Update squeezebox.py (#7617)
Do not fail in case no players are connected, in which case squeezeserver will return a result without player_loop.
2017-06-02 00:26:54 -07:00
David-Leon Pohl 2b70b1881a Quickfix Bug #7384 (#7582)
* Quickfix Bug #7384

* Fix devices not available runtime bug
2017-06-02 00:05:07 -07:00
Juggels 12607aeaea Check if media commands are actually applicable (#7595)
* Check if media commands are actually applicable

- Explicitly allow ‘stop’ and ‘play’ on radio streams
- Disallow media commands when the playlist is empty
- Check if command is supported when calling `turn_on` and `turn_off`

* Suppress UPnP error 701 on media commands

* Clean up soco_filter_upnperror

Clean up soco_filter_upnperror and fix small bug in support_previous_track determination
2017-06-02 00:03:10 -07:00
Teagan Glenn cefacf9ce4 Spotify aliases (#7702)
* Alias support for spotify devices

* Fix log

* Formatting/Fixes

* Remove default arg

* Add default keyword

* None check
2017-06-01 23:53:23 -07:00
happyleavesaoc 96b20b3a97 update snapcast media player (#7079)
* update snapcast

* fix docstrings

* bump dep version

* address snapcast review comments

* add snapcast group volume support

* fix snapcast requirements

* update snapcast client entity id

* snapshot/restore functions

* refactor snapshot/restore services

* clean up

* update snapcast req

* bump version

* fix async updates
2017-05-30 11:34:39 +02:00
Oliver 1f3bb51821 Add Marantz SSDP discovery / Detect error string in AppCommand.xml body (#7779) 2017-05-29 10:26:10 +02:00
Paulus Schoutsen e68bd0457c Fix more deprecation warnings (#7778)
* Remove setting up an hbmqtt broker

* Don't pass loop to web.Application in tests

* Use .query instead of deprecated .GET for aiohttp requests

* Fix closing file resource

* Do not use asyncio mark

* Notify.html5 - PyJWT: Use options to disable verify

* Yamaha: Test was still using deprecated ip

* Remove pytest-asyncio
2017-05-26 13:12:17 -07:00
Paulus Schoutsen f43db3c615 Replace executor with async_add_job (#7658)
* Remove executor

* Lint

* Lint

* Fix tests
2017-05-26 08:28:07 -07:00
cgtobi b3cb057aac Fix playback control of web streams (#7683)
Web streams can't be paused and resumed later. That's why volumio stops them instead of pausing them.
2017-05-21 17:05:04 -07:00
Barry Williams adde9e6231 Upgrade Openhome library (#7671)
* Added support for openhome devices using transport service

* Style cleanup
2017-05-20 17:43:35 +02:00
Eugenio Panadero f7d25396a4 Kodi specific service to call Kodi API methods (#7603)
* Kodi specific services to call Kodi API methods

 - new service: `kodi_execute_addon` to run a Kodi Addon with optional parameters. Results of the Kodi API call, if any, are redirected in a Home Assistant event: `kodi_execute_addon_result`.
 - new service: `kodi_run_method` to run a Kodi JSONRPC API method with optional parameters. Results of the Kodi API call are redirected in a Home Assistant event: `kodi_run_method_result`.
 - Add descriptions in services.yaml.
 - Add `timeout` parameter to yaml config (needed to make slow queries to the JSONRPC API, default timeout is set to 5s).
 - Trigger events with the results of the Kodi API calls, with:
 ```
 event_data = {
   'result': api_call_results,
   'result_ok': boolean,
   'input': api_call_parameters,
   'entity_id': 'media_player.kodi'}
```

* no need to clean OrderedDicts; no need for the `kodi_execute_addon` service

* no need for the `kodi_execute_addon` service

* unused import

* naming changes
2017-05-17 08:42:47 -04:00
Marc Egli 4da91d6a8b Add sonos alarm clock update service (#7521)
* Add sonos alarm clock update service

* Add tests and break lines

* Fix style errors

* Make test work with python<3.6

* Fix last two pylint errors

* fix new line to long errors
2017-05-15 00:42:45 -07:00
Eugenio Panadero 4cdf0b4969 Fix Kodi specific services registry and add descriptions (#7551)
* Fix Kodi specific services, add descriptions, add more handled exceptions

 - Fixes issue #7528
 - Add descriptions for Kodi specific services in services.yaml.
 - Error handling in Kodi API errors.
 - Make compatible the existent specific service `media_player.kodi_set_shuffle` with the general `media_player.shuffle_set` service (both use the same method but with different named parameter, I think the Kodi specific service should be eliminated, since it is not)

* fix line too long

* removed new services (for another PR); removed `kodi_set_shuffle` service

* requested changes

 - Removed `kodi_set_shuffle` service.
 - Optional `media_name` and `artist_name` parameters. `media_name` defaults to 'ALL'.
 - Guard clause to check if the services are already registered.
2017-05-12 20:48:57 -07:00
Andrey f4915ddb0b Switch basicmodem and python-roku to pypi (#7514) 2017-05-09 20:23:19 -07:00
Marc Egli d86dfb6336 Fix sonos sleep timer (#7503) 2017-05-09 18:35:51 +02:00
Josh Anderson b34c58386c Correct retrieval of spotify shuffle state (#7505)
Returned on the current playback response itself, not the device
2017-05-09 17:35:30 +02:00
abmantis 5cb3382425 new source only forces "play" if the current state is "playing" (#7506) 2017-05-09 17:34:17 +02:00
Oliver 419d97fc06 Fixed potential AttributeError when checking for deleted sources (#7502) 2017-05-09 07:24:18 +02:00
Andrey 1cd51bc6a8 Switch onkyo to pypi (#7497) 2017-05-09 08:13:29 +03:00
Andrey 2c1df75c07 Switch russound, pymysensors, and pocketcasts to pypi (#7449)
* Switch russound to pypi

* Switch pymysensors to pypi

* Switch pocketcasts to pypi
2017-05-07 02:22:38 +02:00
Paulus Schoutsen c5a91393e4 Guard against no content type (#7432) 2017-05-03 20:12:51 -07:00
Henrik Nicolaisen f389266f5f remove charset if set in content type header (#7411)
* remove charset if set in content type header like this “Content-Type: image/jpeg;charset=UTF-8”

* fixed lint error
2017-05-02 21:19:16 -07:00
Fabian Affolter 4d52b0ecd5 Update docstrings (#7405)
* Update docstrings

* Fix lint issues

* Update docstrings
2017-05-02 22:47:20 +02:00
Fabian Affolter a4f1f6e724 Update docstrings (#7374)
* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstring

* Update docstrings

* Update docstrings

* Fix lint issues

* Update docstrings

* Revert changes in dict
2017-05-02 09:18:47 -07:00
abmantis c085f06df5 Add support for shuffle toggling on Spotify component. (#7339)
* add support for shuffle toggling on Spotify component.

	this also required adding support for shuffle on the
	media_player component.

* lint

* Use ATTR_MEDIA_SHUFFLING for service handler param

* Line too long fix

* fix tests

* add shuffle set to demo mediaplayer

* rename shuffle attribute
2017-04-30 12:41:21 -07:00
Paulus Schoutsen 9afbbbf3fe Remove ordered_dict validator (#7375)
* Remove ordered_dict validator

* Lint

* Update test_config_validation.py
2017-04-30 10:55:03 -07:00
Henrik Nicolaisen 8df5de2bb8 optimize remote calls and apps on webostv media_player (#7191)
* - changed updater to only do updated if they succed and handle calls when tv is off better by only doing 1 remote call
- show all sources instead of only connected, to fix source selection when unit is powered off
- fixed sources so they can launch apps and select sources

* fixed lint errors

* show all sources and apps if no custom options are defined in the conf

* fixed indentation for lint

* set _current_source when state is off and fixed timeout exception
2017-04-30 00:30:37 -07:00
Jason Carter 607394a0a0 Netdisco now returns a dictionary while it used to be a tuple, fixed (#7350) 2017-04-29 20:54:45 -07:00
Henrik Nicolaisen 615691efc3 Issue 7218 update pylgtv to 0.1.7 (#7302)
* update pylgtv module to 0.1.7

* update pylgtv to 0.1.7 requirements
2017-04-25 20:20:54 -07:00
Fabian Affolter cfc023e128 Don't use len(SEQUENCE) as condition value (#7249)
* Don't use len(SEQUENCE) as condition value

* Update volvooncall.py
2017-04-23 20:41:09 -07:00
Fabian Affolter 15b2473224 Iterating the dictionary directly (#7251) 2017-04-23 20:16:52 -07:00
Oliver 4cd024d91e Pushed to version 0.4.0 of denonavr which also includes experimental support for Marantz receivers (#7250) 2017-04-23 21:00:00 +02:00
Henrik Nicolaisen 8e716780b7 Issue 6749 updated pylgtv to 0.1.6 to fix thread leak in asyncio loop (#7199)
* updated pylgtv module to fix problems with timeouts

* - update pylgtv to 0.1.6
- handle new TimeoutError exception from pylgtv

* used full name for exception handling of concurrent.futures._base.TimeoutError

* the exception handling should now follow the rules

* float typecasting should not be necessary

* use asyncio for TimeoutError it’s an alias for concurrent.futures.TimeoutError
2017-04-21 20:24:21 -07:00
Pierre Ståhl 93820d5124 Do not request artwork if not available (#7189)
This should fix the "dancing media player" issue where the media player
requests artwork when it's not really available, making the UI "dance".
2017-04-20 00:10:06 -07:00
Pierre Ståhl 2e11d49af3 Fix auto discovery for Apple TV (#7188) 2017-04-20 00:09:27 -07:00
Mitko Masarliev 2d5ab520ef Fix for errors on missing preview on LG webos TV (#6755)
* fix for missing image preview on LG webos TV

* fix to use largeIcon if it start with http
2017-04-20 00:08:53 -07:00
happyleavesaoc e020d5114a spotify media player (#6980)
* spotify media player

* fix refresh token

* spotify improvements

* add checks for idle

* import STATE_IDLE

* support more media_ids, limit updates

* move spotify device update

* Remove schedule_update_ha_state because should_poll is true
2017-04-19 22:45:12 -07:00
Charles Blonde 931fce8239 Add Bose soundtouch discovery support and upgrade libsoundtouch library (#7005)
* Add Bose soundtouch discovery support and upgrade libsoundtouch library

* Remove DEVICE global variable

* Update netdisco to lastest version
2017-04-19 21:52:37 -07:00
Henrik Nicolaisen b985e4ef0b updated pylgtv module to fix problems with timeouts (#7184) 2017-04-19 19:36:11 -04:00
Alessandro Mogavero 5179832f6f Added new services to platform kodi (#6426)
* added new service

* fixed basic test in kodi platform

* Added new method async_get_albums

* Added new methods in module kodi

* added method find_song in kodi module

* method add_song_to_playlist made
async

* Added media type to method async_play_media

* added methods async_clear_playlist
and play_song

* methods play_song and find_song
made async

* added new service play_song

* Improved kodi._find
now it find for whole words only

* added possibility to specify artist in
kodi.async_find_artist

* added kodi.async_find_album

* added new optional input to play_song service

* In async_play_song added handling of no song found

* default artist value changed to ''

* async_add_song_to_playlist now can also
search for musinc

* added service add_song_to_playlist

* Added new service add_album_to_playlist

* added services to switch shuffle mode

* added service add_all_albums_to_playlist

* handled error in async_unset_shuffle
and async_set_shuffle

* Added abstract methods to media_player

* _server substituted with server property

* style made consistent with requirements

* Fixed issue with pylint

* Services moved to kodi platform

* service play_song removed

* removed service unset_shuffle

* all add services merged into one

* removed service get_artists

* added kodi_ to service names

* Fixed some style issues

* Removed changes in media_player __init__

* Implemented requested changes

* Fixed pylint problem
2017-04-18 23:19:27 -07:00
Erik Eriksson 1e758ed030 Keep track of already added players (#7149) 2017-04-19 00:20:52 +02:00
Robbie Trencheny 34cb02177d Bump braviarc version to 0.3.7 (#7078) 2017-04-12 18:22:23 -07:00
Robbie Trencheny 5ba4033651 Merge pull request #6869 from JesseWebDotCom/dev
Exposed more attributes, enabled play_media tv show or season episodes
2017-04-12 15:17:53 -07:00
Pascal Vizeli e026717239 Fix handling with register callbacks on added_to_hass (#7067) 2017-04-12 09:51:19 +02:00
Paulus Schoutsen edf500e66b Upgrade netdisco to 1.0.0rc2 (#7008)
* Upgrade netdisco to 1.0.0rc2

* fix tests
2017-04-11 20:10:02 -07:00
happyleavesaoc 2277778d8d update gstreamer (#6987) 2017-04-08 14:53:16 -07:00
John Mihalic ad8ee1383c Update Emby for aiohttp v2 (#6981) 2017-04-07 19:17:10 -07:00
JesseWebDotCom c20d48c8e0 import order fix 2017-04-06 20:52:56 -04:00
Adam Mills 51dc8b78cc Update kodi for aiohttp2 (#6967) 2017-04-07 00:12:24 +02:00
Pascal Vizeli 86568b443c Fix startup of sonos / snapshot handling / error handling (#6945)
* Fix startup of sonos / snapshot handling / error handling

* Use decorator for coordinator relay

* fix lint

* Fix unittest

* Move subscribe into executor
2017-04-05 23:24:30 -07:00
JesseWebDotCom 90a834cbda String formatting, import order, type check fixes 2017-04-04 22:33:52 -04:00
Dan 134b21dfea Onkyo update (#6906)
* Update onkyo req, change volume to int

* Update Onkyo

Updates onkyo component. Pulls added sources (Bluetooth, built-in
streaming, etc.)

* Regenerated requirements_all.txt via script

* Update onkyo.py

* Update requirements_all.txt
2017-04-03 00:35:36 -07:00
Dan f0027e3cc1 Fox UMP volume set (#6904)
async needs consistant paramater namming accross platforms. This fixes
UMP's volume set method by renaming the paramater.
2017-04-02 15:31:28 -07:00
JesseWebDotCom b99dd19ad6 Fixed log errors if session username or content rating is blank 2017-04-02 10:51:03 -04:00
JesseWebDotCom ae21fa9ce1 Fixed setting username and content rating data 2017-03-31 23:20:36 -04:00
JesseWebDotCom 564a01f344 mend
Exposed more attributes, enabled play_media tv show or season episodes
2017-03-31 22:36:37 -04:00
JesseWebDotCom 05bab8c808 Exposed more attributes, enabled play_media tv show or season episodes 2017-03-31 22:19:04 -04:00
Paulus Schoutsen 714b516176 aiohttp 2 (#6835)
* Upgrade aiohttp2

* Fix resource caching

* Fix helpers.aiohttp_client

* Lint

* Use static path for api error_log

* Fix ClientErrors import

* Remove not needed DisconnectError

* Remove releasing responses code

* Add timeout if stream starts non responding

* More async_aiohttp_proxy_stream cleanup

* Fix references to ClientError

* Fix fingerprinting

* Fix aiohttp stream tests

* Rename aiohttp_proxy_stream

* Remove impossible darksky test

* Fix sleepiq requests escaping mocker

* Lint

* Remove deprecated parameter

* Break up aiohttp_proxy_stream in 2 methods

* Lint

* Upgrade to aiohttp 2.0.4

* Convert connector close to a callback

* Fix static fingerprinted links
2017-03-30 00:50:53 -07:00
Fabian Affolter 5d5547cdb6 Update docstrings (#6795)
* Add link to docs and remove comments which are obvious

* Update docstrings

* Repleace conf details with link to docs

* Add link to docs

* Update docstrings

* Update import

* Update ordering

* Update ordering

* Update docstring

* Update ordering

* Update ordering
2017-03-26 15:50:40 +02:00
Adam Mills 970bde9e99 Fix Kodi when websocket is disabled (#6706) 2017-03-19 21:38:12 +01:00
Adam Mills 796143a6c6 Kodi use websocket loop task created by library (#6703) 2017-03-19 12:46:14 -07:00
Paulus Schoutsen 5569ae38f1 Bump PyChromecast to 0.8.1 (#6702) 2017-03-19 11:53:58 -07:00
JesseWebDotCom ecf337b123 Fixed Show All Controls feature 2017-03-17 17:22:38 -07:00
John Mihalic 30d4c54187 Update Emby component to async (#6664)
* Update Emby component to async

* Address comments

* Make SSL default

* Bump library

* Port based on SSL, use available property
2017-03-17 15:55:07 +01:00
Jay Love 9778000e9a Add new media_player platform: Volumio Media Player (#6556)
* Add new media_player platform: Volumio Media Player

Volumio media player is a rpi music player, this platfor adds http based control of the player.

* Modify mute command to accept boolean

* Adjust mute call to reset volume after unmute
Remove references to volimi"a"

* Use yield from calls in mute and volume calls

Trying to speed up the indication of mute and volume level changes in UI, but doesn't seem to do much.

* Adjust async_add_devices call
2017-03-16 23:32:52 -07:00
JesseWebDotCom 5714f156c3 Support for non-clients, NVidia shield, dynamic grouping, extra metad… (#6054)
* Support for non-clients, NVidia shield, dynamic grouping, extra metadata, and more

* Fixed import orderdering, line lengths, and comment violations

* Local player check and season fixes

* Honor entity_namespace when using custom entity ids

* Semi compatibility with channels, force controls option added

* media_position_updated_at fix - only update when media is playing

* Fix: controls now work as expected on 1) casted sessions and 2) client sessions when client and PMS reside on the same sever

* Made PEP8 compliant

* Made PEP8 compliant

* Made PEP8 compliant, hopefully

* Better Tivo compatibility

* Added frozen detection and remediation

* PlayMedia EPISODE now supports season number and episode number (instead of episode index)

* Fix: Dynamic groups now exclude hidden devices

* Fix: Dynamic groups now exclude hidden devices

* Implemented arsaboo suggested formatting

* Implemented pylint command line suggested fixes

* Implemented Travis CI build suggested fixes

* Sorted Imports using Importanize

* Grouped request imports

* Removed dynamic groups, network calls from properties, and other cleanup

* Balloob recommendations and Plex Protocol Capabilities checks

* Remove deprecated disable-msg in favor of disable

* Removed position related items (seek, frozen detection, etc)

* Removed unused datetime
2017-03-16 09:09:46 -07:00
Paulus Schoutsen e265401cd0 self.loop.create_task -> self.add_job (#6632)
* self.loop.create_task -> self.add_job

* Core to use create task
2017-03-16 06:58:54 +01:00
Adam Mills b06cf87c74 Kodi: Fix episode media type classification (#6645) 2017-03-15 22:07:30 -07:00
mvillarejo 2c8a06bfbe media_player.kodi extra attributes for tvshow and music media (#6622)
* media_player.kodi extra attributes for tvshow and music media

* removed extra whitespaces/CR

* Kodi - add extra attributes #6250 (removed music attributes)

* Restored music attributes, this is ready for merge

* linting amended

* Fix Kodi artist support

* Copy-paste error

* Fix for non-music artist lookup

Kodi returns an emtpy list on videos, so we need to be able to
handle that as well.
2017-03-15 19:51:31 -04:00
Adam Mills fff589eeab Correctly flag Kodi media types (#6628) 2017-03-14 20:25:15 -07:00
Daniyar Yeralin 4d9c7d9684 Update mpd.py (#6553)
* Update mpd.py

Introducing new parameter "Name"

* Update mpd.py

Change `CONF_LOCATION` to `CONF_NAME`
2017-03-14 20:10:35 +01:00
Jesse Newland 11da7bed12 Don't start the push updater if the Apple TV is 'off' (#6552)
Add an optional extended description…
2017-03-13 14:23:15 +01:00
Adam Mills 157ab77232 Update Kodi notifier to async (#6497)
* Update Kodi notifier to async

* Change Kodi CONF_SSL to CONF_PROXY_SSL
2017-03-11 10:41:05 -08:00
Greg Dowling 32dd815852 Discovery is a dict rather than an array. (#6525) 2017-03-11 10:39:26 -08:00
Adam Mills 529eee994b
Include functools.wraps 2017-03-09 19:52:45 -05:00
Adam Mills 2d337fd29a
Catch exceptions on kodi commands 2017-03-08 15:54:51 -05:00
Josh Anderson 5fb7aa212b Send a logo with webostv notifications (#6380)
* Update to pylgtv 0.1.4

* Send icon with webostv notifications

Default to the homeassistant logo, but allow customizing it on the
component and for individual notifications
2017-03-06 20:56:31 -08:00
Barry Williams 9522fe3a92 Bumped version number for supporting lib (#6462) 2017-03-06 20:38:33 -08:00
Pascal Vizeli a8add06a40 Bugfix samsungtv discovery (#6438) 2017-03-05 23:52:15 +01:00
Pascal Vizeli a5b2fc9759 Bugfix new async_add_devices function (#6362) 2017-03-02 17:27:45 +01:00
Pierre Ståhl bae6333c26 Use push updates in Apple TV (#6323)
* Use push updates in Apple TV

* Fix review comments
2017-03-02 00:12:55 -08:00
Reed Riley c03022efa3 Add fallback for name if userdevicename isn't set using old serialnumber logic (#6265)
Add an optional extended description…
2017-03-02 08:41:31 +01:00
Pascal Vizeli 41f558b181 Bootstrap / Component setup async (#6264)
* Bootstrap / Entiy setup async

* Cleanup add_job stuff / return task/future object

* Address paulus comments / part 1

* fix install pip

* Cleanup bootstrap / move config stuff to config.py

* Make demo async

* Further bootstrap improvement

* Address Martin's comments

* Fix initial tests

* Fix final tests

* Fix bug with prepare loader

* Remove no longer needed things

* Log error when invalid config

* More cleanup

* Cleanups platform events & fix lint

* Use a non blocking add_entities callback for platform

* Fix Autoamtion is setup befor entity is ready

* Better automation fix

* Address paulus comments

* Typo

* fix lint

* rename functions

* fix tests

* fix test

* change exceptions

* fix spell
2017-02-28 20:33:19 -08:00
Krasimir Zhelev be297c4c7e Frontier silicon (#6131)
* added frontier_silicon constant

* added the frontier_silicon component

* cleaning up according to travis

* trying to satisfy pylint

* trying to satisfy pylint

* fsapi version 0.0.6

* with fsapi version 0.0.7

* added fsapi dependency

* yielding the FSAPI

* Removing white space from docstring

* Removing white space from an empty line

* Switching to sync

* clean up white spaces and rename device to FSAPIDevice

* added frontier_silicon constant

* added the frontier_silicon component

* cleaning up according to travis

* trying to satisfy pylint

* trying to satisfy pylint

* fsapi version 0.0.6

* with fsapi version 0.0.7

* added fsapi dependency

* yielding the FSAPI

* Removing white space from docstring

* Removing white space from an empty line

* Switching to sync

* clean up white spaces and rename device to FSAPIDevice

* changed info to debug

* added frontier_silicon constant

* added the frontier_silicon component

* cleaning up according to travis

* trying to satisfy pylint

* trying to satisfy pylint

* fsapi version 0.0.6

* with fsapi version 0.0.7

* added fsapi dependency

* yielding the FSAPI

* Removing white space from docstring

* Removing white space from an empty line

* Switching to sync

* clean up white spaces and rename device to FSAPIDevice

* added the frontier_silicon component

* trying to satisfy pylint

* fsapi version 0.0.6

* remove white space

* generated requirements

* added the frontier_silicon component

* cleaning up according to travis

* trying to satisfy pylint

* trying to satisfy pylint

* fsapi version 0.0.6

* with fsapi version 0.0.7

* added fsapi dependency

* yielding the FSAPI

* Removing white space from docstring

* Removing white space from an empty line

* Switching to sync

* clean up white spaces and rename device to FSAPIDevice

* trying to satisfy pylint

* changed info to debug

* added the frontier_silicon component

* fsapi version 0.0.6

* generated requirements

* pylint

* moved import requests to the method where it is being used

* add a basic unit test

* cleaned up source code

* added frontier_silicon constant

* added the frontier_silicon component

* added basic test

* added fsapi to requirements_all.txt

* added coverage omit, though a basic test was included

* added MEDIA_TYPE_MUSIC for artist and album

* removed duplicate cons

* switched fsapi call to a property, removed unecessary comment

* detailed docstring for fs_device

* added a space for the info_name - info_text separator

* reduced proeprty (fsapi) access for volume down/up
2017-02-28 09:23:07 -05:00
Adam Mills faf8bbcf13 Fix toggle and media_play_pause post async (#6291) 2017-02-27 19:55:34 -08:00
Philipp Schmitt 7b3b755aaf Fix livebox-play interactions for Python < 3.6 (#6243) 2017-02-26 14:04:22 -08:00
Barry Williams 960af20cc9 Added Openhome Support (#6153)
* Added Openhome Support

* added to coveragerc

* PR suggestions

* revert accidental deletion

* More PR suggestions and a lint fix

* Removed semicolons
2017-02-22 17:01:06 -05:00
Justin Dray b7b1429ac7 Add support for waking up Samsung TVs over the network (#6114)
* Add support for waking up Samsung TVs over the network

* Return the correct supported features for samsungtv

* Update requirements_all
2017-02-21 16:57:29 +01:00
Pascal Vizeli 1d7ab0fa95 Cleanup some async stuff (#6127)
* Cleanup some async stuff

* change to schedule_update_ha_state()

* fix media player

* fix zigbee
2017-02-20 13:24:03 -08:00
Adam Mills b277fd55f9 [media_player.kodi] Fix for when no item id is provided (#6088) 2017-02-18 19:09:17 +00:00
Adam Mills 86a1b0a6c6 Websocket push notifications for Kodi (#6063)
* Websocket push notifications for Kodi

* Only create ws server if ws enabled

* Fix conditional websocket server creation
2017-02-18 00:26:07 -08:00
Philipp Schmitt c2dc940819 Update liveboxplaytv and catch connection errors (#6056)
* Update liveboxplaytv and catch connection errors

* Implement @pvizeli's suggestion

* lint
2017-02-17 21:40:19 +01:00
Jose Juan Montes 714ba31b75 Mediaplayer clementine remote (#5877)
* Added Clementine Music Player Remote component.

* Remove stale stuff
2017-02-16 15:34:34 +01:00
Adam Mills eb9400de4c cmus remove IO from properties (#6030) 2017-02-15 19:13:25 -08:00
Pierre Ståhl fdb6dd81ce Add fake support for turn on/off for Apple TV (#5962)
* Add fake support for turn on/off for Apple TV

When the device is "turned off", no requests are sent to the device.
When the setting "start_off" is set to true, the device starts in off
state.

* Fix async comments

* Clean up supported features
2017-02-15 09:10:48 -08:00
Pascal Vizeli 30ad8bcc80 Bugfix sonos favorite_source after lost connection (#5996) 2017-02-14 11:59:54 -08:00
Pierre Ståhl 3a262cd7e0 Fix artwork in Apple TV platform (#5874) 2017-02-12 22:34:02 +01:00
happyleavesaoc 5f0b2a7d15 [WIP] gstreamer media player (#5839)
* gstreamer media player

* gstreamer meta
2017-02-12 13:00:27 -08:00
Pierre Ståhl e5085bf620 Add media_image to media_player component (#5754) 2017-02-12 11:42:56 -08:00
Paulus Schoutsen a25e394a11 Upgrade AppleTV dep to 0.1.4 2017-02-11 19:25:20 -08:00
Paulus Schoutsen 5ad934907a Revert "Stop using entity_picture that is known to be bad." (#5882) 2017-02-11 13:10:28 -08:00
Andrey b981bfba7e Stop using entity_picture that is known to be bad. (#5856)
* Stop using entity_picture that is known to be bad.

* Only abandon image on 400 or 404 response

* Return is_permanent_failure as a third part of response

* Add debug printout

* Fix lint

* Fix lint
2017-02-11 20:33:41 +02:00
Jose Juan Montes f5c58748b7 Adds play URL support to mpd (makes it work with tts). (#5863)
* Adds play URL support to mpd (makes it work with tts).

* Removed extra line at the end of the file.
2017-02-11 10:07:31 +01:00
Adam Mills e877d572f5 binary_sensor sensor_class to entity device_class (#5860)
* binary_sensor sensor_class to entity device_class

* Linter fixes

* Should be it
2017-02-10 20:46:15 -08:00
Pierre Ståhl 841321f154 Reuse default aiohttp session (#5836) 2017-02-09 23:07:46 +01:00
Pierre Ståhl ecbbb06b2f Handle connection errors when connecting to Apple TVs (#5829)
* Handle connection errors when connecting to Apple TVs

Also bump pyatv to 0.1.2 which fixes a request leak.

* Fix pylint error

* Fix import order
2017-02-09 22:25:06 +01:00
Andreas Cambitsis 4f20a2d3ea Upgrade Russound integration to v0.1.7 (#5756)
* Bumped up version to use 0.1.7 of Russound integration module.
Fixed bug arising from not supporting TURN_ON state (fixes issue https://github.com/home-assistant/home-assistant/issues/5012)
Implemented state support in 0.1.7 such that component state is returned from the actual AMP. (Still uses polling model though).
Tested it with home-assitant users @laf (original developer of the module) and @hofsta.  Works fine with their Russounds.

* Made styling / compliance changes and updated correct version of russound module on requirements_all.txt.

* Changed handling of properties to be compliant with https://github.com/home-assistant/home-assistant/issues/4210
(Specifcailly added member variables for state, volume and source to cache these values, and introduced Update() method to set their values).

Now returns None if the selected source index that is returned from russound is greater than the length of the specified source list in the yaml config.
Removed unnecesary comment.

* Removed blank line after docstring.

* Removed updated() in class init and added True paramter to add_devices in setup_platform.

* Dropped the no longer needed self.update()
2017-02-08 15:53:59 -05:00
Pierre Ståhl 250523c1d8 Add discovery suppport to Apple TV (#5801)
Add an optional extended description…
2017-02-08 12:17:23 +01:00
Adam Mills ecfe8e0a9a Formalize supported_features as entity property (#5794)
* Formalize supported_features as entity property

* Remove extra emulated_hue conditions

* Generate log message in executor
2017-02-07 20:42:45 -08:00
Pierre Ståhl c7e282257a Initial support for Apple TV (#5698)
* Initial support for Apple TV

* hash_wip

* Add media_play support to Apple TV
2017-02-07 00:55:19 -08:00
Pascal Vizeli 48161697f8 Sonos fix favorite, coordinator, cleanup update (#5778)
* Sonos fix favorite, coordinator, cleanup update

* Bugfix snapshot restore
2017-02-07 00:27:55 -08:00
Marcelo Moreira de Mello 305d2612cf Fix attribute error for media_player/roku if roku device is unreachable and shows a persistent notification (#5785) (#5786) 2017-02-06 22:00:20 -08:00
Philipp Schmitt 573fc651dc Store the key file in the config dir (#5732)
* webostv: Store the key file in the config dir

* Update the pylgtv source to use the repo by @TheRealLink

* Add missing config parameter
2017-02-05 10:39:04 +01:00
Philipp Schmitt 7506569db9 Support for the Orange Livebox Play TV appliance (#5533)
* Support for the Orage Livebox Play TV appliance

* Add liveboxplaytv to coveragerc

* Minor refactoring

* Update requirements

* Adjust comments

* Fix alignment

* Fix some coding-style issues highlighted by Travis CI

* The livebox play TV does not support playing media

* Lint: shorten line

* Remove unused callback function

* Remove redundant backslash

* Implement changes requested by balloob

* Don't error out if channel name or media url could not be retrieved

* Support current program (media title property)

* Remove unnecessary check

* Clean up: Remove another unnecessary check, _CONFIGURING variable and _playing attribute

* Update liveboxplaytv dependency to version 1.4.4

* Fix liveboxplaytv requirement

* Improve media state (support for playing and pause state)

* Update liveboxplaytv.py
2017-02-02 23:52:52 -08:00
Paulus Schoutsen 6e94f0d7cd Upgrade zeroconf dep" (#5706) 2017-02-01 21:48:30 -08:00
Pascal Vizeli eefb603f17 Cleanup media_player universal platform / blocking platform. (#5671)
* Cleanup media_player universal platform / blocking platform.

* fix comments

* fix unittest

* fix lint

* fix unittest lint

* fix coro

* fix test

* fix tests part 2
2017-02-01 21:45:19 -08:00
Pascal Vizeli b2180fba63 Bugfix sonso source input (#5699) 2017-02-02 00:02:24 +01:00