How to play radio stations on an Alexa devices?

hello,
has anyone been able to play radio stations on an Alexa media player?
I’ve seen few posts but none was working for me.
thank you!

1 Like

Bit more detail needed?

Presumably you’re using the Alexa Media Player integration from HACS? If not, that’s your starting point.

sorry, yes using alexa media player from hacs.
it discovered all my devices (12). I can send TTS via the mini media player.
I’ve tried the jukebox card from HACS but nothing happens. I’ve tried another radio project which is playing on Chromecast media players but not on the Alexa.

This works for me:

    - service: media_player.play_media
      data: 
        entity_id: media_player.bedroom
        media_content_id: Capital Yorkshire (East)
        media_content_type: TUNEIN
3 Likes

This works for me (you see a short station list):

type: custom:mini-media-player
name: Office
shortcuts:
  label: Radiostations
  list:
    - type: custom
      name: Ibiza Beats Radio
      id: play Ibiza Beats Radio on tunein
    - type: custom
      name: Samui Island Radio
      id: play Samui Island Radio on tunein
artwork: full-cover-fit
entity: media_player.echo_office

1 Like

This is a great idea, I’m now using it, thanks

1 Like

wow, great. thank you so much!
and one more question, is there a way to choose a speaker?
I mean something like input select integrated as the destination speaker rather then have a separate media player for each speaker?

I tried for hours, but no luck, IMO not with this card.
mini-media-player expects entity names or entity_ids, so the friendly names from an input_select dropdown list have to be converted to entitiy names.

Maybe this could work for you, looks like it needs a master though

Grouping does not work with alexa devices.

Supported platforms

  • sonos
  • soundtouch
  • squeezebox2
  • bluesound2
  • snapcast2
  • musiccast_yamaha1
  • linkplay3

Same same, but different:

type: custom:mini-media-player
entity: media_player.echo_office2
name: Office
shortcuts:
  columns: 3
  buttons:
    - type: custom
      name: Milano Lounge
      id: play Milano Lounge on tunein
      icon: mdi:radio
    - type: custom
      name: Sky Radio Lounge
      id: play Sky Radio Lounge on tunein
      icon: mdi:radio
    - type: custom
      name: Club Riva Lounge Radio
      id: play Club Riva Lounge Radio on tunein
      icon: mdi:radio
    - type: custom
      name: Rfm Lounge
      id: play Rfm Lounge on tunein
      icon: mdi:radio
    - type: custom
      name: 06AM Ibiza Underground Radio
      id: play 06AM Ibiza Underground Radio on tunein
      icon: mdi:radio
    - type: custom
      name: Deep House Ibiza
      id: play Deep House Ibiza on tunein
      icon: mdi:radio
    - type: custom
      name: Ibiza Beats Radio
      id: play Ibiza Beats Radio on tunein
      icon: mdi:radio
    - type: custom
      name: Samui Island Radio
      id: play Samui Island Radio on tunein
      icon: mdi:radio
    - type: custom
      name: Café del Mar Radio (official)
      id: play Café del Mar Radio (official) on tunein
      icon: mdi:radio
artwork: full-cover-fit
hide:
  volume: false
  power: true
  source: true
  name: false
  info: true
  controls: false
  progress: true
  icon: true
  state_label: true

2 Likes

thank you very much.
I’ve ended up doing it your way.

type: entities
entities:
  - type: custom:mini-media-player
    name: Bedroom
    shortcuts:
      label: Radio Stations
      columns: 4
      buttons:
        - type: custom
          name: גלי צה"ל
          id: play Galei Zahal on tunein
        - type: custom
          name: רשת ג
          id: play KAN GIMMEL on tunein
        - type: custom
          name: רשת ב
          id: play Kan Bet on tunein
        - type: custom
          name: רדיו ללא הפסקה
          id: play 103fm on tunein
        - type: custom
          name: רדיו תל אביב
          id: play Radio Tel Aviv on tunein
        - type: custom
          name: גלגל"צ
          id: play GLGLZ on tunein
        - type: custom
          name: Smooth 91.5
          id: play Smooth 91.5 on tunein
        - type: custom
          name: Gold 104.3
          id: play Gold 104.3 on tunein
    entity: media_player.bedroom
    group: true
    artwork: none
  - type: custom:mini-media-player
    shortcuts:
      label: Radio Stations
      columns: 4
      buttons:
        - type: custom
          name: גלי צה"ל
          id: play Galei Zahal on tunein
        - type: custom
          name: רשת ג
          id: play KAN GIMMEL on tunein
        - type: custom
          name: רשת ב
          id: play Kan Bet on tunein
        - type: custom
          name: רדיו ללא הפסקה
          id: play 103fm on tunein
        - type: custom
          name: רדיו תל אביב
          id: play Radio Tel Aviv on tunein
        - type: custom
          name: גלגל"צ
          id: play GLGLZ on tunein
        - type: custom
          name: Smooth 91.5
          id: play Smooth 91.5 on tunein
        - type: custom
          name: Gold 104.3
          id: play Gold 104.3 on tunein
    artwork: cover
    entity_id: media_player.{{ states('input_select.amazon_radio') }}
    group: true
    name: Office
    entity: media_player.alex_s_echo
  - type: custom:mini-media-player
    shortcuts:
      label: Radio Stations
      columns: 4
      buttons:
        - type: custom
          name: גלי צה"ל
          id: play Galei Zahal on tunein
        - type: custom
          name: רשת ג
          id: play KAN GIMMEL on tunein
        - type: custom
          name: רשת ב
          id: play Kan Bet on tunein
        - type: custom
          name: רדיו ללא הפסקה
          id: play 103fm on tunein
        - type: custom
          name: רדיו תל אביב
          id: play Radio Tel Aviv on tunein
        - type: custom
          name: גלגל"צ
          id: play GLGLZ on tunein
        - type: custom
          name: Smooth 91.5
          id: play Smooth 91.5 on tunein
        - type: custom
          name: Gold 104.3
          id: play Gold 104.3 on tunein
    artwork: cover
    group: true
    entity: media_player.kitchen_echo_show
    name: Kitchen
title: Radio
theme: noctis
2 Likes

You’re welcome. I like the buttons also better than the dropdown list.

I’d like to make this work. Created with picture card. No results so far. If anyone managed to make full size buttons work playing audio on a Echo device I’d love to see the solution.

type: vertical-stack
cards:

  • type: horizontal-stack
    cards:
    • type: picture
      image: /local/radio/skyradio.jpg
      tap_action:
      action: call-service
      service: media_player.play_media
      service_data:
      media_content_id: https://19993.live.streamtheworld.com/SKYRADIO.mp3
      media_content_type: url
      target:
      device_id: c3e9a08e8f5796271ce56e5adc0bcff9
      entity_id: media_player.echo_dot
      hold_action:
      action: none
    • type: picture
      image: /local/radio/100-NL.png
      tap_action:
      action: call-service
      service: media_player.play_media
      service_data:
      media_content_id: http://stream.100p.nl/100pctnl.mp3
      media_content_type: url
      target:
      device_id: c3e9a08e8f5796271ce56e5adc0bcff9
      hold_action:
      action: none
1 Like

Here you go. Instead of using their stream, play it via tunein:

type: custom:layout-card
layout: vertical
cards:
  - type: picture
    image: >-
      https://www.milanolounge.net/wp-content/uploads/cropped-Milano-Lounge-2021-300x300-1.png
    tap_action:
      action: call-service
      service: media_player.play_media
      service_data:
        media_content_type: custom
        media_content_id: play Milano Lounge on tunein
      target:
        entity_id: media_player.echo_office2
    hold_action:
      action: none
  - type: picture
    image: >-
      https://www.pureibizaradio.com/wp-content/uploads/2020/05/cropped-LETRAS-PURE-180x180.png
    tap_action:
      action: call-service
      service: media_player.play_media
      service_data:
        media_content_type: custom
        media_content_id: play PURE IBIZA RADIO on tunein
      target:
        entity_id: media_player.echo_office2
    hold_action:
      action: none

and so on.

4 Likes

Does anyone know how to do this with say NFC tags? I like how you can just issue the command directly and this would be super handy for telling Alexa what album to play as well. I"ve been messing around with this with other automations but this is a cool card.

Nevermind figured it out with the service call thank you so much

service: media_player.play_media
data: 
  media_content_type: custom
  media_content_id: play The Album The Wall by Pink Floyd
target:
  entity_id: media_player.office_alexa

Little late to the party but as a ‘newer’ guy I’ve struggled. This post was VERY helpful with examples.
Here’s what I came up with and it’s working great!!! Thank you all and I hope this helps another ‘new’ guy.

- type: custom:mini-media-player
          entity: media_player.john_s_echo_show
          name: Home
          shortcuts:
            columns: 2
            buttons:
              - type: SIRIUSXM
                name: Ozzy's Boneyard
                id: play ozzy's boneyard
                icon: mdi:radio
              - type: SIRIUSXM
                name: Octane
                id: play octane
                icon: mdi:radio
              - type: SIRIUSXM
                name: Turbo
                id: play Turbo
                icon: mdi:radio
              - type: SIRIUSXM
                name: RockBar 313
                id: play rockbar 313
                icon: mdi:radio
              - type: SIRIUSXM
                name: Hair Nation
                id: play hair nation
                icon: mdi:radio
              - type: SIRIUSXM
                name: Classic Rewind
                id: play classic rewind
                icon: mdi:radio
              - type: SIRIUSXM
                name: Classic Vinyl
                id: play classic vinyl
                icon: mdi:radio
              - type: SIRIUSXM
                name: Liquid Metal
                id: play liquid metal
                icon: mdi:radio
            artwork: full-cover-fit
            hide:
              volume: true
              power: true
              source: true
              name: true
              info: false
              controls: false
              progress: true
              icon: true
              state_label: true

It doesn’t show what song is playing and the progress doesn’t work but it does work and it’s a start :slight_smile:

sirius

I have this…

service: media_player.play_media
data_template:
  entity_id: media_player.office
  media_content_id: 'Fly FM'
  media_content_type: TUNEIN

I expect it to play the station of the left, but it keeps on playing the one on the right.

This is the station URL that I want it to play; Fly FM, 95.8 FM, Kuala Lumpur, Malaysia | Free Internet Radio | TuneIn

I have tried the station ID; 54528 as well but failed. Any suggestion on how to fix this?

This works for me.

service: media_player.play_media
data:
  media_content_type: custom
  media_content_id: play fly fm on tunein
target:
  entity_id: media_player.echo_office
2 Likes