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 31c61fc commit a708cbe
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions scripts/controller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,24 @@ for switchablesockets_condition in "${switchablesockets_conditions[@]}"; do
fi
done

if ((use_solarweather_api_to_abort == 1)); then
if ((abort_suntime <= suntime_today)); then
echo "I: There are enough sun minutes today. Abort." | tee -a "$LOG_FILE"
execute_charging=0
execute_switchablesockets_on=0
fi
if ((abort_solar_yield_today_integer <= solarenergy_today_integer)); then
echo "I: There is enough solarenergy today. Abort." | tee -a "$LOG_FILE"
execute_charging=0
execute_switchablesockets_on=0
fi
if ((abort_solar_yield_tomorrow_integer <= solarenergy_tomorrow_integer)); then
echo "I: There is enough sun tomorrow. Abort." | tee -a "$LOG_FILE"
execute_charging=0
execute_switchablesockets_on=0
fi
fi

# If any charging condition is met, start charging
if (( execute_charging == 1 && use_victron_charger == 1 )); then
# Calculate the energy_loss_percent of the current_price_integer number
Expand Down

0 comments on commit a708cbe

Please sign in to comment.