Hello,
i running openhab on raspberry pi 3
I’m trying to play sound from mp3 file
i create this rule:
rule "Audio Test"
when
Item test_mp3 changed from OFF to ON
then
sendCommand(test_mp3, ON)
playSound("barking.mp3")
end
pressing the switch play no Sound !
if i run the command via linux cli ( omxplayer barking.mp3), it play sound no problem
if i change the audio setting in Default Sink from “system speaker with mp3 support” to “web audio”
it play sound on my browser no problems
Addition 2:
Of course there is another way, but that would be giving in and admitting that we can’t get the internal functionality working. (Where is a good description, that simply works?!?)
Instead of PlaySound() you can install mpg123
sudo apt install mpg123
and use the following command in your openhab rule to play the sound: