Is there something similar to VLC for Hassio?

I have Hassio version 0.103.5 installed on a RPI 3 using the recommended Home Assistant image. I reloaded everything on a new sd card on 1-1-20 so everything is new again.
I was using VLC on Hassbian to play mp3s to the RPI’s audio jack and I have an old amplifier plugged into the jack. This one component has kept me from switching from Hassbian to Hassio.
I have tried MPD but from the HA instructions I don’t think I can copy the siren mp3 or others I use with the alarm into HA folders and play it through the amp to my speakers.
I don’t stream audio from online services. I only want to play a few mp3s of my choice to announce state changes.
From what I read all the media players are for a certain device or online service.
Is there something similar to VLC for Hassio?

This post might be of some value. Not sure if it would work though.

1 Like

Thanks, I’ll try it!

I’ve been using MoPidy from https://github.com/bestlibre/hassio-addons for local play back on my Pi 3b+.

Thanks Gerry, there is still too much that I don’t understand. I tried Mopidy with my last install and I could never tell it how to find the mp3. I tried copying it into most of my folders but no success.
I install the VLC that Tediore suggested and it install ok but it can’t find the mp3.
I tried testing with the Developer Tools Services with the following data:

entity_id: media_player.vlc_telnet
media_content_id: http://192.168.1.XX:8123/local/timer.mp3
media_content_type: music

The log said:

[017e7c00] access stream error: HTTP 404 error
[017e7c00] http stream error: error: HTTP/1.0 404 Not Found
[01838d50] main input error: Your input can't be opened
[01838d50] main input error: VLC is unable to open the MRL 'http://192.168.1.XX:8123/local/Bomb-timer.mp3'. Check the log for details.

I also tried:

media_content_id: /local/timer.mp3
media_content_id: /config/timer.mp3
media_content_id: config/timer.mp3
media_content_id: config/tts/timer.mp3

I will try installing Mopidy on this RPI and see if it will work. Thanks for your help.

On the SD card, I put the mp3 files in the /share/mopidy/media folder, NOT in the config folder. That confused me when I was first setting it up.

You will need to restart the add-on anytime you add new mp3’s to the folder.

Here’s what I have in the MoPidy add-on for my config:

{
  "local_scan": true,
  "options": [
    {
      "name": "local/media_dir",
      "value": "/share/mopidy/media"
    },
    {
      "name": "m3u/playlists_dir",
      "value": "/share/mopidy/playlists/"
    },
    {
      "name": "spotify/enabled",
      "value": "false"
    },
    {
      "name": "iris/enabled",
      "value": "false"
    },
    {
      "name": "gmusic/enabled",
      "value": "false"
    }
  ]
}

If it’s setup correctly, you should see it detect the mp3’s in the log:

INFO     Starting Mopidy 2.2.2
INFO     Loading config from builtin defaults
INFO     Loading config from /var/lib/mopidy/.config/mopidy/mopidy.conf
INFO     Loading config from command line options
INFO     Creating dir /root/.config/mopidy
INFO     Enabled extensions: mpd, http, file, stream, m3u, softwaremixer, moped, local-images, local, local-sqlite
INFO     Disabled extensions: iris, gmusic, spotify
INFO     Found 49 files in media_dir.
INFO     Checking 49 tracks from library.
INFO     Removing 0 missing tracks.
INFO     Found 0 tracks which need to be updated.
INFO     Scanning...
INFO     Scanned 0 of 0 files in 0s.
INFO     Done scanning.
INFO     Starting Mopidy 2.2.2
INFO     Loading config from builtin defaults
INFO     Loading config from /var/lib/mopidy/.config/mopidy/mopidy.conf
INFO     Loading config from command line options

Let me know how it goes.

Thanks so much. I will try to get it installed tonight and see if it will work. Playing an mp3 is what has kept me from switching to Hassio for months. I have searched HA with every possible combinations to try to resolve it.
Thanks, again! To both of you.

I installed Mopidy (without errors) and I am able to type text in and have it come out the speakers.

However, I have two more questions if you don’t mind.

  1. When you said you put the mp3 in the share/mopidy/media folder, is the ‘share’ folder the one that shows when I try to map a drive to the PI’s IP address or are you creating a share folder under the config folder?

  2. When I test the service using the Services tab of the Developer Tools, what should I use in the ‘media_content_id:’ under Service Data.

You can reach the share folder when you map through the IP address.

You can probably change the folder for the mp3’s by modifying:

      "name": "local/media_dir",
      "value": "/share/mopidy/media"

Here’s an example of one of my automations that uses mopidy:

      - service: media_player.play_media
        data:
          entity_id: media_player.mpd
          media_content_id: local:track:cat_door_closed_one_hour.mp3
          media_content_type: "audio/mp3"
1 Like

Thank you Gerry, I don’t think I have found anyone using ‘local:track:’ or the “audio/mp3”.
I am encouraged! I am now getting errors that indicate it has found the mp3 - just couldn’t handle it. So I can start checking out these new errors tomorrow.

Thanks so much for your help!

1 Like

I used your automation data for mopidy and it still wouldn’t work. Then I set up Duckdns and it worked.
Thanks again for your help. Hopefully I will be able to finish my Hassio install.

1 Like

Glad I could point you in the right direction. I was unaware DuckDNS was required for it to work, but I do indeed have that setup on my system.

1 Like