Mopidy: file not found

Hi community, thanks for all the helpful posts that I devoured to solve many of my problems.

I have a strange one that I cannot crack. The log file states that the directory or file cannot be found. I have the following configuration for Mopidy:

{
  "local_scan": true,
  "options": [
    {
      "name": "local/media_dir",
      "value": "/share/mopidy/media/"
    }
  ]
}

And this is my stab at playing a local file:

- service: media_player.play_media
      data:
        entity_id: media_player.mpd
        # media_content_id: local:track:toetsboodskap.mp3
        # media_content_id: 'local:track:toetsboodskap.mp3'
        media_content_id: /share/mopidy/media/toetsboodskap.mp3
        # media_content_id: '/share/mopidy/media/toetsboodskap.mp3'
        # media_content_id: /config/www/toetsboodskap.mp3
        # media_content_id: '/config/www/toetsboodskap.mp3'
        # media_content_id: local/toetsboodskap.mp3
        # media_content_id: /config/local/toetsboodskap.mp3
        # media_content_id: https://dl.dropboxusercontent.com/s/cv0u9tsp327n3u7/T99.mp3?dl=0
        media_content_type: 'music'

The only one that works is the URL, which I found on one of the posts. All the others give me directory or file not found errors.

I had a similar problem and solved it.

First I imported the mp3 I was trying to play into Mopidy with local scan: https://docs.mopidy.com/en/latest/ext/local/
Once imported the file should show up under Local Media:

Click the three dots on the right of mp3 and “Copy URI”, should look something like this “local:track:waves.mp3”

Then I played it with home assistant using:

{
  "entity_id": "media_player.bedroom_speaker",
  "media_content_type": "audio/mp4",
  "media_content_id": "local:track:waves.mp3"
}
2 Likes

Dude, thank you so much!
I was doing my head in for like 2 hours to solve this problem.