Hey All,
I just upgraded to a Raspberry Pi 5, Buster to Bookworm, and Node-Red 3.0.2 to 3.1.7.
I use sounds when motion sensors are triggered and timed events. In the past I used the exec node that called a bash file on the Pi that would play an mp3 using omxplayer like this
sudo omxplayer /home/pi/scripts/sounds/babble.mp3
omxplayer is no longer supported and vlc is recommended. So I set up my exec node like this
vlc /home/pi/scripts/sounds/babble.mp3
This works from the command line and when I put it in a bash file. But when I call it from nodered it doesn't play.
I've tried all the various "play audio" pallets available, some of them won't install, others don't work.
To complicate things further, these sounds used to be played through the 3.5mm audio jack on the Pi. The new Pi doesn't have an audio jack so I'm trying bluetooth. I have it setup so the pi pairs with the bluetooth speakers on reboot and working as intended.
How can I set this up to so node red will trigger the mp3 to play through bluetooth speakers?
Thanks!
PS The mp3 files and the folder they're in are chmod 777
[
{
"id": "3c4e3b0d019f1a59",
"type": "exec",
"z": "b8a0bb5cf90ec045",
"command": "sudo bash /home/pi/scripts/sounds/bash/babble.sh",
"addpay": "",
"append": "",
"useSpawn": "false",
"timer": "",
"winHide": false,
"oldrc": false,
"name": "babble",
"x": 652.8958129882812,
"y": 464.8888854980469,
"wires": [
[],
[],
[]
]
}
]