I'm looking for advice from a media browser

Can anyone advise how to do automation: motion sensor - start playing locally located media in the media folder on Google Home such as MP3.New media browser feature.Thank you

Hi, you have to configure it. first of al you need to install samba. Go to SUPERVISOR then ADDON STORE and install SambaShare so that you have access to your home assistant folder. Open configuration.yaml and look at the top if you have a homeassistant:, if you haven’t add this lines

homeassistant:
    media_dirs:
    media: /media

Reset the server. If you installed the Samba then go to the search box in windows 10 and type \\192.168.30.63 or whatever is your ip. If its the first time you open will ask you the username and password, are the one you used in the configuration of the Samba addon.
You will noticed that you have another folder called Media. you can copy the music or videos here.

You can now create more folders, say you want to create a folder called Rock Music. go to the Media folder and create manually the RockMusic folder. then open the configuration.yaml and just below the media: /media line you added earlier, add media: /media/rockmusic reset the server, and so on for all the folders you want.

Thank you I was already clueless. I will test

hi
I tried your suggestion,

homeassistant:
    media_dirs:
    media: /media

and for first time the in media browser I see /media and it says

no items

However, the media file has not be created. What am I missing? Can you help a bit?

Then you just need to add media to your /media folder on that device.

If you are using samba you will need to update your samba conf to include the new folder to see it. If you are using the samba addon, then make sure you update to 9.3.0 and once you restart the addon you will see the media folder in samba.

Then just copy your media there and it will show up.

I updated samba
this is my config

workgroup: mk
username: username
password: password
interface: ''
allow_hosts:
  - 10.0.0.0/8
  - 172.16.0.0/12
  - 192.168.0.0/16
veto_files:
  - ._*
  - .DS_Store
  - Thumbs.db
  - icon?
  - .Trashes
compatibility_mode: false

and this is my system setup

Operating system
Ubuntu 18.04.4 LTS
Docker version
19.03.12

I restarted HA several times but I can not see the media folder.
Is there anything else I could try?

I have a media folder and files and I am able to select Google Home and mp3 in the media browser to play only one file, not all. In the media player, the local path (http: IP: 8123 local 1.mp3) works, but what is the path to the media folder. I tried (http: IP: 8123 media 1.mp3) and it doesn’t work

I compared my samba settings I have a workgroup: workgroup, but I have a Home Assistant OS

Did you add a docker volume mount to the /media directory?

I apologize if I missed where you said you had done that. If you are not seeing any errors in the samba addon log, then that’s the only thing I could think of.

My installation method is supervised although it is not official (ubuntu instead of debian)

No action is needed from your end to set it up. Home Assistant will automatically use the “media” folder that is provided on these systems.

so I am not sure that I need to run these commands (and I am afraid so)

Add this to the config file

homeassistant:
    media_dirs:
    media: /media

I already have. see your quote. My problem is with samba set up I think. I can only see the folder where configuration file is, and media folder is outside of it, but I don’t know how to share it

edit: I have installed samba addon but I have followed a guide also and enable samba with linux commands. Maybe this is the problem? and again I don’t know how to fix it

Hope it helps. just pull and drag to media share folder. DO NOT DO ANYTHING ON THE CONFIG FILE IF YOU ARE USING HOME ASSISTANT SUPERVISOR. thank you



1 Like

do we have to copy the physical media files to the Media folder or could it be possible to have a “link” to another media folder? I’ve a media server running on another machine. Just to avoid duplicate content. Thanks.

I have the same problem. Al my media is on my NAS

1 Like

mount your NAS folder to HA, and set as default media folder

and how should I do that? i am using hassio on a proxmox server. i tried to do it via ssh but the mount command doesn’t support cifs or nfs so i can’t mount it from there

ok I managed to mount my volumes on the nas with nfs after I turned on NFS4 on my nas with command:

mount -t nfs4 ip.address.nas:/volume1/Music /media/Music

With ssh I neatly see my media in the folder /media/Music

however in homeassistant I get the message in my media browser: nothing found.

Someone who has a solution or knows what’s going on

I had the same problem and this worked for me.

Home Assistant Supervisor

Host Operating System Ubuntu 20.04.2 LTS
Supervisor Version supervisor-2021.06.6
Docker Version 20.10.6
homeassistant:

  media_dirs:
    media: /config/media