[SCENARIO]
I have a Raspberry PI 3 connected via Bluetooth to a an OontZ Angle 3. I cannot succeed in playing audio from OH to the OontZ but I can do it via command line (e.g. cvlc http://wwdc-fm.akacast.akamaistream.net/7/634/20131/v1/auth.akacast.akamaistream.net/wwdc-fm).
I thought of using Exec Binding to send a command to a script but it is not working
Hereafter my config:
ITEMS:
Item String LVRStreamURL { channel="exec:command:LVRplay"}
THINGS:
Thing exec:command:LVRplay [command="bash /etc/openhab2/bash_scripts/vlctest.sh %2$s", autorun=true]
RULES:
var StreamURL = "http://wwdc-fm.akacast.akamaistream.net/7/634/20131/v1/auth.akacast.akamaistream.net/wwdc-fm"
rule "Change LVR stream"
when
Item LVRRadio_Station received command
then
logInfo("STREAM","LVRRadio_Station received")
if(receivedCommand == 1) executeCommandLine("bash /etc/openhab2/bash_scripts/vlctest.sh "+StreamURL)
end
I see the item changing event:
[ItemStateChangedEvent ] - LVRAudioCtrl changed from 1 to 0
[ItemCommandEvent ] - Item ‘LVRAudioCtrl’ received command 1
But nothing happens