Automatic radio/playlist on ONKYO receiver

I’m struggling for quite some time now with my Onkyo receiver. It is an old one (TX-NR727), works very well for my home office apart from being able to being able to start music at the start of my workday.

I want the receiver to start playing music when I enter my home office, nothing more, nothing less. This can be either a regular internet radio station or a Spotify playlist (premium user).

I have investigated 3 options.

  1. Native Internet Radio
  2. Radio Browser
  3. Spotify Connect.

The native functionality for Internet Radio requires entering a URL in the Web GUI. As per Play internet radio on Onkyo you can see this is possible with HA can be steered to play. Unfortunately, I cannot seem to get any URL’s working, all internet radio URL i’m finding either don’t work anymore or don’t work with the Onkyo (maybe too old and lack of protocols)?

The radio browser is really nice and has all the radio stations I want / need. But unfortunately I cannot get this playing on my Onkyo, now I found the following: https://rouwette.com/radio-browser/, And it suggests buying a separate device. Now I don’t really want to have additional devices, so I’m hoping there is another solution available.

Spotify connect is a whole different story. I have invested a lot of time to get this going, but I cannot get this working properly. I installed spotcast HACS plugin, together with the Spotify card but also the native Spotify component. Long story short at the beginning of the day, the device ID is not known and thus isn’t it possible to start a spotify playlist. The Device ID is still the same, but even if I hardcode the device ID, it says it cannot find it. If I start the playlist from my normal computer to the Onkyo device, it then finds it.

Does anyone have a decent solution for this?

Hey Martijn,

You say it’s an old device, how old are we talking about, does it support spotify connect and chromecast?

I have a pioneer vsx-932 and it works fine for me . Did you configure the Onkyo integration in your config?
This is mine:

#Pioneer integration
media_player:

  • platform: onkyo
    host: 192.168.2.125
    name: pioneer-VSX932
    sources:
    network_net: “NET”
    fm: “FM”
    max_volume: 100
    receiver_max_volume: 150

I guess you could create an automation that calls a service whenever motion is detected in your home office.
The service then plays your desired music on your receiver.

This is an example of a script that I had created:

alias: StuBru - Studio Brussel
sequence:

  • service: media_player.turn_on
    data: {}
    target:
    entity_id: media_player.pioneer_vsx932
  • service: media_player.play_media
    target:
    entity_id: media_player.pioneer_2
    data:
    media_content_id: media-source://radio_browser/a54ffc18-6ee4-4dd7-a29b-ea0bdbb73ccf
    media_content_type: audio/aac
    metadata:
    title: StuBru
    thumbnail: >-
    https://upload.wikimedia.org/wikipedia/commons/thumb/9/95/VRT_StuBru_logo.svg/1200px-VRT_StuBru_logo.svg.png
    media_class: music
    children_media_class: null
    navigateIds:
    - {}
    - media_content_type: app
    media_content_id: media-source://radio_browser
    - media_content_type: music
    media_content_id: media-source://radio_browser/country/BE
    mode: single
    icon: mdi:file-music
1 Like

Hey Sven and everybody,

I have an Onkyo TX-NR656 which is capable of running TuneIn and Spotify on its own, and has built-in chromecast.

I edited my configuration.yaml to add the media player entry similar to yours, but without specifying sources, as I read those are obtained automatically. THis is what I get in DevTools/States:

source_list:
  - TV
  - Bluray
  - Game
  - Aux1
  - Video 1
  - Video 2
  - Video 3
  - Video 4
  - Video 5
  - Video 6
  - Video 7
  - Radio
volume_level: 0.475
is_volume_muted: false
source: network_net
audio_information:
  format: ""
  input_frequency: ""
  input_channels: ""
  listening_mode: TV Speaker
  output_channels: ""
  output_frequency: ""
video_information:
  input_resolution: Unknown
  input_color_schema: ""
  input_color_depth: 24bit
  output_resolution: 1280 x 720p
  output_color_schema: RGB
  output_color_depth: 24bit
  picture_mode: ""
video_out: yes,out
friendly_name: Onkyo_receiver
supported_features: 20364

Then I wrote the following script (same country, other station :wink:):

alias: VRT Radio 1
sequence:
  - service: media_player.turn_on
    data: {}
    target:
      entity_id: media_player.onkyo_receiver
  - service: media_player.play_media
    data:
      media_content_type: audio/aac
      media_content_id: http://icecast.vrtcdn.be/radio1.aac
      extra:
        title: VRT Radio 1
    target:
      entity_id: media_player.onkyo_receiver
    metadata:
      title: Radio 1
      thumbnail: null
      media_class: music
      children_media_class: null
      navigateIds:
        - {}
        - media_content_type: app
          media_content_id: media-source://radio_browser
        - media_content_type: music
          media_content_id: media-source://radio_browser/country/BE
mode: single
icon: mdi:radio

When I try to run the script, I get the following error:
“Failed to call service script/vrt_radio_1_2. ‘network_net’”.

I once had a script and configuration that worked, but it took ages before the stream started playing. I don’t remember what the entry in configuration.yaml was then.

Any help is appreciated.

Nick

I am using this setup, and it has broken since 2024.7.0, but works under 2024.6.4. I have an issue raised on the integration, but the solution does not require a script. :wink::+1: