Skip to content

Commit

Permalink
small fix in autolock.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
MiOrt committed Jan 28, 2020
1 parent ce375af commit 9dfd46a
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions processautolock.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ if [ "$second" -lt "10" ]; then
if [ "$lpenabled" = "1" ]; then
# if the charge point is enabled, check for auto disabling
if [ $timeOfDay = "$lockTime" ]; then
#echo "${now} autolock time for LP${chargePoint} is up"
# auto lock time is now, set flag
echo "1" > $flagFilename
fi
Expand All @@ -95,9 +94,6 @@ function checkDisableLp {
# and disable charge point
mqttTopic="openWB/set/lp$chargePoint/ChargePointEnabled"
mosquitto_pub -r -t $mqttTopic -m 0
#echo "${now} autolock charge point #${chargePoint}"
else
#echo "${now} no autolock charge point #${chargePoint}, still charging: ${!powerVarName} W"
fi
}

Expand Down Expand Up @@ -132,10 +128,8 @@ do
waitFlag=$(<$flagFilename) # read ramdisk value for autolock wait flag
if [ "$waitFlag" = "1" ]; then
# charge point waiting for lock
#echo "${now} charge point #${chargePoint} waiting for autolock"
if [ $timeOfDay = "$unlockTime" ]; then
# but auto unlock time is now, so delete possible wait-to-lock-flag
#echo "${now} unlock time for charge point #${chargePoint}: disable wait for autolock"
echo "0" > $flagFilename
else
# unlock time not now and waiting for auto lock
Expand All @@ -147,7 +141,6 @@ do
# unlock time is now, so enable charge point
mqttTopic="openWB/set/lp$chargePoint/ChargePointEnabled"
mosquitto_pub -r -t $mqttTopic -m 1
#echo "${now} auto unlock charge point #${chargePoint}"
fi
fi
done

0 comments on commit 9dfd46a

Please sign in to comment.