update
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
|
||||
VERS='2.5.23-12142023'
|
||||
VERS='2.5.25-12142023'
|
||||
|
||||
noheader=' update service dailytemp confsync '
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ sys.path.insert(0, os.path.abspath('/opt/pylacrossapi'))
|
||||
from pylacrossapi import lacrosse
|
||||
|
||||
device_id = sys.argv[1]
|
||||
unit_measure = 1
|
||||
unit_measure = 0
|
||||
time_zone = 2
|
||||
|
||||
device1 = lacrosse(device_id,unit_measure,time_zone)
|
||||
|
||||
@@ -133,9 +133,15 @@ CHECKTEMPSENSOR(){
|
||||
fi
|
||||
|
||||
if [ "${temp_c}" != "null" ] && [ "${temp_c}" != "" ]; then
|
||||
[ "${PW_SENSOR_TYPE[${1}]}" == "cpu" ] && temp_f=$(echo "scale=2; $temp_c/1" | bc -l) || temp_f=$(bc <<< "scale=1; ${temp_c}*1.8+32")
|
||||
(( $(bc <<<"${temp_f} < 1") )) && [[ "${temp_f}" = *"."* ]] && temp_f="0${temp_f}"
|
||||
[ "${1}" == "ServerRoomTH" ] && temp_f=`echo "scale=1; ${temp_f}+${PW_ServerRoomTH_Dev}" | bc`
|
||||
if [ "${PW_SENSOR_TYPE[${1}]}" == "cpu" ]; then
|
||||
temp_f=$(echo "scale=2; $temp_c/1" | bc -l) || temp_f=$(bc <<< "scale=1; ${temp_c}*1.8+32")
|
||||
elif (( $(bc <<<"${temp_f} < 1") )) && [[ "${temp_f}" = *"."* ]]; then
|
||||
temp_f="0${temp_f}"
|
||||
elif [ "${1}" == "ServerRoomTH" ]; then
|
||||
temp_f=`echo "scale=1; ${temp_f}+${PW_ServerRoomTH_Dev}" | bc`
|
||||
elif [ "${1}" == "ServerRoomLA" ]; then
|
||||
temp_f=${temp_c}
|
||||
fi
|
||||
# echo "HERE: '${temp_c}' -> '${temp_f}'"
|
||||
# echo -en ""
|
||||
c=0; spct=''; spc1=`expr 6 - ${#temp_f}`; until [ ${c} = ${spc1} ]; do spct="${spct} "; c=`expr ${c} + 1`; done
|
||||
@@ -526,7 +532,7 @@ GET_LACROSSE_INFO(){
|
||||
key=${DINFO%%:*}
|
||||
val=${DINFO##*:}; val=${val//[$'\t\r\n ']}
|
||||
DEVICE_INFO[${key}]=${val}
|
||||
echo "'${key}' => '${val}'"
|
||||
# echo "'${key}' => '${val}'"
|
||||
done
|
||||
|
||||
echo ${DEVICE_INFO['probe_temp']}
|
||||
|
||||
Reference in New Issue
Block a user