This is the site: Alexa Skill Radio Browser - TuneIn alternative
It’s an Alexa skill. You enable it on your Alexa, then you link it; and then you go in via a browser and edit your favourites (either with URLs or using their database) and ensure each is assigned a number. Then to call it locally you say Alexa, play [number of favourite] or via this integration, you effectively send the same command.
Make sure you have Alexa Media Player enabled in HomeAssistant. Try to create a card manually on the dashboard. Edit code and put in this;
- type: custom:mini-media-player
artwork: full-cover-fit
entity: media_player.john_s_echo_show
name: Home
shortcuts:
columns: 2
buttons:
- type: custom
name: [Name of station]
id: tell radio browser [Favourite number from Radio Browser]
image: [link to radio logo URL]
- type: custom
My Echo devices show in the list of media player,
but while the radio plays on Chromecast, nothing happens on
the Echo devices (mbr_desk_show5) ,
though I do get pop-up that automation runs succesfully.
Ok, answering to myself.
I got it working, here is how.
I created a routine in Alexa:
when I tell Alexa “joue la patate douce”
then run voice command “tell radio browser number 1”
(with the prerequisite in my post above regarding the favorites in Radio Browser)
In HA, create a script:
alias: "Media: Play La Patate Douce on Office"
sequence:
- service: media_player.play_media
data:
media_content_id: joue la patate douce # exact name of the routine
media_content_type: routine
enqueue: replace
target:
entity_id: media_player.office
mode: single
icon: mdi:radio
Hi, I have Alexa playing TuneIn since quite a long time (2 years). I created a Script to randomly play a radio everyday morning when I enter in my kitchen and also when my wife returns home.
It is quite reliable for the radio play, but the code has some issues (written further below). Maybe someone could help me .
alias: Play Radio
description: >-
0: Alpha FM, 1: Nova Brasil FM, 2: Band FM, 3: FM Dos Chile, 4:Milano Lounge,
5: Regenbogen 2, 6: Spotify: Vintage Cafe, 7: Spotify: Sad Songs, 8: Spotify:
Colecao MPB, 9:Spotify: Viagem de Carro - So Brasil
fields:
entity_id:
name: Media Player Entity ID
description: The entity_id of the media player
required: true
selector:
entity:
domain: media_player
notify_entity:
name: Notify Entity
description: The entity to send notifications to
required: true
selector:
entity:
domain: input_select
sequence:
- service: script.new_script
data: {}
- service: notify.alexa_media_echo_show_8
data:
message: |-
{% if states("input_number.number_random") | int == 1 %}
Tocando a rádio Nova Brasil FM Sao Paulo
{% elif states("input_number.number_random") | int == 2 %}
Tocando a rádio Band FM Sao Paulo
{% elif states("input_number.number_random") | int == 3 %}
Tocando a rádio FM Dos Chile
{% elif states("input_number.number_random") | int == 4 %}
Tocando a rádio Milano Lounge
{% elif states("input_number.number_random") | int == 5 %}
Tocando Rádio Regenbogen
{% elif states("input_number.number_random") | int == 6 %}
Tocando Playlist Vintage Café no Spotify
{% elif states("input_number.number_random") | int == 7 %}
Tocando Playlist Sad Songs no Spotify
{% elif states("input_number.number_random") | int == 8 %}
Tocando a Playlist MPB no Spotify
{% elif states("input_number.number_random") | int == 9 %}
Tocando a Playlist Viagem de Carro no Spotify
{% else %}
Tocando a rádio Alpha FM Sao Paulo
{% endif %}
data:
type: announce
- delay: "00:00:10"
- if:
- condition: numeric_state
entity_id: input_number.number_random
below: 6
then:
- service: media_player.play_media
data:
media_content_id: |-
{% if states("input_number.number_random") | int == 0 %}
play Alpha FM Sao Paulo on tunein
{% elif states("input_number.number_random") | int == 1 %}
play Nova Brasil FM Sao Paulo on tunein
{% elif states("input_number.number_random") | int == 2 %}
play Band FM Sao Paulo on tunein
{% elif states("input_number.number_random") | int == 3 %}
play FM-Dos-985-s24997 on tunein
{% elif states("input_number.number_random") | int == 4 %}
play Milano Lounge on tunein
{% elif states("input_number.number_random") | int == 5 %}
play Radio Regenbogen on tunein
{% endif %}
media_content_type: custom
target:
entity_id: "{{ entity_id }}"
else:
- service: media_player.select_source
entity_id: media_player.spotify_william_vidal
data:
source: "{{ entity_id }}"
- delay: "00:00:03"
- service: media_player.media_play
data: {}
target:
entity_id: media_player.spotify_william_vidal
- service: media_player.play_media
data:
media_content_id: |-
{% if states("input_number.number_random") | int == 6 %}
https://open.spotify.com/album/5dPAnuLyn7AHGV6XIIcY64?si=-hAia_UsSrCr8SVyPXpcCQ
{% elif states("input_number.number_random") | int == 7 %}
https://open.spotify.com/playlist/4ZdTQQNnf7cLvSOnPdYWKa?si=6ed6fac35f28448f
{% elif states("input_number.number_random") | int == 8 %}
https://open.spotify.com/playlist/37i9dQZF1DWZlBWh8A1Ygd?si=525e0f4d405045e3
{% elif states("input_number.number_random") | int == 9 %}
https://open.spotify.com/playlist/0fYaOS0XozDRg1Lr6nhOn1?si=c5c91467ec3b4f76
{% endif %}
media_content_type: playlist
target:
entity_id: media_player.spotify_william_vidal
- service: media_player.shuffle_set
data:
shuffle: true
target:
entity_id: media_player.spotify_william_vidal
mode: parallel
icon: mdi:radio
Issues I have:
I can’t play Spotify Playlists
I could not play the notification in the device that the radio will play, rather only on the Echo Show 8. The reason is because I could not pass the service Notifcation as a field (parameter).
Small question, when you execute script.media_play_la_patate_douce do your media player update with the playing information, my alexa media player shows nothing when I successfully launch radio browser using skill. It plays the radio in my echo but it is if nothing is being playes (in alexa app and HA). Did you face that issue also?
Same behavior on my end: the info is not shown on the media player although the radio is playing La Patate Douce (whether I vocally invoke it with Alexa or I click the button on my media player dashboard)
It does show some artwork if I play Frequence 3 though.