home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.54k stars 30.72k forks source link

Yamaha media player does not work anymore #6079

Closed runningman84 closed 7 years ago

runningman84 commented 7 years ago

Home Assistant release (hass --version): 0.38.1

Python release (python3 --version): 3.4.2

Component/platform: yamaha

Description of problem: My yamaha rx481 does not get discovery anymore, I see this error in the logs:

17-02-17 15:27:34 ERROR (MainThread) [homeassistant.components.media_player] Error while setting up platform yamaha
Traceback (most recent call last):
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 151, in _async_setup_platform
    entity_platform.add_entities, discovery_info
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/media_player/yamaha.py", line 89, in setup_platform
    YamahaDevice(name, receiver, source_ignore, source_names)])
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/media_player/yamaha.py", line 109, in __init__
    self.update()
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/media_player/yamaha.py", line 115, in update
    self._play_status = self._receiver.play_status()
  File "/home/homeassistant/.homeassistant/deps/rxv/rxv.py", line 336, in play_status
    playing = (res.find(".//Playback_Info").text == "Play")
AttributeError: 'NoneType' object has no attribute 'text'

Expected: Auto discovery of my avr...

Problem-relevant configuration.yaml entries and steps to reproduce:

media_player:
- platform: yamaha

Additional info: Maybe the problem is that my avr gets switched off during the night? I have seen similar problems in the past which could be solved with a hass restart but this time that does not seem to help.

camrun91 commented 7 years ago

I am getting similar error. `17-02-22 11:42:45 ERROR (Thread-3) [rxv] Failed to fetch http://192.168.1.19:80/YamahaRemoteControl/desc.xml Traceback (most recent call last): File "/usr/local/lib/python3.5/site-packages/requests/packages/urllib3/connection.py", line 141, in _new_conn (self.host, self.port), self.timeout, **extra_kw) File "/usr/local/lib/python3.5/site-packages/requests/packages/urllib3/util/connection.py", line 83, in create_connection raise err File "/usr/local/lib/python3.5/site-packages/requests/packages/urllib3/util/connection.py", line 73, in create_connection sock.connect(sa) TimeoutError: [Errno 60] Operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 600, in urlopen chunked=chunked) File "/usr/local/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 356, in _make_request conn.request(method, url, **httplib_request_kw) File "/usr/local/lib/python3.5/http/client.py", line 1106, in request self._send_request(method, url, body, headers) File "/usr/local/lib/python3.5/http/client.py", line 1151, in _send_request self.endheaders(body) File "/usr/local/lib/python3.5/http/client.py", line 1102, in endheaders self._send_output(message_body) File "/usr/local/lib/python3.5/http/client.py", line 934, in _send_output self.send(msg) File "/usr/local/lib/python3.5/http/client.py", line 877, in send self.connect() File "/usr/local/lib/python3.5/site-packages/requests/packages/urllib3/connection.py", line 166, in connect conn = self._new_conn() File "/usr/local/lib/python3.5/site-packages/requests/packages/urllib3/connection.py", line 150, in _new_conn self, "Failed to establish a new connection: %s" % e) requests.packages.urllib3.exceptions.NewConnectionError: <requests.packages.urllib3.connection.HTTPConnection object at 0x8103a8748>: Failed to establish a new connection: [Errno 60] Operation timed out `

dellablue commented 7 years ago

i get this error too:

17-03-15 21:16:02 ERROR (MainThread) [homeassistant.components.media_player] Error while setting up platform yamaha Traceback (most recent call last): File "/usr/local/lib/python3.4/dist-packages/homeassistant/helpers/entity_component.py", line 153, in _async_setup_platform entity_platform.schedule_add_entities, discovery_info File "/usr/lib/python3.4/asyncio/futures.py", line 388, in iter yield self # This tells Task to wait for completion. File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup value = future.result() File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result raise self._exception File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run result = self.fn(*self.args, **self.kwargs) File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/media_player/yamaha.py", line 89, in setup_platform YamahaDevice(name, receiver, source_ignore, source_names)]) File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/media_player/yamaha.py", line 109, in init self.update() File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/media_player/yamaha.py", line 115, in update self._play_status = self._receiver.play_status() File "/var/opt/homeassistant/deps/rxv/rxv.py", line 336, in play_status playing = (res.find(".//Playback_Info").text == "Play") AttributeError: 'NoneType' object has no attribute 'text'

brendanheyu commented 7 years ago

same here:

17-03-16 17:39:57 ERROR (MainThread) [homeassistant.components.media_player] Error while setting up platform yamaha
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 153, in _async_setup_platform
    entity_platform.schedule_add_entities, discovery_info
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/media_player/yamaha.py", line 79, in setup_platform
    for recv in rxv.find():
  File "/home/homeassistant/.homeassistant/deps/rxv/__init__.py", line 26, in find
    for ri in ssdp.discover(timeout=timeout)
  File "/home/homeassistant/.homeassistant/deps/rxv/ssdp.py", line 64, in discover
    res = rxv_details(url)
  File "/home/homeassistant/.homeassistant/deps/rxv/ssdp.py", line 83, in rxv_details
    unit_desc_url_local = xml.find(UNITDESC_URL_QUERY).text
AttributeError: 'NoneType' object has no attribute 'text'
camrun91 commented 7 years ago

Are you all running the latest version of Homeassistant? I only ask because I am not having this issue anymore.

dellablue commented 7 years ago

Yes 40.0. Been having problems for several versions.

On Mar 16, 2017 3:24 PM, "Cameron Llewellyn" notifications@github.com wrote:

Are you all running the latest version of Homeassistant? I only ask because I am not having this issue anymore.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/home-assistant/home-assistant/issues/6079#issuecomment-287180120, or mute the thread https://github.com/notifications/unsubscribe-auth/ASYqgpfX6RmQzGWedgTvOy12cCFlvFR5ks5rmZptgaJpZM4MEyC_ .

latonita commented 7 years ago

Same error on version 0.44.1 with Yamaha RX-V479

adamnmcc commented 7 years ago

I have a Yamaha RN-301 amp and get the following error.

HASS= 0.47.1

Traceback (most recent call last): File "/usr/lib/python3.4/asyncio/tasks.py", line 233, in _step result = coro.throw(exc) File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/discovery.py", line 118, in scan_devices results = yield from hass.async_add_job(_discover, netdisco) File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__ yield self # This tells Task to wait for completion. File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup value = future.result() File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result raise self._exception File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run result = self.fn(*self.args, **self.kwargs) File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/discovery.py", line 147, in _discover for service in netdisco.get_info(disc): File "/home/pi/homeassistant/deps/netdisco/discovery.py", line 97, in get_info return self.discoverables[dis].get_info() File "/home/pi/homeassistant/deps/netdisco/discoverables/__init__.py", line 23, in get_info return [self.info_from_entry(entry) for entry in self.get_entries()] File "/home/pi/homeassistant/deps/netdisco/discoverables/__init__.py", line 23, in <listcomp> return [self.info_from_entry(entry) for entry in self.get_entries()] File "/home/pi/homeassistant/deps/netdisco/discoverables/yamaha.py", line 27, in info_from_entry service['X_unitDescURL'][1:]) KeyError: 'X_unitDescURL'

balloobbot commented 7 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

camrun91 commented 7 years ago

This seems to be working for me know.

runningman84 commented 7 years ago

I think in the future we should switch to yamaha_musiccast anyway