How do I join/unjoin Yamaha musiccast speakers?

If you use platform type media_player, it works. This is my config, it works for me. The join service is part of the media_player scope I guess.

          - type: custom:mini-media-player
            entity: media_player.1st_floor_living_receiver
            artwork: cover
            artwork_border: true
            power_color: true
            show_source: true
            sync_volume: true
            expanded: true
            speaker_group:
              platform: media_player
              show_group_count: true
              entities:
                - entity_id: media_player.2nd_floor_office_speakers
                  name: Musiccast Office
                - entity_id: media_player.2nd_floor_loft_receiver
                  name: Musiccast Loft
                - entity_id: media_player.1st_floor_living_receiver
                  name: Musiccast Living
                - entity_id: media_player.basement_cinema_receiver
                  name: Musiccast Cinema
6 Likes

Did anybody know how this could work in official musiccast integration?

thanks.

I created an automation using rest http calls , documented in Yamaha advanced api doc.
To group two speakers it takes few http calls, so it is easy enough to do.

Example or rest calls - part of configuration.yaml:

rest_command:
  
  speaker_group:
    url: "http://speaker/YamahaExtendedControl/v1/dist/setClientInfo"
    method: POST
    content_type: 'application/json; charset=utf-8'
    payload: '{"group_id": "0000000000000000000000000000000A", "zone": ["main"]}'
  mainspeaker_link:
    url: "http://mainspeaker/YamahaExtendedControl/v1/dist/setServerInfo"
    method: POST
    payload: '{ "group_id": "0000000000000000000000000000000A", "zone": ["main"], "type": "add", "client_list": ["192.168.1.99"]}'
  mainspeaker_group_name:
    url: "http://mainspeaker/YamahaExtendedControl/v1/dist/setGroupName"
    method: POST
    payload: '{ "name": "LinkedSpeakers"}'
  mainspeaker_start_group:
    url: "http://mainspeaker/YamahaExtendedControl/v1/dist/startDistribution?num=0"  

So, i have two speakers , named

  • “speaker” with and ip address 192.168.1.99
  • “mainspeaker” , which is the “owner” of the group.

then, in the automation, I am calling the services in this order:

service: rest_command.speaker_group
service: rest_command.mainspeaker_link
service: rest_command.mainspeaker_group_name
service: rest_command.mainspeaker_start_group

That is all, i have speakers linked.
The ip adress can change if dhcp is used - it is better to have the ip static for the speakers.
GroupId is whathever, as long as it is the same in both rest calls.

I was able. This one works using the custom mini media player from HACS and the official Musiccast integration.
Here is my code, Enjoy!

type: entities
entities:
  - type: custom:mini-media-player
    group: true
    entity: media_player.home_theater_room
    toggle_power: false
    artwork: cover
    artwork_border: true
    power_color: true
    show_source: true
    sync_volume: true
    expanded: true
    speaker_group:
      platform: media_player
      show_group_count: true
      entities:
        - entity_id: media_player.kitchen_2
          name: Link Kitchen
        - entity_id: media_player.master_bedroom_2
          name: Link Master Bedroom
        - entity_id: media_player.office
          name: Link Office
        - entity_id: media_player.home_theater_room_zone2
          name: Link Patio
  - type: custom:mini-media-player
    entity: media_player.kitchen_2
    group: true
    toggle_power: false
  - type: custom:mini-media-player
    entity: media_player.master_bedroom_2
    group: true
    controls: true
    toggle_power: false
  - type: custom:mini-media-player
    entity: media_player.office
    group: true
    toggle_power: false
  - type: custom:mini-media-player
    entity: media_player.home_theater_room_zone2
    name: Patio (Zone 2)
    group: true
    toggle_power: false
header:
  type: picture
  image: /local/images/musiccast.png
  tap_action:
    action: none
  hold_action:
    action: none
state_color: true

4 Likes

With the above, can you control individual volumes for each zone? Say if I have ‘Kitchen’ as the master, and link ‘bedroom’, you still only get volume control for Kitchen. Could you include a volume control for each zone linked to the master zone?

I was hoping to configure something like this when I set it up last night also. Sync volume true wasn’t working when I tested it.

I ended up with something really ugly for individual volume.

Actually I was also having issue with volume sync not working, the code just needed slight tweaking from above. The sync_volume: true needed to be under speaker_group:. Here is my working code.

type: entities
entities:
  - type: custom:mini-media-player
    group: true
    entity: media_player.rx_v581
    toggle_power: false
    artwork: cover
    artwork_border: true
    power_color: true
    show_source: true
    expanded: true
    speaker_group:
      platform: media_player
      show_group_count: true
      sync_volume: true
      entities:
        - entity_id: media_player.rx_v2085_zone2
          name: Link Kitchen
        - entity_id: media_player.rx_v2085_zone3
          name: Link Office
  - type: custom:mini-media-player
    entity: media_player.rx_v2085_zone2
    name: Kitchen
    group: true
    toggle_power: false
  - type: custom:mini-media-player
    entity: media_player.rx_v2085_zone3
    name: Office
    group: true
    controls: true
    toggle_power: false
state_color: true

After countless hours messing with this, I can confirm that this solution is working for the official MusicCast integration using platform: media_player.

Thank you all for your posts!!!

Here is my code:

type: entities
entities:
  - type: custom:mini-media-player
    group: true
    entity: media_player.living_room
    toggle_power: false
    artwork: full-cover
    artwork_border: true
    power_color: true
    show_source: true
    expanded: true
    speaker_group:
      platform: media_player
      sync_volume: true
      show_group_count: true
      icon: mdi:link
      entities:
        - entity_id: media_player.kitchen
          name: Link Kitchen
  - type: custom:mini-media-player
    entity: media_player.kitchen
    group: true
    toggle_power: false
state_color: true

I noticed that if I add the sync volume= true after the speaker group, my main source volume didn’t work on the card. Could you please check yours. Please let me know.

Hi. I have sync volume = true enabled. If I change the grouped card’s volume, it is reflected in the individual main source card’s volume too, and vice versa. Hope that’s what you were asking.

I can confirm that in March 2024, this is all working. For any newbies visiting, like me, here is the summary:

  1. Install Advanced SSH and Terminal
  2. so that you can then install HACS
  3. so that you can then install Mini Media Player
  4. then create a card on the dashboard and paste some of the above codes into it, pay attention to the following:
    a. rename the device id to those of your own
    b. Musiccast integration in HACS is no longer present and is not needed. Musiccast is now baked into HA.
    c. If you pasted codes from earlier in this thread, you would have trouble with the join service. You need to use the later codes users have posted, which use the media_player as “platform” instead of musiccast_yamaha or yamaha_mussicast.

Hope this summary at March 2024 helps some newbies.

1 Like

@Jinster Thanks for this!! I started playing with this over a year ago and then gave up. My only question is, should I remove the existing HACS MusicCast integration and start over again?

Ok after playing with this code a little bit, I need to see if there’s anyway to tweak it a little bit. Here’s a pic of what I have so far:

I’ve linked my Patio System, Living Room System and Garage system. The question I have is, with this the way it’s coded currently, the Patio always has to be the master of the group. Is there any way at all to change this so I can choose the master source, and then based on that selection, have the nested group option change to reflect the other rooms being available. In other words, if I choose the Living Room as the master source for the group, then the linking option would show Patio and Garage. If I choose the Patio as the master source, then the group list would change to reflect that the Living Room and Garage are now the other rooms available to be linked. You can see that I’ve added the Patio in to the group so it reflects as being the “Master” (this was also necessary to have my RX-602 have it’s volume changed when I moved the master volume slider.

Here’s my code if anyone has any thoughts:

type: entities
entities:
  - type: custom:mini-media-player
    group: true
    entity: media_player.patio
    toggle_power: false
    power_color: true
    show_source: true
    expanded: true
    speaker_group:
      platform: media_player
      sync_volume: true
      show_group_count: true
      icon: mdi:link
      entities:
        - entity_id: media_player.patio
          name: Link Patio
        - entity_id: media_player.living_room
          name: Link Living Room
        - entity_id: media_player.garage
          name: Link Garage
  - type: custom:mini-media-player
    entity: media_player.patio
    group: true
    toggle_power: false
  - type: custom:mini-media-player
    entity: media_player.living_room
    group: true
    toggle_power: false
  - type: custom:mini-media-player
    entity: media_player.garage
    group: true
    toggle_power: false
state_color: true
show_header_toggle: true

Made a few more changes and I’m really happy with the layout so far. I think in order to manage my groups, I am going to buy one more MusicCast Device (probably the WXC-50 preamplifier) and just make that the group master that doesn’t actually play out to any speakers. Then I can link each room to that master.

Here’s my latest group control layout:

And here’s the code:

type: entities
entities:
  - type: custom:mini-media-player
    group: true
    entity: media_player.patio
    name: MEDIA PLAYER
    artwork: none
    hide:
      power: true
      icon: true
      toggle_power: false
      info: true
      volume: true
    power_color: true
    show_source: true
    expanded: true
    speaker_group:
      platform: media_player
      sync_volume: false
      show_group_count: false
      expanded: true
      icon: mdi:link
      entities:
        - entity_id: media_player.patio
          name: Link Patio
        - entity_id: media_player.home_theater_room
          name: Link Home Theater
        - entity_id: media_player.living_room
          name: Link Living Room
        - entity_id: media_player.garage
          name: Link Garage
  - type: custom:mini-media-player
    entity: media_player.patio
    icon: mdi:spotify
    name: Now Playing
    artwork: material
    info: scroll
    hide:
      volume: true
      source: true
      power_state: true
      power: true
      controls: true
  - type: custom:mini-media-player
    entity: media_player.home_theater_room
    name: Home Theater
    group: true
    toggle_power: false
    artwork: none
    hide:
      power: false
      source: true
      info: true
      icon: true
      progress: true
      controls: true
  - type: custom:mini-media-player
    entity: media_player.living_room
    group: true
    toggle_power: false
    artwork: none
    hide:
      power: false
      source: true
      info: true
      icon: true
      progress: true
      controls: true
  - type: custom:mini-media-player
    entity: media_player.patio
    group: true
    toggle_power: false
    artwork: none
    hide:
      power: false
      source: true
      info: true
      icon: true
      progress: true
      controls: true
  - type: custom:mini-media-player
    entity: media_player.garage
    group: true
    toggle_power: false
    artwork: none
    hide:
      power: false
      source: true
      info: true
      icon: true
      progress: true
      controls: true
state_color: true
show_header_toggle: true
1 Like