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.
Sorry for reviving this thread but it seems this issue is still very much accurate.
I’m in the exact same position (wanting to play a notification on volumio).
I have not found a working API method for this. Yes, i can use a weburl to play my notification but then it’s handled as if it’s a radio station. Not what i want at all.
I can play using aplay but…
- That requires nothing to be playing at the moment or you’ll get device or resource busy
- Aplay only plays WAV files. Not a workable solution for mp3
How do we get this to work?
Ideally when playing this file volumio would:
- stop whatever is currently playing
- play the notification
- resume what was playing before
And potentially play the notification at a louder volume.