I've installed an BT dongle with the help off: https://www.domoticz.com/wiki/BTAudio, and this working perfect, thnks!
When I launch the command from cli, it's working like a charm:
Code: Select all
mplayer -ao alsa:device=bluetooth /media/alarm_ingeschakeld.mp3 -softvol -volume 30 -af resample=16000:0:0Code: Select all
#!/bin/sh
mplayer -ao alsa:device=bluetooth /media/alarm_ingeschakeld.mp3 -softvol -volume 30 -af resample=16000:0:0
Code: Select all
/home/pi/domoticz/scripts/alarmaanmp3In the log I see the script got activated, but no sound.
After this I've changed to LUA and made the script, named: script_device_alarmmessages.lua.
This script contains the following code:
Code: Select all
commandArray = {}
if (otherdevices['AlarmActive'] == 'On') then
os.execute('/home/pi/domoticz/scripts/alarmaanmp3')
print('Alarm message -aan- verstuurd naar BT-speaker')
end
return commandArray
Hopefully somebody can help me with this puzzle.....
btw: I'm running Version: 2.3530, Build Hash: 9eef872, Compile Date: 2015-11-01 11:41:18