Support for new Yamaha Receivers and Musiccast devices

Tags: #<Tag:0x00007f77fe1509f0>

The current yamaha components allow the automatic integration of Yahama Receivers such as HTR-4065, RX-V473, RX-V573, RX-V673, RX-V773 and some others. The component is limited on devices built earlier than 2013.
So any modern Yamaha Receiver (all Music Case devices) are not supported.
This can be found in a changed api. The API is now not using port 80 any more (instead 49154) and in addtion uses another http://:49154/MediaRenderer/desc.xml file. A description for it can be found here:

I second this.

For testing I have an YSP-5600, WX030 and WX010 available.

1 Like

Can test on n470d. Results should be valid for n570d too.

What I did aleady:
Changing the port in the dors not resolve
Linking to the mediarender desc xml does not help either

Guess the structure has changed

Someone has already implemented into Python, not sure how helpful this is:

I have started to implement a musiccast meda_player component using the pyamaha library. Right now I am using the yamaha component as a base.

Is there any documentation how to create a media_player component?

How does the tts integration work?

1 Like

Feel free to test this as a custom component:

1 Like

good work! seems to work all right!
zone-detection is not working properly yet, though, but i guess you know that and it’s to early in in development. (it detects both of my zones on a RX-V58, but does not display the proper names and status.)

Will do some testing in the next week, but thanks so far!

I can spend a brief look at the multi zone stuff. But I do not have a real test environment for that. In order to see a real progress here somebody with the right equipment should take a look at the code.
I would also like to have the ability to play tts. But the docs are quite thin here. I would need the HTTP commands which are needed to play server (DLNA) protocol. Another problem is that I do not know how to stream tts as DNLA.
The home assistant gui is also quite strange. I do not see a pause button only a stop button is displayed. I do not know the difference between pause and play pause… The play button is also not shown.

As you can see there are alot of open points here. Is anybody able to help me? I can put the code in a git branch…

Works like a charm on the WX-030 speaker as well!
Have you had any thoughts on multiroom support? Is it supported in the API?

Multiroom should be possible but I have to wait for this feature:

That’s great! Thanks!

Thanks @runningman84, working a treat.

For multi-room I’ve hacked together some shell commands if anyone who wants to get it working in the meantime. Only tested the last few days but seems to work fine.

set_musiccast_link: 'bash /home/homeassistant/.homeassistant/ {{server}} {{client1}} {{client2}}'


curl -X POST \
  http://$server/YamahaExtendedControl/v1/dist/setServerInfo \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'postman-token: d2dc5682-22b6-1297-f028-d78161174a8e' \
  -d '{   "group_id":"9A237BF5AB80ED3C7251DFF49825CA42",   "zone":"main",   "type":"add",   "client_list":[     "'$client1'",     "'$client2'"   ] } '

  curl -X POST \
  http://$client1/YamahaExtendedControl/v1/dist/setClientInfo \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'postman-token: dc14aeea-3b30-1c29-92d8-d6c5bed7e606' \
  -d '{   "group_id":"9A237BF5AB80ED3C7251DFF49825CA42",   "zone":[     "main",     "zone2"   ] } '

   curl -X POST \
  http://$client2/YamahaExtendedControl/v1/dist/setClientInfo \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'postman-token: dc14aeea-3b30-1c29-92d8-d6c5bed7e606' \
  -d '{   "group_id":"9A237BF5AB80ED3C7251DFF49825CA42",   "zone":[     "main",     "zone2"   ] } '

  curl -X GET \
  http://$server/YamahaExtendedControl/v1/dist/startDistribution?num=2 \
  -H 'cache-control: no-cache' \
  -H 'postman-token: 93735dd9-87a7-ac7e-7963-5b82d4e3758f'

And to call from an automation provide server and and 1 or 2 clients:

- alias: Enable Bedroom MusicCast Alarm
    platform: state
    entity_id: sensor.bathroom_motion
    to: 'Detected'
    - service: shell_command.set_musiccast_link
        server: '{{""}}'
        client1: '{{""}}'
        client2: '{{""}}'

I started to develop a Media Player component for Yamaha MultiCast devices. Right now it supports setting devices On, Off, Mute, Volume, Play States, Input, Input-Select… more to come.

You can find my Home Assistant Custom Component here:

and the corresponding Python 3 Library lives here:

If anybody wants to join forces in helping to bring this to life, feel free! :slight_smile:

Your code looks similar to my implementation. Maybe you can find out how to play any mp3 file which would be great for tts

Maybe you can find out how to play any mp3 file which would be great for tts

What do you imagine how this should work?

The musiccast Android app can play local media files. Maybe a packet capture can show the corresponding api calls.

Interesting, by local media files you mean files hosted on the Android device? I don’t own an Android device, so I can’t look into this. But if you find something, let me know.

yes for android this works fine. It is also possible to browse and play files from dnla servers.
Maybe android also creates a dnla server for musiccast I do not know yet.

Unfortunately my wlan ap crashes using tpcdump on it and my android phone is not rooted. It is quite difficult to capture the traffic in this case…