Code: Select all
function My.PlaySound(msg)
Debug='Y'
if (Debug == 'Y') then print('>> Alarm speaks: '.. msg) end
os.execute ("sudo killall mplayer")
os.execute ('sh /home/pi/domoticz/scripts/bash/Play_sound.sh' .. msg)
end
I changed a lot with quotes etc, but don't get it working. the closes i got is that my speaker says" dotdot of M S G.
not the sentence in the variable msg.
What am I doing wrong?