Support for new Yamaha Receivers and Musiccast devices

Hi @jalmeroth. Thanks for the component.

Although I’m having an issue when having more than one Musiccast device. I get the following error:

2017-09-12 16:27:31 ERROR (MainThread) [homeassistant.components.media_player] Error while setting up platform yamaha_musiccast
Traceback (most recent call last):
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 164, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
  File "/usr/lib/python3.4/asyncio/tasks.py", line 372, in wait_for
return fut.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_musiccast.py", line 56, in setup_platform
receiver = pymusiccast.McDevice(host, udp_port=port)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/pymusiccast/__init__.py", line 148, in __init__
self.initialize()
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/pymusiccast/__init__.py", line 152, in initialize
self.initialize_socket()
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/pymusiccast/__init__.py", line 169, in initialize_socket
raise error
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/pymusiccast/__init__.py", line 167, in initialize_socket
self._socket.bind(('', self._udp_port))
OSError: [Errno 98] Address already in use 

Any ideas?

Hi @azzab80,

thanks for your feedback! Currently, you need to specify a different port per device. So, your config would look like this:

media_player:
  - platform: yamaha_musiccast
    host: 192.168.xx.xx
    port: 5005
  - platform: yamaha_musiccast
    host: 192.168.xx.yy
    port: 5006

I could think of a way to use the same port, but I can’t test this setup due to the lack of a second device. Would you be interested to test this?

HTH,
Jan

1 Like

I am using hassio and tried to create and addon with your code to get it working on my side with no luck. I can provide 4 devices: one Receiver, two WX-030 and one ISX-18D. All music cast devices.

I’m pretty new to hassio and would need a bit of help to get started, then I could help testing and fixing bugs.

Does the the extension work in push mode? My implementation polled the music cast devices.

0.53 just released a music cast component

Works so far for me for all speaker types.

Linking is not yet included but can be archived with curl

Yes, it is.

Hi all,

I’ve got a Yamaha AV receiver that is Musiccast capable, The Main Zone works fine and I can control it well enough from scripts and by automation etc, but I want to be able to control the other ‘Rooms’ in Musiccast that are fed by the Zone 2 config from the the AV Receiver.

From what I can see of the python code it only does a single scan for the main device, and doesn’t loop through the Receiveres zones. The Yamaha receiver component appearst to do zones but I wanted to get Musiccast working. I may have to wait for Musiccast Alexa intergration (due next month) but wanted to see if anyone else was working on this. I can read the code, but writing it would be a bigger step than I want to take at this point in time.

Any thoughts for others that have gone down this Musiccast thread would be more than welcome,

Is there a way to get in touch with the developer of that component code?

Thanks.,
Andy…

Please open an issue here: Issues · jalmeroth/pymusiccast · GitHub. If possible, please provide some details. Thank you!

Sorry to resurrect this, but has anyone here been able to use Text To Speech to a MusicCast device? Or even able top play a MP3 to a WX-030 or RX-V5xx? I am desperately trying to get audio out to these devices but no idea where to start

1 Like

Hi, I’m new to Home Assistant and try to use the Yamaha Network Receiver component to connect my RX-V771.

Works almost perfect :slightly_smiling_face: but a soon as I switch manually to the input TUNER the component throws the following error:

Log Details (ERROR)

Thu Feb 01 2018 19:17:25 GMT+0100

Update for media_player.yamaha_receiver fails

Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py”, line 201, in async_update_ha_state
yield from self.async_device_update()
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py”, line 308, in async_device_update
yield from self.hass.async_add_job(self.update)
File “/usr/lib/python3.6/asyncio/futures.py”, line 332, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.6/asyncio/tasks.py”, line 250, in _wakeup
future.result()
File “/usr/lib/python3.6/asyncio/futures.py”, line 245, in result
raise self._exception
File “/usr/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/lib/python3.6/site-packages/homeassistant/components/media_player/yamaha.py”, line 159, in update
self._play_status = self.receiver.play_status()
File “/usr/lib/python3.6/site-packages/rxv/rxv.py”, line 437, in play_status
playing = (res.find(".//Playback_Info").text == “Play”)
AttributeError: ‘NoneType’ object has no attribute ‘text’

Anyone here with a clue what the problem could be?

thx Stefan

@swalter I am getting the same AttributeError with my RX-V777

Were you able to find a resolution. I am new to Home Assistant as well and just getting started adding my existing components.

I’ve got a Yamaha RXV-3900 and it won’t show up, is this too old? It was a very high end receiver in it’s day (2009) and I can control it from a web interface but regardless if I put host IP address in or not it will not be discovered in HA.

Your receiver doesn’t seem to support music cast.

There are two component in HA one for Receivers directly and one for music cast devices (which newer receivers are as well)

If you didn’t already, then I suggest you try the first one. In case that doesn’t work, I think it makes sense to open an issue here https://github.com/home-assistant/home-assistant/issues

1 Like

Yes, I already tried the first one and still have it in my configuration.yaml file. I’ve tried with and without IP Address. I use it straight out of the box with Simple Control (roomie remote) without any issues over the network. My receiver doesn’t have Music Cast so I won’t even try the first one.

media_player:
  - platform: yamaha
    host: 192.168.0.105

I’ll try opening an issue, thanks for the help.

Thank you for this great work. Is there any plans for linking devices? That would be wonderful.

1 Like

Looks like there is, but it has not had any movement in a few months:

https://github.com/jalmeroth/pymusiccast/pull/13

Unfortunately, it seems the maintainer of the library is not responsive anymore… my PR there is needed before pushing the PR for HA…

Ok, i am also waiting for this feature for some time now. @hcooh could you bypass the maintainer when he is not responding any more?

Thanks
i have 2 yamaha musicast devices and this workt for mew as well

I have 4 music cast devices and all work ok until I restart home assistant. The error Address already in use occurs. After I restart entire system (in my case it is a jail in FreeNAS) the connection works ok again. Seems like the tcp connections are kept open even after home assistant is closed so can’t use the same ports after it starts again until the operating system (jail in my case) is restarted.