Is it possible to use the new Play Media feature to play music from an entire folder? At the moment it appears as though only a single file can be selected.
It is not possible at the moment. You’ll need a media server like Plex or Mopidy which will play local M3U playlists.
Personally, I’ve successfully set up a Mopidy server / player on my HA box and can play MPU playlsts on my HA machine. To get Mopidy to work with other media players (Google Home, Hub etc.) you’ll need something like Snapcast I believe. Since I primarily listen to streaming services nowadays (radio, spotify, youtube) I didn’t bother.
Search the forums for m3u, plex, mopidy and you’ll see what you’re in for.
I host a kodi instance on the network. I dont mind playing a folder of files using kodi. If possible I would like to avoid creating a playlist. Because I can simply add music to a folder rather than accessing a playlist, editing it, etc. for all of which I need to access the kodi GUI too. Any pointers for the same?
Well here’s a good place to start! Sorry, I haven’t used Kodi so I can’t be much more help than that.
I just started playing with this, and it looks pretty interesting. Seems to work well for local media.
Thanks a lot, Jason. This looks like just what I was looking for. Will check it out. Home Assistant never ceases to amaze.
I can see the media files and players but cant get anything to play using Music Assistant. Same players and media files can be played using the “Media” tab in HA.
Dont know where to start looking for the solution.
Have you turned the media player on in Music Assistant?
Yes, all media players discovered are on but playback to all of them fails. So I think it has to do with something on the configuration side of music assistant. When I press play, my Kodi player is shaken out of the screensaver, so I know there is some attempt. But nothing plays.
Did you exclude all of the non-speaker media players in Music Assistant (Spotify, Kodi etc)? Sounds like it’s trying to play on a Kodi media player, which obviously isn’t what you want.
No, I am indeed trying to play to my Kodi player. Which works fine from the Media section, like I mentioned.
I think you need to think of Music Assistant as a replacement or substitute for Kodi. It would be like trying to play youtube on your spotify music player. It just isn’t meant to work that way.
Have you tried playing it directly on a regular media player? A google home, chromecast, amazon echo or something like that?
I have a Marantz AVR listed in the players in the right bar. It wont play to that either.
The music assistant page says “Import Home Assistant media players into the Music Assistant engine to use as target for playback.” so I thought I could use Kodi as a target. Kodi isnt by itself a yotube or spotify, it acts as a platform to play media from those sources.
Bummer. I have an assortment of media players, mostly cast (Google hubs, Google Mini, etc). It works great on all of them, even player groups and playing local media files is all I’ve really used it for so far.
This is a pretty new integration, you may want to open an issue on the git. Perhaps the dev can help you figure out what’s going on.
Sorry I couldn’t be more help.
Honestly, I’m kind of waiting until this drops to see what’s going to happen with audio in HA before I get too heavily invested in anything new.
Thanks for the help so far.
Kodi has a feature where I can have the following commands in a file called autoexec.py and it automatically starts playing a folder on startup.
Can I use this command through HA?
import xbmc
import time
time.sleep(5)
xbmc.executebuiltin("PlayerControl(Random)")
xbmc.executebuiltin("PlayMedia(/storage/music,isdir)")
xbmc.executebuiltin("PlayerControl(RepeatAll)")
its mot the solution we look for. ists a program into a program …
we only look for a media player, which can use next track, previous track an run the next song automatic …
sorry for bad english
yes, nothing has changed until now. music assistant is no solution … works very slow and in new windows … i dont like this …
I already have a collection of music files – but it gets tedious constantly having to select individual tracks or albums from my collection - instead I would like to give voice command “Play pop music”, “play easy listening music”, or “play New Zealand music” and for my partner to express her music preferences “play opera music” or “play Italian music” – and for a random selection from the appropriate playlist to start playing … but for now I would be happy to have a set of buttons in lovelace to start the music player.
My collection is over 30,000 tracks, and is already divided into categories - however _Pop contains 15000 tracks, which exceeds Music Assistant’s limit of 2500 track per Playlist. Not that I want the hassle of maintaining Playlists if I don’t have to (enough trouble keeping the ID3 tags organised).
That is my use case for playing a folder.