Yahama net_radio media_content_id

Really can’t figure out what is must be to get start net radio on my Yamaha.
The scripts is turning on the receiver. is changing the volume. And the last step switching to net radio and the musicstation is not working

qmusic:
  alias: Q-Music
  sequence:
  - data:
      entity_id: media_player.woonkamer_main
    service: media_player.turn_on
  - data:
      entity_id: media_player.woonkamer_main
      volume_level: 0.3
    service: media_player.volume_set
  - data:
      entity_id: media_player.woonkamer_main
      media_content_id: Radio>Favorites>Qmusic
      media_content_type: NET RADIO
    service: media_player.play_media

Following options are not working in my case:

Radio>Favorites>Qmusic
Bookmarks>Internet>Qmusic

How can I find the right content_id.

Best regards
ocean

any one how can help?

Still can not turn on my receiver en let it play the selected station with media_content_id.

Someone how has a example for me?

I’ve been struggling with this as well. I did work for me with the script you mentioned in your first post. Suddenly not anymore.

Today I saw a post in the Mini Media Player section on the forum. There was mentioned that the selection of a station in your favorites will not work when your receiver is added under the Yamaha Musiccast integration. So I tried to add my receiver as under the Yamaha integration. I tried the script and it does work now!

Maybe this can help you.

This is the post:

1 Like

How is your config look like?
What did you put in de config for the yamaha

media_player:

    # Yamaha
  - platform: yamaha_musiccast
    host: 192.168.1.xxx
    port: 5005

My config is the config for the Yamaha Network Receivers integration.

media_player:
  - platform: yamaha
    host: 192.168.xxx.xxx

I have the same problem, and cannot load any radio stations from my musiccast devices. Anyone got a solution

I also cannot get it running.
Radio>Favorites>Radio RAM
does not respond :confused:

 yamaha_radio_ram:
   alias: Yamaha Radio FM4
   sequence:
   - service: media_player.select_source
     data:
       entity_id: media_player.salon_main
       source: net_radio
   - service: media_player.play_media
     data:
       entity_id: media_player.salon_main
       media_content_id: "Radio>Favorites>Radio RAM"
       media_content_type: "NET RADIO"

Okay I have a workaround for net radio with Yamaha musiccast devices (as opposed to Yamaha driver).

In my deployment I have both Yamaha RX receivers (such as the RX3080) which you can use either the Yamaha integration or the musiccast integration, and the Yamaha Multiroom amp (the excellent XDA-QS5400RK) with which you can only use the musiccast integration.

First thing to note is that is that the RX series amps use ‘NET RADIO’ as source, the XDA used ‘net_radio’, so check the source_list for your device to see what it uses.

With the Yamaha integration the RX’s work fine with the ‘normal’ call:

      - service: media_player.play_media
        data:
          entity_id: '{{ states.var.tmp_receiver.state }}'
          media_content_type: 'NET RADIO'
          media_content_id: 'Radio>Favorites>{{ demand }}'

As others have found, I couldn’t get any combination of media_content_id: to work with the musiccast devices.

What I did find though was the musiccast API guide, here.

There is an API call to pick one of the preset favourites (which you can set up from the musiccast app)

From this I was able to generate a rest_command to add to my configuration.yaml:

rest_command:
  musiccast_net_radio:
    url: "http://{{ ip }}/YamahaExtendedControl/v1/netusb/recallPreset?zone=main&num={{ preset }}"
    method: GET

Where ip is the ip of the musiccast device, and preset is the number of the preset.

This can then be called as a normal service, for example:

      - service: rest_command.musiccast_net_radio
        data:
          ip: 10.0.51.18
          preset: 1

You still need to media_player.turn_power_on, and set the source to ‘net_radio’ before making the rest call.

I hope that helps!

Meanwhile I have done almost same:
(xxx.xxx.xxx.xxx = ip of yamaha)

configuration.yaml:

rest_command:
  netradio_nowyswiat:
    url: 'http://xxx.xxx.xxx.xxx/YamahaExtendedControl/v1/netusb/recallPreset?zone=main&num=1'
  netradio_radioram:
    url: 'http://xxx.xxx.xxx.xxx/YamahaExtendedControl/v1/netusb/recallPreset?zone=main&num=2'
  netradio_radiofm4:
    url: 'http://xxx.xxx.xxx.xxx/YamahaExtendedControl/v1/netusb/recallPreset?zone=main&num=3'
  netradio_radio357:
    url: 'http://xxx.xxx.xxx.xxx/YamahaExtendedControl/v1/netusb/recallPreset?zone=main&num=4'

I just call scripts to change radio
scripts.yaml:

yamaha_radio_nowyswiat:
  alias: Radio Nowy Świat
  sequence:
  - service: rest_command.netradio_nowyswiat
yamaha_radio_ram:
  alias: Radio RAM
  sequence:
  - service: rest_command.netradio_radioram
yamaha_radio_fm4:
  alias: Radio FM4
  sequence:
  - service: rest_command.netradio_radiofm4
yamaha_radio_357:
  alias: Radio 357
  sequence:
  - service: rest_command.netradio_radio357

And dashboard:

  - type: 'custom:fold-entity-row'
    head:
      type: section
      label: Stacje radiowe
    group_config:
      secondary_info: last-changed
      icon: 'mdi:play'
    entities:
      - entity: script.yamaha_radio_nowyswiat
      - entity: script.yamaha_radio_357
      - entity: script.yamaha_radio_fm4
      - entity: script.yamaha_radio_ram

Przechwytywanie

1 Like

I know this post is a little bit older and maybe you have found a solution, but I was working on this part too today and could get it to work. Im using a yamaha rx-a820 and I have to switch to the input “NET RADIO” first before i can play a radio station. This little bit strange behavior. If you manually select NET RADIO and switch back to HDMI or other input, you can use directly the “play_media” service, but if I powering the AVR off and on again. The “play_media” service is not working and the AVR stays on the last used INPUT. But if I use “select source” first its working fine. Maybe this help you out too :slight_smile:

here is my fully working script:

play_radio_bob:
  alias: Play Radio BOB
  sequence:
  - service: media_player.turn_on
    target:
      entity_id: media_player.yamaha_receiver
  - delay:
      hours: 0
      minutes: 0
      seconds: 5
      milliseconds: 0
  - service: media_player.volume_set
    data:
      volume_level: 0.34
    target:
      entity_id: media_player.yamaha_receiver
  - service: media_player.select_source
    target:
      entity_id: media_player.yamaha_receiver
    data:
      source: NET RADIO
  - service: media_player.play_media
    data:
      media_content_type: NET RADIO
      media_content_id: Lesezeichen>radio>RADIO BOB!
    target:
      entity_id: media_player.yamaha_receiver
  mode: single
1 Like

Also wanted to share some of my thoughts and a bit different config that uses the REST call. What I found is that the REST call takes a bit longer than any of the built-in integrations.

rest_command:
  musiccast_net_radio:
    url: "http://{{ ip }}/YamahaExtendedControl/v1/netusb/recallPreset?zone=main&num={{ preset }}"
    method: GET
play_radio:
  alias: Play Radio
  variables:
    selected_preset: 1
  sequence:
  - service: media_player.turn_on
    target:
      entity_id:
      - media_player.kuchnia
      - media_player.lazienka
  - delay:
      hours: 0
      minutes: 0
      seconds: 1
      milliseconds: 0
  - service: media_player.select_source
    data:
      source: net_radio
    target:
      entity_id: media_player.kuchnia
  - service: rest_command.musiccast_net_radio
    data:
      ip: 192.168.0.11
      preset: '{{ selected_preset }}'
  - service: media_player.volume_set
    data:
      volume_level: 0.36
    target:
      entity_id:
      - media_player.kuchnia
      - media_player.lazienka
  mode: single
  icon: mdi:radio

Mini Media Player:

type: custom:mini-media-player
group: true
name: ' '
hide:
  icon: true
  source: true
speaker_group:
  platform: media_player
  show_group_count: false
  expanded: false
  entities:
    - entity_id: media_player.kuchnia
      name: Kitchen
    - entity_id: media_player.lazienka
      name: Bathroom
    - entity_id: media_player.pokoj_dzienny
      name: Living room
artwork: material
shortcuts:
  columns: 3
  buttons:
    - name: Radio Nowy Świat
      type: script
      id: script.play_radio
      icon: mdi:radio
    - name: Radio 357
      type: script
      id: script.play_radio
      data:
        selected_preset: 2
      icon: mdi:radio
    - name: Spotify
      type: source
      id: spotify
      icon: mdi:spotify
info: scroll
volume_stateless: false
entity: media_player.kuchnia

This works very well. You can also use it to control tidal

None of the API commands posted here work for me to select net radio favourites so I sniffed the app traffic :

{receiver ip.address}/YamahaExtendedControl/v1/netusb/setListControl?list_id=main&type=play&index={favourite number}&zone=main

Works, index starts at 0.

1 Like

In case this helps anyone this works for me playing Net Radio stations, using presets.

alias: MusicCast test
sequence:
  - service: media_player.turn_on
    data: {}
    target:
      entity_id: media_player.room1
  - delay:
      hours: 0
      minutes: 0
      seconds: 2
      milliseconds: 0
  - service: media_player.select_source
    data:
      source: net_radio
    target:
      entity_id: media_player.room1
  - service: media_player.volume_set
    data:
      volume_level: 0.5
    target:
      entity_id: media_player.room1
  - service: media_player.play_media
    data:
      media_content_type: NET RADIO
      media_content_id: presets:1
    target:
      entity_id: media_player.room1
mode: single
icon: mdi:audio-video
2 Likes

Thank you, I have been playing around and this combination works perfectly.
I had it working and then it would fail the next day, but this seems to give me consistent results.

1 Like