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