From e2439a3450f3c88b7ec0e2373b151db15c1ad13a Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Tue, 9 Jan 2024 22:35:56 -0600 Subject: [PATCH] update --- defaults.inc | 2 +- inc/temp.inc.sh | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/defaults.inc b/defaults.inc index b15d8923..a991ebf9 100755 --- a/defaults.inc +++ b/defaults.inc @@ -1,5 +1,5 @@ -VERS='2.5.126-01092024' +VERS='2.5.128-01092024' noheader=' update service dailytemp confsync -r -report ' diff --git a/inc/temp.inc.sh b/inc/temp.inc.sh index c4789e26..c87b7a66 100644 --- a/inc/temp.inc.sh +++ b/inc/temp.inc.sh @@ -16,9 +16,13 @@ START_POWERWALL_FAN(){ pwmconfig & sleep 4s killall pwmconfig - sleep 5s + sleep 1s temp_c=$(cat /sys/class/hwmon/hwmon2/fan1_input) - SENDNOTICE "Starting up the ${SENSOR}" "${SENSOR} is now reading: ${temp_c}" + if [ ${temp_c} -gt 0 ]; then + SENDNOTICE "Starting up the ${SENSOR}" "Startup confirmed, the fan is now reading: ${temp_c}" + else + SENDNOTICE "FAILED to start ${SENSOR}" "Cannot start the fan, ERROR WILL ROBINSON!!!" + fi } CHECKTEMP(){ start=`date +%s` @@ -440,7 +444,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){ temp_c=$(cat /sys/class/hwmon/hwmon2/fan1_input) temp_h='' if [ "${SENSOR}" == "Powerwall-FAN" ] && [ "${temp_c}" == "0" ]; then - START_POWERWALL_FAN & + START_POWERWALL_FAN >/dev/null 2>&1 & fi fi