M3U Playlists in Media Browser

I tried but doesn’t work.

How are you structuring the Playlist?

I have set local media source and I am trying to pass the playlist to nest mini

Thank you @nov30th for sharing this NR flow. It’s working well overall.

One small request, I found that playback fails after restarting HA (for instance after an upgrade) unless you first press the Reload playlist button. It would be ideal for playlists to be automatically reloaded on startup.

I tried injecting a payload to the PLAYLIST mapping node on startup but that failed as other nodes check the status of the reload playlist input toggle, so the input must be toggled. As a kludgy workaround, I created an automation to toggle the reload playlist input after startup.
Screen Shot 2022-06-08 at 10.37.42 AM

AFAIK NR doesn’t have the simple HA startup event, the flow or the button of reloading needs to be triggered outside the NR.

Or you could simply put a dummy item into the list and each time when play music to see if the dummy item exists and then reload the playlist before playing.

You’re right, there’s no NR startup event. I had to use a few nodes to detect when NR connected to HA as a trigger. The points I was trying to make were:

  • Playback doesn’t work on reboot without refreshing playlist first
  • Playlist cannot be refreshed simply by injecting a payload into the playlist mapping node
  • An ugly hack is to “press” the button via automation on boot, but a proper fix would be nice to have

I’ll try the “dummy item” suggestion. Thanks

It’s a little bit of a round-about solution, but if your m3u is an actual radio station you can use the integration Radio Browser - Home Assistant and add your station to the global list at https://www.radio-browser.info/

(I just did this successfully. Took a couple min for the stream to be added and available in HA media browser. Adding to this thread because it was near the top of the Google results while doing research.)

1 Like

I found this thread searching for a solution to an issue I’m having where seemingly radio stations from Radio Browser that use a .m3u will not play in media player on a HA dashboard.

For example:
This radio station (radio-browser.info) plays just fine with:

service: media_player.play_media
data:
  entity_id: media_player.kitchen_tsv_chrome
  media_content_id: media-source://radio_browser/6819ff68-0ddb-44fb-a3c6-3ed1c7fe0e4b
  media_content_type: music

But this radio station (radio-browser.info) plays nothing with:

service: media_player.play_media
data:
  entity_id: media_player.kitchen_tsv_chrome
  media_content_id: media-source://radio_browser/e6bf007f-33fa-11e9-8f31-52543be04c81
  media_content_type: music

The only difference in the stations I can tell is that the 2nd one has a .m3u URL:
url https://edg-iad-wunc-ice.streamguys1.com/wunc-128-mp3.m3u

Anyone have ideas for how I can play this 2nd radio station?

Here is another example of a .m3u station that I can’t play: (radio-browser.info)

If it matters, I’m using the browser_mod device as the entity here.

I have same issue with some radio stations I whant to add
Does anyone have a solution for this?

@nov30th

Hello.

I think you are working hard on developing m3u8.
So I’d like to make a suggestion.

If you use the hls.js library
You can play m3u8 streaming url
Could you please develop a media player add-on?

Currently, m3u8 is only available for Google Home Mini external speakers
I have no choice but to rely on it to run.

If you develop the m3u8 media player
We’re not bound by external devices
Stream related anywhere from within HA
I think it can be played.

What do you think?

@jjy9331 thank you for the suggestion, but as the project was nearly 2 years ago I moved to another place that rents a house is no HA or smarthome components then there is no updates on it.
I remember the node-red version sends the MP3 file to the Google speakers, if you build the mp3 files in node-red to a m3u8 file, and sends the file url to the speakers, you will get your speakers working I think.

Steps would be:

  1. modify the process of select one file to get all files into a list.
  2. build the url on each file which can get the mp3 files from intranet.
  3. put all the urls into a m3u8 file, put it on local which could be same folder or somewhere else.
  4. so the node-red is sends the m3u8 to the speakers once you click the play button.

if you need to random play or somethin would re-order the files before make it to the m3u8 file.

If it’s your favorite station that you listen to often, I’ve come up with an uncomplicated solution for myself.
Download this m3u file, open it with notepad, and inside you will see a link to the stream (in your case I see there http://wunc-ice.streamguys1.com:80/wunc-128-mp3).
Create a script in which you specify the media player action “play content” and specify the mp3 stream as a content id.
Save the script under the name “Play WUNC radio” for example.
Now you can use it to create your Lovelace panel item, start automation at the right time and so on.
Further you can copy this script with other names, change addresses of radio station streams in them, create a panel with many buttons, i.e. a collection of your favorite stations. It is useful to add a “stop” button (meda_player.media_stop, if I’m not mistaken) to the same panel.
Then you can use your imagination as to what else you can add there. )

read here:

1 Like