From b6d8102ff0ae462be90f028faf7da1bcf95c3985 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Tue, 9 Jan 2024 22:28:55 -0600 Subject: [PATCH] Update temp.inc.sh --- inc/temp.inc.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/inc/temp.inc.sh b/inc/temp.inc.sh index 6c71179c..21272e5a 100644 --- a/inc/temp.inc.sh +++ b/inc/temp.inc.sh @@ -12,6 +12,14 @@ GET_HOST_FANSPEED(){ fi echo ${FanSpeed} > ${PW_TMPFOLDER}/.fanspeed.${PW_ESXI_HOST_NAMES[${1}]} } +START_POWERWALL_FAN(){ + pwmconfig & + sleep 6s + killall pwmconfig + sleep 3s + temp_c=$(cat /sys/class/hwmon/hwmon2/fan1_input) + SENDNOTICE "Starting up the ${SENSOR}" "${SENSOR} is now reading: ${temp_c}" +} CHECKTEMP(){ start=`date +%s` cw=25; @@ -432,12 +440,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){ temp_c=$(cat /sys/class/hwmon/hwmon2/fan1_input) temp_h='' if [ "${SENSOR}" == "Powerwall-FAN" ] && [ "${temp_c}" == "0" ]; then - pwmconfig & - sleep 5s - killall pwmconfig - sleep 2s - temp_c=$(cat /sys/class/hwmon/hwmon2/fan1_input) - SENDNOTICE "Starting up the ${SENSOR}" "${SENSOR} is now reading: ${temp_c}" + START_POWERWALL_FAN & fi fi