* 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
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
* 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
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
* 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
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>
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
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.
* 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.
* 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.