Yamaha Fault in XML link

Hi, Help would be appreciated :wink:

I have a Yamaha RX-V2065 receiver, and this works great with the Yamaha AV controler App.

In Home Assistant on my RPI 4 4GB, I have the following configuration in my YAML:

  • platform: yamaha
    host: 192.168.2.103

However, i get the following Error message:

Error while setting up yamaha platform for media_player
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 199, in _async_setup_platform
await asyncio.shield(task)
File “/usr/src/homeassistant/homeassistant/components/yamaha/media_player.py”, line 130, in async_setup_platform
receivers = await hass.async_add_executor_job(_discovery, config_info)
File “/usr/local/lib/python3.8/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/src/homeassistant/homeassistant/components/yamaha/media_player.py”, line 114, in _discovery
receivers = rxv.RXV(config_info.ctrl_url, config_info.name).zone_controllers()
File “/usr/local/lib/python3.8/site-packages/rxv/rxv.py”, line 392, in zone_controllers
for zone in self.zones():
File “/usr/local/lib/python3.8/site-packages/rxv/rxv.py”, line 383, in zones
xml = self._desc_xml
AttributeError: ‘RXV’ object has no attribute ‘_desc_xml’

2021-01-23 10:47:55 ERROR (SyncWorker_1) [rxv] Unsupported Yamaha device? Failed to fetch http://192.168.2.103:80/YamahaRemoteControl/desc.xml

This link doesn’t work in my webbrowser, the link that does retrieve information is:
192.168.2.103/YamahaRemoteControl/UnitDesc.xml

HASS is trying to use a link tart is missing the word ‘Unit’.

Is there a way I can change the link where HAS is trying to retrieve the information from?

Core-2021.1.4
Supervisor-2021.01.05
Host OS5.10

That model is not listed here https://www.home-assistant.io/integrations/yamaha/

Looks like Yamaha has changed the URL, assuming that your model is more recent than my RX-V473 (which is supported). You might give this to the developers, so they can extend their lookup-schemes.

In the meantime, maybe the “generic” DLNA Digital Media Render will give you at least some control over your device.

Thanks, is there any way I can update the file “/usr/src/homeassistant/homeassistant/components/yamaha/media_player.py?

Hi there is also stated ‘and more’. It did work in the past.
I think that de XML link causes the issues. The receiver gets state ‘unavailable’.

regards

Which line do you want to change, I looked at the code and though (or because) I am not familiar with Python, I did not find the line that computes the URL. Looks like it’s some “magic” in discovery component.

  • you need to identify the container’s name (running Home Assistant) using docker ps. Mine is called ‘homeassistant_app_1’
  • copy the file off the container to your local disk, using docker cp <container_name>:/usr/src/homeassistant/homeassistant/components/yamaha/media_player.py .
  • Modify according to your needs
  • bind-mount that file when re-creating the container using docker run -v ./media_player.py:/usr/src/homeassistant/homeassistant/components/yamaha/media_player.py [...] homeassistant/home-assistant

And if you manage to do all this, chances that your changes are gone with the next release will be significant.

Better fork the Git repository and issue a pull-request for your changes.

Even if you could change the resting point for the xml, that doesn’t guarantee that it will work. The xml could be completely different. Just doing a simple google search on UnitDisc.xml shows that it is completely different. It’s meant for multi-cast receivers, meaning you’re using the wrong integration.

I should also clarify: This does not guarantee it will work for your receiver. Try it out, hopefully it will work for you.

1 Like