Bash script error returned: 32256 synology
Posted: Sunday 31 January 2016 17:16
Hi,
i made this script (with Dutch comments
If i run this script with WINSCP and i type in the command box: sh Denon_Uitzetten.sh
it works and my receiver volume goes to zero and then it goes off.
But if i run it with Domoticz i get this error:
Error: Error executing script command (//volume1/@appstore/domoticz/var/scripts/Denon_Uitzetten.sh). returned: 32256
I try'd it with a lua script to fire it with a sh command and that wil not work.
The permission of the files is:DOMOTICZ
Hope someone can help me
i made this script (with Dutch comments
Code: Select all
#!/bin/bash
#-------------------------------------------------------------------------------------------------------
#Met dit script wordt het volume bij uitschakelen steeds verminderd met 0.5 tot -80 wat geheel uit is.
#-------------------------------------------------------------------------------------------------------
#Settings
DENONIP="10.0.0.116" # Denon IP Address
VolumeSubstraction="-0.5" #Volume vermindering met -0.5
VolumeUit="-80.0" #Volume Uit stand
#Start Script
# Haal de xml file uit de Denon versterker en stop deze in het bestand Denon.txt
curl http://$DENONIP/goform/formMainZone_MainZoneXml.xml > Denon.txt
sleep 1
# Haal uit het Denon.txt bestand het Volume
Volume=$(sed -n -e 's/.*\<MasterVolume><value>\(.*\)<\/value>.*/\1/p' Denon.txt)
echo Het start volume is:$Volume
# Fade het geluid uit
for VolumeFade in $(seq $Volume $VolumeSubstraction $VolumeUit)
do
echo $VolumeFade #Print het geFade volume
#Update de Dennon versterker met het geFade geluid
curl http://$DENONIP/MainZone/index.put.asp?cmd0=PutMasterVolumeSet%2F$VolumeFade
sleep 0.1
VolumeFade=$VolumeFade
done
# Vergelijk de Fade waarde met de Uit waarde.
if [ "$VolumeFade" = "$VolumeUit" ] ; then
echo "Denon Geluid is Uit"
# Zet audio weergave op dts suround
curl http://10.0.0.116/MainZone/index.put.asp?cmd0=PutSurroundMode/DTS%20SURROUND
echo "Muziek weergave op DTS Surround"
sleep 1
# Zet Input op SAT/CBL
curl http://10.0.0.116/MainZone/index.put.asp?cmd0=PutZone_InputFunction/SAT/CBL
echo "Input op SAT/CBL zetten"
sleep 1
#Zet de Denon versterker uit
curl http://10.0.0.116/MainZone/index.put.asp?cmd0=PutZone_OnOff%2FOFF
echo "Zet de versterker uit"
fi
#Einde script
it works and my receiver volume goes to zero and then it goes off.
But if i run it with Domoticz i get this error:
Error: Error executing script command (//volume1/@appstore/domoticz/var/scripts/Denon_Uitzetten.sh). returned: 32256
I try'd it with a lua script to fire it with a sh command and that wil not work.
The permission of the files is:DOMOTICZ
Hope someone can help me