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.
Native Internet Radio
Radio Browser
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.
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:
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 ):
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.
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.