Smartpinger fixed incorect variable for Domoticz connection
This commit is contained in:
@@ -29,9 +29,9 @@ sendDomoticz() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Check Online / Offline state of Domoticz device
|
# Check Online / Offline state of Domoticz device
|
||||||
if [ "$DomoSendMSG" != "$(curl -s "http://"$DomoticzIP"/json.htm?type=devices&rid="$DomoticzIDX"" | grep '"Data" :' | awk '{ print $3 }' | sed 's/[!@#\$%",^&*()]//g')" ] ; then
|
if [ "$DomoSendMSG" != "$(curl -s "http://"$DomoticzAddr"/json.htm?type=devices&rid="$DomoticzIDX"" | grep '"Data" :' | awk '{ print $3 }' | sed 's/[!@#\$%",^&*()]//g')" ] ; then
|
||||||
echo "Updating Domoticz device" | tee -a $LogFile
|
echo "Updating Domoticz device" | tee -a $LogFile
|
||||||
curl -s "http://"$DomoticzIP"/json.htm?type=command¶m=switchlight&idx="$DomoticzIDX"&switchcmd="$DomoSendMSG"" 2>&1 1>/dev/null
|
curl -s "http://"$DomoticzAddr"/json.htm?type=command¶m=switchlight&idx="$DomoticzIDX"&switchcmd="$DomoSendMSG"" 2>&1 1>/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Clean up
|
#Clean up
|
||||||
|
|||||||
Reference in New Issue
Block a user