Play local mp3 file

Hi,

i want to use Volumio to speak a notification when the door bell rings.
My home automation system creates a mp3 when the door beel rings.
All i need is now to send the mp3 file to volumio to play it. Is the any api command or something else for doing this?

Thx
spooniester

Have a look at the REST API here.

Hi,

thanks, managed it via a mp3 file which i put on a web server and played it via web radio.

Bur now i have another problem, file is played infinitely…

Is the any “option” in Rest5-Api to play it only once?

Thanks
spooniester

I made a similar project. I have a door-sensor (mangenic switch) which is attached to a raspberry pi with a audio dac. When the door is opened, i like to play a audio-file.
This is the way i have done it (works):

  • First you need to know the audio device, get a list with:
  • Then you can play audio with this command:
aplay -D plughw:CARD=IQaudIODAC,DEV=0 audio.mp3

Of course, you have to replace the “plughw:CARD=IQaudIODAC,DEV=0” with your audio device. You can also replace “audio.mp3” with “/full/path/to/audio.mp3” if the file is on a mounted storage.