Here is code for SiriusXM radio, Tune-in, and iHeartRadio…
- type: SIRIUSXM
name: Kiki Lounge
id: play kiki lounge
icon: mdi:radio-tower
- type: TUNEIN
name: Fly FM
id: play fly fm
icon: mdi:radio
- type: custom
name: 93.3 The Wolf
id: play the wolf on iheartradio
icon: mdi:radio
The problem with Alexa and the methods shown in this thread is that it replicates what a vocal command would trigger.
In my case, if I say “Alex, play Frequence 3 on Tunein”, it’s going to play “Frequence 3 Urban”, not the “regular” Frequence 3 (Frequence 3 has different streams)
So this method is not precise enough I’m afraid.
In this video, the guy shows how to play a stream (taken from https://www.radio-browser.info/) but on a Chromecast, not on Alexa.
Well, to 98% it works and is reliable.
When I replied to masterkenobi and tried the station he mentioned, it immediately worked for me, but not for him. I believe it is/was more or less a cache (or other) problem on his side, this sometimes happens and can’t be solved within HA or an integration.
Shortly after that I myself had problems with playing some of my stations via Tunein. Alexa claimed it don’t know what to do. So I waited a couple of days and all was fine again. But sometimes problems won’t get solved at all by waiting.
There can be lots of reasons outside HA why things sometime aren’t working as expected.
Anyway, I gave it a quick try with your three stations: by using picture cards its just a copy & paste of the code and adjusting the station names and icons - it worked immediately without a problem here:
Aside from the icons in the upper controls (Badges), you can see from the descriptions that the right stations are playing.
But you may need to try different approaches.
For Fréquence 3 it works here with simple using
First off, thank you for your long answer.
I am aware that the problem may lie somewhere between Alexa and TuneIn and not on HA’s side.
I had a funky behavior a few months ago when I requested the French RTL radio and that Alexa suddenly started playing a German radio also called RTL something with no changes on my side and after months if not years of success. It came back to the French station a few weeks later out of the blue (this behavior was confirmed by other French Alexa users with no clear explanation)
Hence my need to try play a stream rather than the name of the station
I tried your code a couple posts above and the more recent one to obtain this :
With media_content_type: custom , HA would play randomly either the Dance stream or the Urban stream after I hit the button a couple times ! (never the regular one that I am hoping)
With media_content_type: TUNEIN , it never works even after trying different syntaxes.
with Fréquence3 or Frequence3 (no space, with oor without the accent) : Alexa responds “I cannot play that on TuneIn”
with Frequence 3 (with a space) : Alexa responds “What do you want to hear ?”
I’m not sure how you made it work with media_content_type: TUNEIN
If I replace the radio name like so, it works like a charm :
media_content_type: TUNEIN
media_content_id: play RTL
proving that the problem comes from that specific Frequence 3 radio (not sure the space in the name is the culprit)
So still no dice for me to play the regular Frequence 3 radio
Regarding the group playing: different from the Spotify integration, playing on Alexa multiroom groups is not working. You need to use a stereo group and address a member of the group or use the APP.
I would make a view with all possible methods and wait a week or two if none is working. As said sometimes it solves problems.
Good luck.
I got my TuneIn stream working on an Alexa group based on what we discussed above !
Here is a script :
alias: "Media : play Frequence 3 on Downstairs"
sequence:
- service: media_player.play_media
data:
media_content_type: TUNEIN
media_content_id: Fréquence 3 FM on Downstairs # <= I have a group of a couple Alexa speakers called Downstairs
enqueue: replace
target:
entity_id: media_player.living # <= this Alexa speaker exists but will be ignored !
mode: single
icon: mdi:play
(this trick above is explained on a documentation and I read a few days ago but cannot put my hands on)
You might got it from there?
I have three stereo groups and one multiroom group (called Dinnerparty) which incl. all three stereo groups and three standalone Alexas.
The idea of it IMO is to address one of the standalone Alexa to play on the multiroom group Dinnerparty, like
data:
media_content_type: TUNEIN
media_content_id: Fréquence 3 FM on Dinnerparty
enqueue: replace
target:
entity_id: media_player.echo_show_5
But as expected (I tried something similar before) it don’t work. The answer is “I didn’t find any station with the name Fréquence 3 FM on Dinnerparty on TUNEIN” - the whole string of media_content_id is transferred as the station name.
Yes, that’s the link I had in mind ! (" Play in Alexa groups")
What if you try a different stream with no space/no accent in it ?
Are you saying that your Dinnerparty group has groups in it ? like nested groups ?
What if you try with a “simple” group of standalone speakers ?
Yes, sure. I have three stereo groups: living room (incl. a Sub), dining room and in my office. Alexa allows to nest them in multiroom groups and everything is working fine, when played from the Alexa App or from Spotify to any of this groups.
I don’t know. Wouldn’t make sense here to only group the kitchen Echo and the Echo at the shower to a group. And as long an Echo is in a stereo group it can’t used in another group anymore.
The Alexa integration also don’t allow me to address the stereo groups directly. As described in the link, I have to address one of its member to play for example on the stereo group in my office (without mentioning the group name anywhere like you did) - echo_office2 is a member:
I believe its a limitation of the integration, because as I wrote before, its different with the Spotify integration, where I can address any group directly.
Hi all, I have a similar but different problem. Up until a month or so (can’t really be exact cause I haven’t listened to that radio station) my Otvoreni radio played without issues using this:
- type: custom
name: Otvoreni
id: play Otvoreni on tunein
Now it just says “I cannot play that on TuneIn.” And weirdly, I have no problems with starting that radio station directly on my Alexa.
Does anyone know what could be the reason? Other radio stations (and I have around 30 of them all play without issues.)
Anyone got any suggestions. I’m using Alexa Media player to summon a radio URL through the Radio Browser Skill but am not getting the artwork at all. Any views on how I might get it? The sound works fine though.
Thank you very much for your time. What you stated about Tune in, is exactly what I am facing now. Could please point me where to learn more about your example and how to create all of that? Thank you.
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.