Home Assistant – How to use Yamaha MusicCast Speaker Groups

For owners of Yamaha Musiccast audio equipment Home Assistant is a really effective tool to help manage and automate Musiccast functions. In this article we will discuss how to join multiple Musiccast speakers together to enable simultaneous playback throughout multiple locations

Before starting I would advise you complete the following pre requisites:

  1. Configure static IP’s for all your MusicCast devices/speakers and take note of the IP’s. If you are using MusicCast for wireless surround speakers and or subwoofers you probably only need to configure the controlling device for each instance. Help with this can be found at this link.
  2. Install the official Yamaha MusicCast Home Assistant Integration. Help with this can be found at this link.
  3. Install the Custom Mini Media Player card within Home Assistant. See this guide.

If you are happy the above is complete – we can get started!

There are two primary methods for using Speaker Groups:

  1. Using Custom Mini Media Player. This method is good for controlling via Home Assistant Dash Boards
  2. Calling the appropriate service. This is more appropriate in use by automations etc.

Using the Custom Mini Media Player

  1. Firstly, ensure that you have completed the installation of the Custom Mini Media Player within HACS. See this guide for details
  2. Open the Dashboard (formerly known as LoveLace) on which you want to control MusiCast Speaker Groups. If you wish to create a new Dashboard simply go to Settings > Dashboards > Create New
  3. Open the Dashboard and Click to edit the Dashboard by clicking the 3 vertical dots in the top right and selecting edit dashboard.

4. Click Add Card

5. Scroll down to the bottom of the list and select ‘Custom: Mini Media Player

6. Click ‘ Show Code Editor’

7. Copy the below code and edit according to your requirements.

type: entities
entities:
  - type: custom:mini-media-player
    group: true
    entity: media_player.masterspeaker
    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.speaker1
          name: Link Kitchen
        - entity_id: media_player.speaker2
          name: Link Dining Room
        - entity_id: media_player.speaker3
          name: Link Office
        - entity_id: media_player.speaker4
          name: Link Bedroom
        - entity_id: media_player.speaker5
          name: Link Living Room

Points to note:

  • media_player.speaker is simply the Home Assistant entityid for one of your MusicCast devices. if you are unsure of the name of the speaker go to Integrations and within the MusicCast Integration all your speakers should be listed. Click through each and take a note of their names. You will need to click into settings to find the media_player.name entry.
  • media_player.masterspeaker is the speaker that the music/audio will be played from. if you have different scenarios that would change the controlling speaker you will need to create additional custom mini media player cards.
  • I have included 5 additional speakers but you may have less or more. Amend accordingly.
  • You may have other media players within your Home Assistant environment, such as Alexa devices or Sonos speakers etc. Do not add anything into this other than MusicCast devices as MusicCast is not compatible for this. You can use the custom mini media player to create speaker groups of non MusicCast devices

8. Click Save

You will have something that looks like the below (my actual speaker names are listed). Click the two speakers near the top to expand the speaker groups. Toggle speakers according to what you want to link.

Once you are confident you can edit the card once more to add further customisations should you see fit. However, I have never needed anything other than this.

So now you have a method of configuring MusicCast sapeaker groups through your Home Assistant Dashbaords. However, you may also wish to have these automated. We’ll discuss this next…

Automate MusicCast Speaker Groups

Dashboards can be a nice way of managing your Smart Home environment. However, dashboards require manual input. you may prefer an automation to configure your speaker groups. Some scenarios could be:

  • Motion sensor detection at a particular time of day
  • Audio commands received by amazon Alexa
  • Smart buttons
  • Sunrise
  • The detection of another smart device changing to a particular state

I suppose the list could be endless really.

Lets get to it…

To automate speaker groups it is fortunately quite straight forward.

  • Create your automation.
  • Add an action to ‘Call Service’
  • Edit the action in yaml and add the below code making amendments for your own speaker names.
service: media_player.join
target:
  entity_id: media_player.hifi
data:
  group_members:
    - media_player.dining_room_musiccast
    - media_player.kitchen_musiccast

  • Note, the ‘target’ speaker is the controlling speaker from which group members will share audio from.
  • if you switch back to ‘edit in visual editor you should see something like the below.
  • To automate the process to unjoin speakers follow the same process but change the yaml code to the below.
service: media_player.unjoin
target:
  entity_id: media_player.hifi
data: {}

This function can be extremely useful when combined with an automated playback of Spotify but using SpotCast. Please see our guide for how to do this.

Any comments or queries – please add below.

Leave a Comment