Skip to content

Commit

Permalink
Update controller.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
christian1980nrw authored Sep 30, 2023
1 parent 0d4ec2c commit a27b047
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scripts/controller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -880,8 +880,8 @@ if (( execute_charging == 1 && use_victron_charger == 1 )); then
echo "I: Difference between highest price and current price is greater than ${energy_loss_percent}%." | tee -a "$LOG_FILE"
echo " Charging makes sense." | tee -a "$LOG_FILE"
if [ 0 -lt $use_victron_charger ]; then
echo " Executing 1 hour charging." | tee -a "$LOG_FILE"
$charger_command_turnon
echo "I: Victron scheduled charging is ON. Battery SOC is at $SOC_percent %." | tee -a "$LOG_FILE"
else
echo " Not executing 1 hour charging only since use_victron_charger not enabled." | tee -a "$LOG_FILE"
fi
Expand All @@ -891,6 +891,11 @@ if (( execute_charging == 1 && use_victron_charger == 1 )); then
fi
fi

if (( execute_charging != 1 && use_victron_charger == 1 )); then
echo "I: Victron scheduled charging is OFF. Battery SOC is at $SOC_percent %." | tee -a "$LOG_FILE"
$charger_command_turnoff
fi

# Execute Fritz DECT on command
if (( use_fritz_dect_sockets == 1 )); then
# Get session ID (SID)
Expand Down Expand Up @@ -977,11 +982,6 @@ if (( execute_switchablesockets_on != 1 && use_shelly_wlan_sockets == 1 )); then
done
fi

if (( execute_charging != 1 && use_victron_charger == 1 )); then
echo "I: Stopping Victron scheduled charging. Battery SOC is at $SOC_percent %." | tee -a "$LOG_FILE"
$charger_command_turnoff
fi

echo >> "$LOG_FILE"

# Rotating log files
Expand Down

0 comments on commit a27b047

Please sign in to comment.