This commit is contained in:
2024-12-18 22:48:03 -06:00
parent a5d7365f8b
commit 7c07773e1a
2 changed files with 11 additions and 9 deletions

View File

@@ -705,7 +705,14 @@ CHECKTEMPSENSOR(){
temp_c=${temp_c%\'*}; temp_c=${temp_c#*=}
fi
elif [[ "${1}" = *"FAN"* ]]; then
if ! temp_c=$(ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${PW_REMOTE_SENSORS[${1}]} cat ${PW_FANINPUT}) ; then TIMEOUT=1; fi
# if [ "${1}" == "Powerwall-FAN" ]; then
if ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${PW_REMOTE_SENSORS[${1}]} [ -f /sys/class/hwmon/hwmon2/fan1_input ]; then
FANINPUT=/sys/class/hwmon/hwmon2/fan1_input
elif ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${PW_REMOTE_SENSORS[${1}]} [ -f /sys/class/hwmon/hwmon3/fan1_input ]; then
FANINPUT=/sys/class/hwmon/hwmon3/fan1_input
fi
# fi
if ! temp_c=$(ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${PW_REMOTE_SENSORS[${1}]} cat ${FANINPUT}) ; then TIMEOUT=1; fi
fi
elif [ "${PW_SENSOR_TYPE[${1}]}" == "esxi" ]; then