I was really excited to see the announcement about the new media browser component that was lit up in most recent release (https://www.home-assistant.io/blog/2020/09/17/release-115/). Unfortunately, I have found the documentation a little lacking. I use an “unsupported installation” of Home Assistant as a “supervised” installation (honestly I just followed the linux install script that used to be linked from the install instructions - no problem with any upgrades and everything works smoothly - nothing special other than I’m on ubuntu 20.04 LTS).
Following the instructions here: https://www.home-assistant.io/more-info/local-media/setup-media/ I don’t think I should have to do anything special (“the default path home assistant will try to use, is /media”). To that end, I’ve successfully mapped a samba file share to a sub-folder of /media called “/media/music” which is in-fact browsable from ssh. However, after waiting, restarting, and reloading, the system still doesn’t seem to detect any media files.
So, here are my questions:
Any recommendations on how to check if /media was properly mapped? Should I be looking for a specific container to have been spun up when I run docker ps? Up until this point I haven’t had to kick any command via “run docker”, and I haven’t written any docker compose files - my system was completely configured with the installation script. Hassio starts up even after a reboot, so I have reluctance to modify any startup scripts to add the "-v /PATH_TO_YOUR_MEDIA:/media " to the systemd unit file.
Is it possible to have the home assistant look at a samba file share for the media browser using the configuration.yaml file (remote instead of a local directory described here: https://www.home-assistant.io/docs/configuration/basic/#media_dirs) , or achieve what I’m trying to do?
Does the media browser support sub-folders that organize music, or does everything have to be stuffed into a single directory with no sub folders? Will it scan recursively for content?
How does the media browser index content? If I were to point it at a directory with 10K of files would it slow down my home assistant’s database performance?
No 1. Yes, you need to map your docker to a specific directory called media else that directory won’t be available for media browser
no 2. I don’t think media browsers can be set up that way.
no 3. this one I’m not sure
no 4. you can have a subfolder inside the media folder now regarding slow down unsure because I have not uploaded a lot of content to it.
I also would like to know how to play media items from automations or scripts. I know that items within the www directory are “publicly” accessible. Authentication is not required to view those items. Items within the new “media” directory are NOT publicly accessible. You are required to authenticate before you can access things within the “media” directory. For example, if you cast something from the media directory to a Google Cast device and then look at the attributes of that entity, you can see the authentication token
Are there controls available to play albums or to play a shuffle of a folder like in Plex? media_content_id: 'plex://{"library_name": "Music", "artist_name": "America", "Album": "America", "shuffle": "1" }'
It is straightforward enough to play a single track. The question was how to play the contents of a whole album or shuffle/play the album contents. @Marcus_Lundblad
Easiest way is to set shuffle using custom mini media player in Lovelace. Example below is with Spotify and in this example also the lyrics are displayed. Wen clicking on the card you will notice an option to get to your Spotify playlists.
Note: the shuffle option is limited to Sonos, Spotify, Kodi, Roon, Squeezebox and Universal.
This will not show the same as when you have a spotify player and use the media browser from there. We want to call a card for media browser, as pop-up. Not the media browser page