you sir, are a legend ! after a bit of puzzling i got the playlists working on my dashboard and it works so much better than any other solution i came across so far. Finally i can remove the buggy and laggy spotcast integration. Thank you so much.
Good work!
I really appreciate your effort.
It works great with shuffle. but sometime I want to listen music in order.
I tried excluding random-item node, add cycle node and so on, but all failed.
Any idea?
Thank you guys like my coding.
I added the âordered playingâ into this project for you guys, which means now it is supported Shuffling and Ordered two playing modes.
with prev version, 2 steps for the updating.
- Adds the new toggle button as below
Name | Entity ID | Type | Options | Icon |
---|---|---|---|---|
Shuffle Music | input_boolean.shuffle_music | Toggle | mdi:shuffle-variant |
- Updates your node-red code with the newest ones.
v5 version
Thatâs working pretty well but I have an idea.
I have a folder music and in there is artist album then track its actually a soft link in config/media. now on the media page i can browse to an album and play individual tracks. so i can find the path ok.
now if your media player could take this path in through a texthelper and use that for the playlist what do you think, maybe automatically adding it to the dropdown.
of course, the function has been added and released. You could simply click the âreload playlistâ button and the N-R will put the folders into the playlist dropdown without configures the settings in N-R.
new version: v6
Updates
Update from v5 to v6
- Add the toggle in helpers of HA which name âReload Playlistâ
- Replace the content of the node-red to the newest ones.
- Update the configuration content in PLAYLIST.
Please note that this version you donât need to adds the playlist and you could simply click the reload toggle in UI to make the N-R do it.
Greetings,
I am trying this media center because I want to play some MP3s that I have on my NAS.
I mapped the NAS path to HA via SMB with path âmedia_dirs:â
musica: â/config/media/SMB/NAS/Musicaâ
The folder is physically present on the HA being the mount point while the subfolders are all on the NAS.
If I open the browser with Chromecast I can play the music without problems and from the developer tools menu the mapped and working content_id is â/media/musica/â.
From NodeRED, however, it does not find any folders and obviously no files, in practice it is as if it did not see the folders mounted on the NAS.
In the Playlist mapping node I put the path on âone_media_dirs_in_ha_confâ = âmusica: /config/media/SMB/NAS/Musicaâ
which matches that of media_dirs but it doesnât work, I donât understand where the error is.
In addition to this in the âFile Listenerâ node in the âStart Folderâ and âFile Patternâ items there is written âVincent Qiuâ and âby HOHO``â ⌠is this correct ???
Thank you for the huge work you are doing here !!!
P.S.: I opened a problem on Github.
Greetings,
Very new to HA and N-R.
Can you please share code for the following buttons:
On
music playlist
reload
delete song
shuffle music
Just like you did for Next Song Button:
Next Song Button:
type: 'custom:button-card'
tap_action:
action: call-service
service: media_player.media_stop
service_data:
entity_id: media_player.home_group
size: 50px
icon: 'hass:skip-forward'
name: Next Song
Much appreciated
do you mean the UI code?
Mine as below:
type: horizontal-stack
cards:
- type: button
tap_action:
action: toggle
entity: input_boolean.music_time
show_name: false
icon: hass:music
show_state: true
icon_height: 50px
- type: button
tap_action:
action: toggle
entity: input_boolean.delete_song
- type: custom:button-card
tap_action:
action: call-service
service: media_player.media_stop
service_data:
entity_id: media_player.home_group
icon: hass:skip-forward
name: Next Song
size: 80px
- type: button
tap_action:
action: toggle
entity: input_boolean.shuffle_music
type: horizontal-stack
cards:
- type: entity
entity: input_select.music_playlist
- type: custom:button-card
tap_action:
action: toggle
entity: input_boolean.favorite_song
show_name: false
show_icon: true
size: 90px
- type: button
tap_action:
action: toggle
entity: input_boolean.reload_playlist
type: entities
entities:
- type: custom:slider-entity-row
entity: media_player.home_group
I will add these button codes into the GitHub readme file.
Many thanks buddy!
np, just updated the readme file about HACS and customized frontend comes from.
Can we use M3U files with Google Chromecast without a hack yet?
This should simply work.
SERVICE:
service: media_player.play_media
data:
media_content_id: "/media/local/rain.m3u"
media_content_type: playlist
target:
entity_id: media_player.living_room
M3U:
#EXTM3U
#EXTINF:1512,Rain
rain.flac
AFAIK, nope
As the poster or the original question at the top of the thread over a year ago, I re-tried your âthis should just workâ suggestion a few weeks back, and no, the approach does not work.
What Iâm not clear on is why? Is it because it is fundamentally difficult (presumably some kind of event driven background task to cast a new track, when one finishes), or some has just not yet got round to adding the code?
While Iâm no programmer, my guess is itâs a technical hurdle that no one has been able to overcome.
Neither of the HomeSeer Google cast PIâs Devâs have been able to profide this feature, even though there is a lot of interest for it.
I believe one of them has been working on it for quite some time.
I was planning to make a component features are the same as the node-red one but more, one-click setting on UI, SMB mounting, etc. As the node-red one is working perfectly, the component will be coding in my free time and may take a long time.
I forget the Chromecast supports m3u or not as I made node-red and tested a long time ago, if not, then the HA needs to handle the m3u file itself which the original HA media component became a fully functional media center.
Hi, I have been fighting that media directory stuff for my HA in the last weekend.
and finally I have my NAS SMB shares mounted in â\mediaâ and remount them on start.
having music, videos and photos as folders I can use my Chromecast and browser to play the media.
Also my ultra (hacked that dns stuff)!. Al great and that I wanted to add playlists like .m3u;
Finally i ended up at this great thread and its a long read to understand but hey I made it.
Now Iâm using a ODROID O2 hardware and âHome Assistant OSâ also named hassio ?? really its confusing. but it seems that the mounted CIFS SMB shares are not @ the host where you read the directory.
So while my HA MEDIA shows me all files this addon wonât see them.
As Iâm using SAMBA addon to backup the box I see the \config share that has NO media folder.
when I add that folder so I get \config\media\music\mp3 and add files to it. than it worksâŚ
but I also have a share called \media it does not see anything in there ?
Any hint is welcome as I still seem to miss the difference between hassio and own OS versions.
anyway great work!
Looks like youâve been with the same configurations that Iâm currently stuck on. I want to play a playlist on my nas, but I canât get this to work yet. Have you already built something for that? Below one of the codes I tried with, the media_player does respond, but does not start playing.
alias: NAS jukebox
sequence:
- service: media_player.play_media
entity_id: media_player.jbl
data:
media_content_id: media-source://media_source/local/NAS/Shared Music/Foute111/foute111.m3u
media_content_type: playlist
- service: media_player.shuffle_set
entity_id: media_player.jbl
data:
shuffle: true
mode: single
icon: mdi:music
@antoinevandenhurk - Do you have a plex server installed? if yes, you can then install plex integration, which you can then access playlist that youâve created on plex from HA via the new mediaplayer function.
my only dilemma now is to shuffle or repeat it as I still canât get that part working
Try
media_content_type: music
instead of playlist. Strange, indeed, but works for me.