Smartpinger fixed incorect variable for Domoticz connection

This commit is contained in:
2022-08-02 02:04:52 +02:00
parent fce2222628
commit 5f98bc4221

View File

@@ -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&param=switchlight&idx="$DomoticzIDX"&switchcmd="$DomoSendMSG"" 2>&1 1>/dev/null curl -s "http://"$DomoticzAddr"/json.htm?type=command&param=switchlight&idx="$DomoticzIDX"&switchcmd="$DomoSendMSG"" 2>&1 1>/dev/null
fi fi
#Clean up #Clean up