Chromecast Radio with station and player selection

Thanks @Bob_NL for this wicked implementation!

Do you have any hints of finding radio streams? All the ones you have in your config example work, but I do not know the first thing about adding my local radio stations. I added a couple of entries that I thought were right after inspecting the page source into the script, and the input_select script put they never stream. Would you have any pointers for me please?

Oh, and forgot to mention that the same config works great for anyone with a mopidy instance as well, not just chromecast.

input_select.yaml

  radio_station:
  name: 'Select Radio Station:'
  options:
    - Radio 538
    - Q-Music
    - 3FM
    - 100% NL
    - Veronica
    - Sky Radio
    - Arrow Classic Rock
    - Classic FM
    - BNR Nieuwsradio
    - SLAM! Hardstyle
    - Sleep Radio
    - Ambient Sleeping Pill
    - Radio Art - Sleep
    - Ambi Nature Radio
    - Calm Radio - Sleep
    - Dinamo.FM Sleep
    - CKBW Bridgewater
    - 89.9 The Wave
 home_radio:
  name: 'Select Speakers:'
  options:
    - ManCave
    - LivingRoom
    - MasterBedroom
    - Bathroom
  initial: ManCave
  icon: mdi:speaker-wireless

scipt.yaml

 radio_house:
   alias: Play Radio on Chromecast Audio
   sequence:
     - service: media_player.volume_set
       data:
         entity_id: media_player.nexus_player
         volume_level: '0.35'
     -  service: media_player.volume_set
        data:
          entity_id: media_player.master_bedroom
          volume_level: '0.20'
     -  service: media_player.volume_set
        data:
          entity_id: media_player.mpd
          volume_level: '0.30'
     -  service: media_player.volume_set
        data:
          entity_id: media_player.bathroom
          volume_level: '0.30'
     -  service: media_player.play_media
        data_template:
          entity_id: >
           {% if is_state("input_select.home_radio", "LivingRoom") %} media_player.nexus_player
           {% elif is_state("input_select.home_radio", "MasterBedroom") %} media_player.master_bedroom
           {% elif is_state("input_select.home_radio", "ManCave") %} media_player.mpd
           {% elif is_state("input_select.home_radio", "Bathroom") %} media_player.bathroom
           {% endif %}
          media_content_id: >
           {% if is_state("input_select.radio_station", "Radio 538") %} http://vip-icecast.538.lw.triple-it.nl:80/RADIO538_MP3
           {% elif is_state("input_select.radio_station", "Q-Music") %} http://icecast-qmusic.cdp.triple-it.nl/Qmusic_nl_live_96.mp3
           {% elif is_state("input_select.radio_station", "3FM") %} http://icecast.omroep.nl/3fm-bb-mp3
           {% elif is_state("input_select.radio_station", "100% NL") %} http://stream.100p.nl/100pctnl.mp3
           {% elif is_state("input_select.radio_station", "Veronica") %} http://8543.live.streamtheworld.com/VERONICACMP3
           {% elif is_state("input_select.radio_station", "Sky Radio") %} http://8623.live.streamtheworld.com:80/SKYRADIOAAC_SC
           {% elif is_state("input_select.radio_station", "Arrow Classic Rock") %} http://91.221.151.155/listen.mp3
           {% elif is_state("input_select.radio_station", "Classic FM") %} http://19143.live.streamtheworld.com/CLASSICFM_SC
           {% elif is_state("input_select.radio_station", "BNR Nieuwsradio") %} http://icecast-bnr.cdp.triple-it.nl/bnr_mp3_96_03
           {% elif is_state("input_select.radio_station", "SLAM! Hardstyle") %} http://vip-icecast.538.lw.triple-it.nl/WEB17_MP3
           {% elif is_state("input_select.radio_station", "Sleep Radio") %} http://37.59.28.208:8722/stream
           {% elif is_state("input_select.radio_station", "Ambient Sleeping Pill") %} http://perseus.shoutca.st:8447/h
           {% elif is_state("input_select.radio_station", "Radio Art - Sleep") %} http://live.radioart.com/fSleep.mp3
           {% elif is_state("input_select.radio_station", "Ambi Nature Radio") %} http://94.23.252.14:8067/stream
           {% elif is_state("input_select.radio_station", "Calm Radio - Sleep") %} http://streams.calmradio.com/api/39/128/stream
           {% elif is_state("input_select.radio_station", "Dinamo.FM Sleep") %} http://channels.dinamo.fm/sleep-aac
           {% elif is_state("input_select.radio_station", "CKBW Bridgewater") %} http://player.listenlive.co/32161
           {% elif is_state("input_select.radio_station", "89.9 The Wave") %} http://chns.streamon.fm/
           {% endif %}
          media_content_type: 'audio/mp3'

Thanks,

1 Like