How to send play tunein radio to google home

Hi

Anyone know the home assistant automation commands to send to a physical google home to play radio on tunein?

1 Like

I use:

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

where “office” is the name of my Google Home.

You can get the stream URL by playing the TuneIn station in your browser, inspecting elements on the page, and then searching for “jp_audio” in the source code on the elements tab.

9 Likes

Thanks, does this go in configuration.yaml or automation.yaml?

If I want a toggle on and off for google home radio on the home assistant frontend ui what code do I put and where.

Thanks

Check out this project by Bob_NL. It’s what I use. Should have all the instructions you need.

2 Likes

Hi All,
I was getting stuck with this because tunein does not show the url containing .mp3 anymore. Check out this video and you will find it!

3 Likes

You should be able to just inspect the source for the player in your browser and search for “jp_audio” while it’s playing. The “src” value will be the URL.

Capture

1 Like

Hi @toddw65 What if the url doesn’t state. Mp3?

Shouldn’t matter. A lot of the ones I use don’t have the mp3 extension.

For example,
http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio4fm_mf_q?s=1524575730&e=1524590130&h=7ae69ffba5fd2b8bf4f6f502bead227a
or
http://icy1.abacast.com/kplu-jazz24mp3-32?source=TuneIn

You can just past the link in your browser to make sure it’s valid.

1 Like

Hi Todd,
You are correct. I had the audio paused so the only hyperlink i could see was https://cdn-beta.tunein.com/assets/media/blank.mp3 which is why I used the other method. Whoops.

Cool. As long as you got the links you needed, whatever the method. :slightly_smiling_face:

I know that this is an old post but I wanted to chime in for anyone who stumbles upon this.
I found a way to achieve this that (to me) is much easier:

Open the TuneIn Radio app on your phone.
Start playing a station.
Cast to a Google Home.
Go to Home Assistant dev-state page and find that Google Home entity.
Under “Attributes” section, you’ll find the stream link right there under media_content_id:

7 Likes

It seems that cast from tunein to google chrome is only for premium users…
Can you, please, find for me the link to googeradio ?
Thanks…

Here ya go: http://googeradio.dyndns-free.com:8000/listen

1 Like

Great, thanks a lot…

Thank you. Works like a charm :slight_smile:

Brilliant! Thanks

When i sent a stream to the google home the screen stay on black. Is it possible that i add a picture and tekst on the screen?