diff --git a/inc/temp.inc.sh b/inc/temp.inc.sh index 93f511fd..4626735f 100644 --- a/inc/temp.inc.sh +++ b/inc/temp.inc.sh @@ -516,22 +516,16 @@ Previous Temp: ${last_temp[${SENSOR//-/}]}${GAUGESH}" ################### else - [ ! -f ${PW_TMPFOLDER}/${SENSOR}.down ] && touch ${PW_TMPFOLDER}/${SENSOR}.down - if [ ! -f ${PW_TMPFOLDER}/${SENSOR}-error.reading ]; then + if [ ! -f ${PW_TMPFOLDER}/${SENSOR}.down ]; then + touch ${PW_TMPFOLDER}/${SENSOR}.down touch ${PW_TMPFOLDER}/${SENSOR}-error.reading - elif ([ ! -f ${PW_TMPFOLDER}/${SENSOR}-error.sent ] && [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/${SENSOR}-error.reading)) -ge 60 ]) || ([ -f ${PW_TMPFOLDER}/${SENSOR}-error.sent ] && [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/${SENSOR}-error.sent)) -ge $(echo "scale=0; ${PW_RENOTIFY_TIMEOUT}*60" | bc) ]); then SENDNOTICE "${SENSOR} Sensor ERROR" "ERROR reading sensor data" 1 echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${SENSOR} Sensor - ERROR reading sensor data" >> ${logtemp} - touch ${PW_TMPFOLDER}/${SENSOR}-error.reading fi - fi - done - fi - - # elif [ "${PW_HOST_ADDRESSES[${SENSORa}]}" == "" ]; then #sensor down + # elif [ "${PW_HOST_ADDRESSES[${SENSORa}]}" == "" ]; then #sensor down else [ ! -f ${PW_TMPFOLDER}/${SENSORa}.down ] && touch ${PW_TMPFOLDER}/${SENSORa}.down if [ ! -f ${PW_TMPFOLDER}/${SENSORa}-error.reading ]; then @@ -539,7 +533,7 @@ Previous Temp: ${last_temp[${SENSOR//-/}]}${GAUGESH}" elif ([ ! -f ${PW_TMPFOLDER}/${SENSORa}-error.sent ] && [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/${SENSORa}-error.reading)) -ge 60 ]) || ([ -f ${PW_TMPFOLDER}/${SENSORa}-error.sent ] && [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/${SENSORa}-error.sent)) -ge $(echo "scale=0; ${PW_RENOTIFY_TIMEOUT}*60" | bc) ]); then SENDNOTICE "${SENSORa} Sensor ERROR" "ERROR reading sensor data" 1 echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${SENSORa} Sensor - ERROR reading sensor data" >> ${logtemp} - touch ${PW_TMPFOLDER}/${SENSORa}-error.reading + touch ${PW_TMPFOLDER}/${SENSORa}-error.sent fi fi