Commit Graph

286 Commits (713c7a5fd7c767e69e158d6d28d3c5a358ba46a5)

Author SHA1 Message Date
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
happyleavesaoc 9b3403943c update snapcast with source select (#1908)
* update snapcast

* fix id
2016-04-26 11:46:08 +02:00
Dennis Karpienski 2333c0ca3b WebOS component fixes
* fixed some exceptions

* add requirements to notify

* added optimistic state to power off

* run requirements script
2016-04-21 20:35:56 -04:00
Dennis Karpienski 934cd876b4 fixed some issues with webos (#1856)
* fixed some issues

* fixed linter
2016-04-20 14:09:50 -07:00
Dennis Karpienski 46274d4393 add media_player webos tv platform (#1853)
* added webos tv platform

* moved coverage entries
2016-04-19 08:53:58 -07:00
Jan-Preben Mossin 5931bac695 Only add visible sonos devices
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.
2016-04-17 16:45:16 -07:00
Flavio Castelli b5f1c1332a Sonos: better handling of offline players (#1829)
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>
2016-04-17 13:17:13 -07:00
Dan Cinnamon a482c4b2a1 Allow mpd to handle the play_media service. (#1831)
Even though there's not really a place in the UI for it, it will now be possible to set a playlist as part of a script, and ultimately a scene.
2016-04-17 12:34:33 -07:00
Alex Harvey 0abedd8b46 fix for plex not detecting plex players after power up (#1824) 2016-04-13 22:33:30 -07:00
Dennis Karpienski f1d8667d7e Yamaha AVR Input Select (#1796)
* added select input for yamaha

* set source_list to none on init
2016-04-13 21:13:12 -07:00
Paulus Schoutsen 988dd2ca83 Update frontend 2016-04-10 01:33:01 -07:00
Paulus Schoutsen 2ec9cc15f4 Build frontend 2016-04-08 21:28:59 -07:00
Hernán 7b80ed8135 Add Kodi play media
* Added media_player/play_media service to Kodi

* revert

* fixes

* lint fixed, base class fixed
2016-04-07 08:41:41 -07:00
Alexander Fortin e8efcd21df Increase sonos volume increment from 1 to 5 2016-04-06 11:32:27 -07:00
Florian Holzapfel ecc440f459 add panasonic viera tv media player device 2016-04-05 22:51:55 -07:00
Jan Harkes 3bb571b578 Bump rxv to 0.1.11.
Fixes socket read/write timeout issues.
2016-04-05 14:17:42 -04:00
Paulus Schoutsen e140e9b8ab Add script + extra config validators
* Add config validation and extra validators

* Address PR comments
2016-04-03 10:19:09 -07:00
Jan Harkes afd1e6a5cc Service validation for media_player component 2016-04-02 03:51:03 -04:00
Alexander Fortin b304b77005 FIX enable volume commands for non-coordinators too 2016-03-31 21:36:58 +02:00
Paulus Schoutsen 5b00919bed Merge branch 'pr/1643' into dev
Conflicts:
	requirements_all.txt
2016-03-29 23:23:45 -07:00
Daniel J. Kemp 86199c8277 Add onkyo receiver, and source select support
Added onkyo receiver component

Added support for input source selection to media players,
and do the onkyo receiver component.
2016-03-29 22:17:36 -04:00
Paulus Schoutsen 5baa98b79f Add initial config validation 2016-03-28 23:46:12 -07:00
Paulus Schoutsen 3df946aa9e Merge pull request #1598 from aoakeson/dev
Yamaha Receiver Support
2016-03-26 00:05:05 -07:00
Andrew 2285a6761c Initial Yamaha Receiver Implementation
Text Update

Additional additions and better support for volume, and mute.  Cleanup

Added rxv to requirements_all

Added yamaha.py to .coveragerc

Made uppercase, and removed tabs

Added requirements variable

Added doc string for lint

Removed global variable, and simplified state as per balloobs suggestion

Refactored the component with balloobs suggestions

-Added import in the method
- Only get receiver information on init
- A bit of cleanup

Remove up and down volume

Uneeded as this is handled by set volume instead

Fixed a lint build error

More lint fixes

Removed unused imports

Lint Fixes

Simplified if statement

Minor refactoring since the init calls update.

Fixed lint error

Just variable naming change

Added support for an optional name for the receiver.

Better error handling, a bit of refactoring based on balloobs suggestions

Fixed lint error.

Another lint error fix

Changed raise to return

Disable pylint error handling

Pylint broad exception

Made exception handling in the setup platform instead of the constructor.

Lint error fix

Refactored the way devices are found.  This allows for multiple receivers
2016-03-26 00:47:00 -06:00
Robbie Trencheny ce4933d637 Fill out services.yaml for media_player 2016-03-25 23:38:10 -07:00
Robbie Trencheny de68be06dd Misspelling fix 2016-03-25 22:57:28 -07:00
Robbie Trencheny 950cc9e618 Add play_media support to Sonos 2016-03-25 22:57:14 -07:00
Fabian Affolter 565ae8d30f Upgrade python-mpd2 to 0.5.5 2016-03-24 08:07:06 +01:00
Jan Harkes 2d91dce6d0 Assume we only run one Logitech Media server on a host.
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.
2016-03-23 14:47:29 -04:00
MartinHjelmare 4e4b24fcff Log error for servicecall without required data
* Log error for services called without required attributes, in
	media_player, notify and thermostat platforms.
* Add fan property and methods in thermostat demo component.
* Add tests for notify file and thermostat demo component.
* Increase coverage of tests for media_player, notify and thermostat
	platforms.
* Fix some PEP issues, but not all. Tests still have old linting
	errors.
2016-03-19 08:06:57 +01:00
joopert c6f66de16e log "unable to fetch kodi data" only once 2016-03-18 18:29:50 +01:00
Jan Harkes c2204433bd Add discovery for squeezebox (logitech media) servers. 2016-03-17 09:38:56 -04:00
MartinHjelmare c56701baaf Refactor reproduce_state for scene component
* Add tests to reach full coverage for helpers/state.py.
* Refactor reproduce_state function in helpers/state.py. Add two dicts,
	as global constants, service_attributes and service_to_state. Use
	these in combination with the dict of services per domain from
	ServiceRegistry, to find the correct service to use in a scene state
	change.
* Use break statement in for loop, to break if service was selected
	to update state, in preference to update state attributes, ie state
	update takes precedence.
* Add ATTR_CODE and ATTR_CODE_FORMAT in const. Import these in
	alarm_control_panel and lock platforms instead of making duplicate
	constants in multiple modules.
* Use ATTR_MEDIA_CONTENT_TYPE and ATTR_MEDIA_CONTENT_ID in media_player
	platform in SERVICE_PLAY_MEDIA and play_media methods, instead of
	'media_type' and 'media_id'.
* Fix PEP257 in modified files.
2016-03-09 18:52:05 +01:00
Fabian Affolter cf7c2c492a Fix PEP257 issues 2016-03-08 10:34:33 +01:00
Paulus Schoutsen a687a3decb Update pychromecast 0.7.2 2016-03-03 21:59:27 -08:00
Alexander Fortin 124a9b7a81 ADD only_if_coordinator decorator to sonos
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
2016-02-27 00:40:34 +01:00
Paulus Schoutsen 57ac6cd76f Merge branch 'extract-entity-picture' into dev
Conflicts:
	homeassistant/components/sensor/steam_online.py
2016-02-24 22:00:58 -08:00
Fabian Affolter 4563c54a3e Add link to docs and modify docstrings to match PEP257 2016-02-24 10:38:06 +01:00
Paulus Schoutsen 967a751da1 Add entity_picture property 2016-02-23 22:41:24 -08:00
Paulus Schoutsen e80309c03c Fix imports (using isort) 2016-02-18 21:27:50 -08:00
Alexander Fortin 6578928e3c Fix media_player/sonos configuration mismatch
* 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
2016-02-18 18:57:50 +01:00
Paulus Schoutsen 938c9888a6 Merge pull request #918 from happyleavesaoc/snapcast
snapcast media player
2016-02-12 19:31:07 -08:00
happyleavesaoc 13b0beee31 snapcast 2016-02-12 18:35:32 -05:00
Per SandstrÃom aafd36d2ce change url to host 2016-02-12 21:19:27 +00:00
Per SandstrÃom 15ad48a7a0 kodi thumbnails 2016-02-10 19:48:41 +00:00
Paulus Schoutsen 64611ab2be Merge pull request #1157 from balloob/device-state-attributes
Clean up state_attributes vs device_state_attributes
2016-02-07 10:16:34 -08:00