Seems ffplay not found in HassOS with last update?

My setup is a HassOS running on my Raspberry Pi 4B and everything has been pretty stable for the few months that I’ve been set up. A key part of my setup is that when some things happen, I play a small (unobtrusive) audio snippet over a speaker in a stairwell. It’s been nice. I’m still pretty new to this though, having written a few configuration bits, and a few simple automations in YAML and that’s all.

I’ve done the HA updates as they’ve been offered, and there’s never been a problem. But with the last update it seems that the audio player I was using ffplay is no longer found.

I’ve noticed that the environment I’m in when I use the Terminal does not seem to be the same as what HA is in. If I do a “which ffplay” in the Terminal for example it would come up with nothing, but if I executed “which ffplay” as a shell_command in my configurations.yaml, and called it from the Developer_Tools>Services it would find the ffplay application and so I was able to use it successfully for months.

I don’t know that I can apt-get and install apps within HA’s run environment, and scanning for other audio players (mpg123 aplay sox…) doesn’t find any alternatives.

How can I either get ffplay back, or find some other audio player for HA automations?


Not seeing any fix of the core to include the FFPLAY executable, despite several upgrade cycles going by, so I’ve been experimenting with other options.

One recommendation is the VLC route, which sounded elaborate and complex, but turns out to be pretty straight forward. There are a few ‘gotcha’ opportunities that caught me and produced failures that I found many others had ran into as well. I solved each, so will capture here:

a) In Settings > Add-ons > Add-On Store
Get VLC add-on
b) In Integrations > Add Integration (lower right button)
Get VLC-over-Telnet and install that.

Gotcha #1: When you do step ‘a’ don’t move on to step ‘b’ until you make sure it installs, the add-on starts. BUT also that you then leave add-ons and go to Settings > Devices etc > and look for Discovery of the VLC, and configure it there. ONLY THEN proceed to the VLC-over-Telnet setup.

To test playing audio file over RPi platform’s built-in 3.5mm audio output jack, go to Developer Tools, and Services and create a YAML test service call to media_player

service: media_player.play_media
   entity_id: media_player.vlc_telnet
   media_content_id: /media/bells.wav     << problem
   media_content_type: music
   announce: true

You can see logs from VLC itself (that was hard to find) when in the settings > add-on area along the top. Also there is “configuration” where you can select your output to the built-in audio jack.

Gotcha #2: The recommended path to an audio file (eg .mp3 or .wav) does not work at all. The path to the /media folder doesn’t work. Instead you need to use this approach, referencing the media

media_content_id: media-source://media_source/local/bells.wav

There’s a media_source folder definition deep in the setup somewhere that points to the /media folder, so the “local” there seems to find it.

Anyway - at this point (and two days later) I have audio prompts playing again. Am sharing these details here as it was a bit challenging to get that to work, even though the VLC and VLC-over-telnet duo was pretty quick to set up (once that discovery step was clear).

In a strange way, I succeed to do it with both VLC instances. Media are available in their original /media path!

1 Like