Just call the script with the text as parameters from your lua or domoticz_main as below.
Code: Select all
if [ "$status" = "On" ]; then nohup ${SCRIPTSDIR}/Speech.sh "${devname} is aangezet" 2>/dev/null &
nohup ${SCRIPTSDIR}/JSTxWrapper.sh "Domoticz OSD melding: ${devname} is aangezet" 6 2>/dev/null &
nohup ${SCRIPTSDIR}/Telegram.sh $msgto "Domoticz melding: ${devname} is aangezet" 2>/dev/null & #espeak -v nl "${devname} is aangezet"
exit; fi; if [ "$status" = "Off" ]; then nohup ${SCRIPTSDIR}/Speech.sh "${devname} is uitgezet" 2>/dev/null &
nohup ${SCRIPTSDIR}/JSTxWrapper.sh "Domoticz OSD melding: ${devname} is uitgezet" 6 2>/dev/null &
nohup ${SCRIPTSDIR}/Telegram.sh $msgto "Domoticz melding: ${devname} is uitgezet" 2>/dev/null &
#espeak -v nl "${devname} is uitgezet"
exit; fi;
espeak, telegram, jstx lines can be removed, you need only speech.sh,nohup and & is used to start it in separate silent processes so domoticz does not slow down. Jstx is used to send the text to my philips tv screen.