'Bash/Pinger/Smartping.sh.examp' updaten
This commit is contained in:
@@ -62,14 +62,14 @@ domoticzstatus=$(curl -s "http://"$domoticzserverip"/json.htm?type=devices&rid="
|
|||||||
CurTime=$(date '+%d/%m/%Y %H:%M');
|
CurTime=$(date '+%d/%m/%Y %H:%M');
|
||||||
# Compare ping result to Domoticz device status
|
# Compare ping result to Domoticz device status
|
||||||
if [ "$device" = "$domoticzstatus" ] ; then
|
if [ "$device" = "$domoticzstatus" ] ; then
|
||||||
echo "$CurTime | Device: $Name | Status: $technology"
|
echo "$CurTime | Device: $Name | Domo: Synced | Status: $technology"
|
||||||
else
|
else
|
||||||
#echo "Status desynchronized, resynchronizing..."
|
#Domo status sync
|
||||||
if [ "$device" = On ] ; then
|
if [ "$device" = On ] ; then
|
||||||
echo "$CurTime | Device: $Name | Sync: Online"
|
echo "$CurTime | Device: $Name | Domo: Desynced | Status: $technology"
|
||||||
curl -s "http://"$domoticzserverip"/json.htm?type=command¶m=switchlight&idx="$IDX"&switchcmd=On" 2>/dev/null 1>/dev/null
|
curl -s "http://"$domoticzserverip"/json.htm?type=command¶m=switchlight&idx="$IDX"&switchcmd=On" 2>/dev/null 1>/dev/null
|
||||||
else
|
else
|
||||||
echo "$CurTime | Device: $Name | Sync: Offline"
|
echo "$CurTime | Device: $Name | Domo: Desynced | Status: $technology"
|
||||||
curl -s "http://"$domoticzserverip"/json.htm?type=command¶m=switchlight&idx="$IDX"&switchcmd=Off" 2>/dev/null 1>/dev/null
|
curl -s "http://"$domoticzserverip"/json.htm?type=command¶m=switchlight&idx="$IDX"&switchcmd=Off" 2>/dev/null 1>/dev/null
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user