From 5f98bc4221671abdfd68d99ff6cb8dfa4025dec5 Mon Sep 17 00:00:00 2001 From: Bram Prieshof Date: Tue, 2 Aug 2022 02:04:52 +0200 Subject: [PATCH] Smartpinger fixed incorect variable for Domoticz connection --- bin/SmartPing.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/SmartPing.sh b/bin/SmartPing.sh index 2265a83..7f51e7a 100755 --- a/bin/SmartPing.sh +++ b/bin/SmartPing.sh @@ -29,9 +29,9 @@ sendDomoticz() { fi # 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 - 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 #Clean up