update
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
VERS='2.8.15c-12182024'
|
||||
VERS='2.8.16-12192024'
|
||||
|
||||
noheader=' update service dailytemp confsync -r -report test '
|
||||
|
||||
@@ -45,9 +45,8 @@ EMAIL_NOTICE=${PW_EMAIL_NOTICE}
|
||||
PUSHOVER_APP_TOKEN=${PW_PUSHOVER_APP_TOKEN}
|
||||
PUSHOVER_USER_TOKEN=${PW_PUSHOVER_USER_TOKEN}
|
||||
|
||||
|
||||
|
||||
[ "${PW_ENABLE_RENOTIFY}" == "" ] && PW_ENABLE_RENOTIFY=1
|
||||
[ "${PW_FANINPUT}" == "" ] && PW_FANINPUT="/sys/class/hwmon/*/fan1_input"
|
||||
|
||||
IFS=,
|
||||
PW_MAINSITEHOSTS=(${PW_MAINSITE_HOSTS})
|
||||
|
||||
@@ -14,25 +14,20 @@ 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 ${FANINPUT} ]; then
|
||||
temp_c=$(${PWCMD} cat ${FANINPUT})
|
||||
if ${PWCMD} [ -f ${PW_FANINPUT} ]; then
|
||||
temp_c=$(${PWCMD} cat ${PW_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: ${FANINPUT}"
|
||||
FAN: ${PW_FANINPUT}"
|
||||
else
|
||||
SENDNOTICE "FAILED to start ${SENSOR}" "Cannot start the fan, ERROR WILL ROBINSON!!!
|
||||
|
||||
FAN: ${FANINPUT}" 1
|
||||
FAN: ${PW_FANINPUT}" 1
|
||||
fi
|
||||
else
|
||||
SENDNOTICE "FAILED to start ${SENSOR}" "Cannot find hardware, ERROR ERROR ERROR... DOES NOT COMPUTE... YOU SUCK" 1
|
||||
@@ -710,14 +705,7 @@ CHECKTEMPSENSOR(){
|
||||
temp_c=${temp_c%\'*}; temp_c=${temp_c#*=}
|
||||
fi
|
||||
elif [[ "${1}" = *"FAN"* ]]; then
|
||||
# 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
|
||||
if ! temp_c=$(ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${PW_REMOTE_SENSORS[${1}]} cat ${PW_FANINPUT}) ; then TIMEOUT=1; fi
|
||||
fi
|
||||
|
||||
elif [ "${PW_SENSOR_TYPE[${1}]}" == "esxi" ]; then
|
||||
@@ -986,14 +974,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
|
||||
temp_c=${temp_c%\'*}; temp_c=${temp_c#*=}
|
||||
fi
|
||||
elif [[ "${SENSOR}" = *"FAN"* ]]; then
|
||||
# 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[${SENSOR}]} cat ${FANINPUT}) ; then TIMEOUT=1; fi
|
||||
if ! temp_c=$(ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${PW_REMOTE_SENSORS[${SENSOR}]} cat ${PW_FANINPUT}) ; then TIMEOUT=1; fi
|
||||
if [ "${SENSOR}" == "Powerwall-FAN" ] && [ ${temp_c} -lt 1500 ]; then
|
||||
START_POWERWALL_FAN >/dev/null 2>&1 &
|
||||
fi
|
||||
@@ -1622,7 +1603,7 @@ SENDTEMP(){
|
||||
temp_c=$(vcgencmd measure_temp)
|
||||
temp_c=${temp_c%\'*}; temp_c=${temp_c#*=}
|
||||
elif [[ "${SENSOR}" = *"FAN"* ]]; then
|
||||
temp_c=$(cat ${FANINPUT})
|
||||
temp_c=$(cat ${PW_FANINPUT})
|
||||
fi
|
||||
|
||||
elif [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "remotesystem" ]; then
|
||||
|
||||
Reference in New Issue
Block a user