Stream an mp3 or webradio directy to a receiver

Guys, i have a receiver, brand “denon”, i listen a lot of internet radio on it, direcly with the denon service
but sometimes if the denon service is down, internet radio doesnt work anymore

so can i play a mp3 file directly on the receiver?
it has a lot of source, see below, also stuf like spotify connect, thats working well, only spotiy doesnt have local fm radio :frowning:

will a script like below work? i need to select the source also, just a little bit lost here

radio_music:
  alias: Radio
  sequence:

  -  service: media_player.select_source
     data_template: 
       entity_id: media_player.denon_avrx4000
       source: NETWORK

  -  service: media_player.play_media
     data_template:
       entity_id: media_player.denon_avrx4000
       data:
         media_content_id: http://icepe5.infomaniak.ch/jazzblues-high.mp3
         media_content_type: audio/mp4

avaible sources from my denon receiver :

source_list: AUX1,Blu-ray,CBL/SAT,CD,CHROMECAST,DVD,Favorite Station1,Favorite Station2,Favorite Station3,Favorite Station4,Favorites,Flickr,GAME,Internet Radio,Last.fm,MEDIA PLAYER,Media Server,NETWORK,PHONO,Spotify,TUNER,TV AUDIO,iPod/USB

PS: last fm doesnt work, not included in our country

1 Like

i have the error below if i run that script

media_player.play_media: extra keys not allowed @ data[‘data’]. Got {‘media_content_id’: ‘http://icepe5.infomaniak.ch/jazzblues-high.mp3’, ‘media_content_type’: ‘audio/mp4’}
required key not provided @ data[‘media_content_id’]. Got None
required key not provided @ data[‘media_content_type’]. Got None

Try quoting in your script, like

media_content_id: "http etc"

single quote did the trick, thnx

Have Denon AVRX 1000 and for me not working this. Switch to network but not start the internet radio. Do you have solution internet radio for Denon player?
I see that this script 2 years old. Is it working for you now?

i just use favorites for internet radion now

Can you give some help about favorites? In the past about 4 years ago setup some favorites internet radio but don’t remember how. How to edit old favorites? Thank Your help.

Just listen to a channel, then keep a favorite button pressed on your remote for a few seconds, then it’s saved