Radio Browser - how to use?

Where did you find all the media_content information in the data section?

Yes, that is the question, @terryhonn : Where do you get the content_id from?

I went through the Automations UI and created a new automation, selected the trigger, chose Play Media for the Action, chose my media player from the list, clicked on the big Pick Media + button, chose a random radio station from the media browser radio station list. Once I confirmed the station played as I wanted, I clicked on the hamburger menu at the upper right of the Automation editor and selected Edit in YAML, copied the yaml there and that’s what I pasted in my earlier response.

Let me know if you need screenshots.

3 Likes

Ah, now I got it!

My mistake was to use the run-service-function, where I need to now the content-ID.

But instead I have to use the play-media-action.

Thanks a lot!

Hi, sorry but how did you find the link?

media_content_id: media-source://radio_browser/4ed4b346-e81b-4570-adbe-8e62ae7a171a

In dev tools/states while playing the station.

I find it easier to do through the website radio-browser.info - go find your radio there, and click on it, in the url you will get the content id , for example:

https://www.radio-browser.info/history/9617a958-0601-11e8-ae97-52543be04c81
5 Likes

Yes, thanks, but at the moment it doesn’t work with browser-mod :unamused:

Thanks, this worked for me. I needed to use the stationuuid

I Found a solution, in a button!

Play radio via Home Assistant - Rouwette.com

Play radio via Home Assistant - Rouwette.com

This may help :slight_smile:
Easy way to find content id is via an Automation
And play it with a button

been trying for 3 days to get this to work. i keep getting Media player does not support browsing media when i try to create an automation to play a radio station with radio browser

Crystal ball broken.

To get help you need to post your automation and your logs.

From what I read online, I do not think you can use alexa as a media player for this.
If I use another media player, it does work

To get help you need to post your automation and your logs.

Try another web browser, I have same issue with microsoft EDGE but work fine under Chrome and Firefox

same to me. Media player does not support browsing media\Odtwarzacz nie obsługuje przeglądania multimediów

tried on FF, Chrome and Edge

I was struggling with this for a long time as well, but now I have at least something working!

Here’s the code (this needs mini-media-player from HACS):

entities:
  - entity: media_player.m5stack_atom_echo_888398_m5stack_atom_echo_888398
    icon: mdi:radio
    min_volume: 5
    name: Kitchen audio
    type: custom:mini-media-player
    info: scroll
    source: full
    hide:
      volume: false
      source: false
      power_state: true
      name: false
      icon: true
      info: false
    shortcuts:
      columns: 4
      buttons:
        - name: BBC World
          image: >-
            https://static.wikia.nocookie.net/tvfanon6528/images/3/36/BBC_World_News_(2022-.n.v.).png/revision/latest?cb=20220426080337
          type: playlist
          id: media-source://radio_browser/98adecf7-2683-4408-9be7-02d3f9098eb8
        - name: M1+
          image: >-
            http://www.pliusas.fm/wp-content/uploads/cropped-Pliuso_fav-192x192.jpg
          type: playlist
          id: media-source://radio_browser/9612c706-0601-11e8-ae97-52543be04c81
        - name: M1
          image: http://www.m-1.fm/bitrix/templates/m1/images/500x500.jpg
          type: playlist
          id: media-source://radio_browser/4a097926-fed9-4d61-8ed0-bc8fcf66df83
          [...]
show_header_toggle: false
type: entities

To get the content code like “4a097926-fed9-4d61-8ed0-bc8fcf66df83”, I go to https://www.radio-browser.info/ and find the station I like, open it, and then copy the code from URL.
It’s a tedious manual work, and the site is very slow and unresponsive at the time of writing, but I forced myself through.

Problem: it does not show if and what is playing now.

4 Likes

This is the radio stations URLs resource that I use. It is in Dutch (that I speak) but is easy enough for all to use.

1 Like

I used to use Sonos favorites in order to play my favorite radio stations. Now I have switched to Radio Browser for better flexibility. But this also resulted into the same problem:

It is a real pity that I cannot see the station’s name and logo anymore (e.g. in the excellent Sonos Card)! :frowning:

According to the above mentioned site (thank you @LimboIvo) it should be possible to add title and thumbnail as metadata just like this:

  - service: media_player.play_media
    target:
      entity_id: media_player.living_room
    data:
      media_content_id: media-source://radio_browser/96126f56-0601-11e8-ae97-52543be04c81
      media_content_type: audio/mpeg
    metadata:
      title: NPO Radio 1
      thumbnail: >-
        https://upload.wikimedia.org/wikipedia/commons/thumb/d/da/NPO_Radio_1_logo_2014.svg/640px-NPO_Radio_1_logo_2014.svg.png
      media_class: music

In my case, it makes no difference whether I add those metadata or not. Has anyone managed to accomplish this? :pray:


Edit: Please also see stale GitHub issue:

2 Likes