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