Update temp.inc.sh
This commit is contained in:
@@ -122,6 +122,7 @@ CHECKTEMP(){
|
|||||||
[ ${REPORT} -eq 0 ] && echo -en "\r\033[K${idsCL[White]}${idsST[Bold]}${SENSOR_DESC}${idsST[Reset]}${spc}${idsCL[Default]}: ${idsCL[Yellow]}Pulling data ... "
|
[ ${REPORT} -eq 0 ] && echo -en "\r\033[K${idsCL[White]}${idsST[Bold]}${SENSOR_DESC}${idsST[Reset]}${spc}${idsCL[Default]}: ${idsCL[Yellow]}Pulling data ... "
|
||||||
|
|
||||||
if [ ! -f ${PW_TMPFOLDER}/${SENSOR}.down ]; then
|
if [ ! -f ${PW_TMPFOLDER}/${SENSOR}.down ]; then
|
||||||
|
CHECKTEMPSENSOR ${SENSOR}
|
||||||
IFS=: read -r temp_f temp_h <<< $(CHECKTEMPSENSOR ${SENSOR}); unset IFS
|
IFS=: read -r temp_f temp_h <<< $(CHECKTEMPSENSOR ${SENSOR}); unset IFS
|
||||||
if [ "${temp_f}" != "timeout" ] && [ "${temp_f}" != "offline" ]; then
|
if [ "${temp_f}" != "timeout" ] && [ "${temp_f}" != "offline" ]; then
|
||||||
[ "${PW_SENSOR_TYPE[${SENSOR}]}" == "system" ] && [[ "${SENSOR}" = *"FAN"* ]] && temp_f_disp=$(IDS_NUMBER_FORMAT ${temp_f} 0) || temp_f_disp=${temp_f}
|
[ "${PW_SENSOR_TYPE[${SENSOR}]}" == "system" ] && [[ "${SENSOR}" = *"FAN"* ]] && temp_f_disp=$(IDS_NUMBER_FORMAT ${temp_f} 0) || temp_f_disp=${temp_f}
|
||||||
@@ -756,7 +757,7 @@ CHECKTEMPSENSOR(){
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
elif [ "${PW_SENSOR_TYPE[${1}]}" == "ds18b20" ]; then
|
elif [ "${PW_SENSOR_TYPE[${1}]}" == "ds18b20" ]; then
|
||||||
echo "HERE: ${1} - ${PW_SENSOR_DEVICEID[${1}]}/"
|
echo "HERE: ${1} - ${PW_SENSOR_DEVICEID[${1}]}"
|
||||||
if ! temp_c=$(${SSHCMD} root@${PW_REMOTE_SENSORS[${1}]} cat /sys/devices/w1_bus_master1/${PW_SENSOR_DEVICEID[${1}]}/w1_slave | tail -n1 | cut -d "=" -f2) ; then TIMEOUT=1; fi
|
if ! temp_c=$(${SSHCMD} root@${PW_REMOTE_SENSORS[${1}]} cat /sys/devices/w1_bus_master1/${PW_SENSOR_DEVICEID[${1}]}/w1_slave | tail -n1 | cut -d "=" -f2) ; then TIMEOUT=1; fi
|
||||||
[ "${temp_c}" != "" ] && temp_c=$(echo "scale=2; ${temp_c}/1000" | bc)
|
[ "${temp_c}" != "" ] && temp_c=$(echo "scale=2; ${temp_c}/1000" | bc)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user