This commit is contained in:
2023-12-17 10:15:50 -06:00
parent 55627aecd2
commit abd3b0361f
2 changed files with 3 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
VERS='2.5.30-12152023'
VERS='2.5.31-12152023'
noheader=' update service dailytemp confsync '

View File

@@ -481,13 +481,12 @@ Previous Temp: ${last_temp[${SENSOR//-/}]}${GAUGESH}"
#### LOGGING OF SERVERROOM SENSOR DIFFERENCE
if [ "${SENSOR}" == "ServerRoomLA" ]; then
if [ ! -f ${PW_TMPFOLDER}/.log.sr.difference ] || [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.log.sr.difference)) -ge 10 ]; then
if [ ! -f ${PW_TMPFOLDER}/.log.sr.difference ] || [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.log.sr.difference)) -ge 300 ]; then
if [ "${temp_probe_f}" != "" ] && [ "${ServerRoomTH}" != "" ]; then
[ ! -f ${PW_TMPFOLDER}/.log.sr.difference ] && touch ${PW_TMPFOLDER}/.log.sr.difference
temp_difference=$(bc <<< "scale=1; ${temp_probe_f}-${ServerRoomTH}")
(( $(bc <<<"${temp_difference} < 0") )) && temp_difference=`echo "scale=1; ${temp_difference} * -1" | bc`
echo "HERE: ${temp_probe_f} - ${ServerRoomTH} = ${temp_difference}"
echo ${temp_difference} >> ${PW_TMPFOLDER}/.log.sr.difference
echo "$(date "+%Y-%m-%d %H:%M:%S")~${temp_difference}" >> ${PW_TMPFOLDER}/.log.sr.difference
fi
fi
elif [ "${SENSOR}" == "ServerRoomTH" ]; then