Update temp.inc.sh
This commit is contained in:
@@ -14,20 +14,25 @@ GET_HOST_FANSPEED(){
|
||||
}
|
||||
START_POWERWALL_FAN(){
|
||||
PWCMD="ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${PW_REMOTE_SENSORS['Powerwall-FAN']}"
|
||||
if ${PWCMD} [ -f /sys/class/hwmon/hwmon2/fan1_input ]; then
|
||||
FANINPUT=/sys/class/hwmon/hwmon2/fan1_input
|
||||
elif ${PWCMD} [ -f /sys/class/hwmon/hwmon3/fan1_input ]; then
|
||||
FANINPUT=/sys/class/hwmon/hwmon3/fan1_input
|
||||
fi
|
||||
${PWCMD} pwmconfig &
|
||||
sleep 4s
|
||||
${PWCMD} killall pwmconfig >/dev/null 2>&1
|
||||
if ${PWCMD} [ -f ${PW_FANINPUT} ]; then
|
||||
temp_c=$(${PWCMD} cat ${PW_FANINPUT})
|
||||
if ${PWCMD} [ -f ${FANINPUT} ]; then
|
||||
temp_c=$(${PWCMD} cat ${FANINPUT})
|
||||
if [ ${temp_c} -gt 0 ]; then
|
||||
fs=$(IDS_NUMBER_FORMAT ${temp_c})
|
||||
SENDNOTICE "Starting up the ${SENSOR}" "Startup confirmed, the fan is now reading: ${fs}'RPM
|
||||
|
||||
FAN: ${PW_FANINPUT}"
|
||||
FAN: ${FANINPUT}"
|
||||
else
|
||||
SENDNOTICE "FAILED to start ${SENSOR}" "Cannot start the fan, ERROR WILL ROBINSON!!!
|
||||
|
||||
FAN: ${PW_FANINPUT}" 1
|
||||
FAN: ${FANINPUT}" 1
|
||||
fi
|
||||
else
|
||||
SENDNOTICE "FAILED to start ${SENSOR}" "Cannot find hardware, ERROR ERROR ERROR... DOES NOT COMPUTE... YOU SUCK" 1
|
||||
@@ -1617,7 +1622,7 @@ SENDTEMP(){
|
||||
temp_c=$(vcgencmd measure_temp)
|
||||
temp_c=${temp_c%\'*}; temp_c=${temp_c#*=}
|
||||
elif [[ "${SENSOR}" = *"FAN"* ]]; then
|
||||
temp_c=$(cat ${PW_FANINPUT})
|
||||
temp_c=$(cat ${FANINPUT})
|
||||
fi
|
||||
|
||||
elif [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "remotesystem" ]; then
|
||||
|
||||
Reference in New Issue
Block a user