Update powerwall.sh
This commit is contained in:
@@ -318,14 +318,13 @@ CHECKTEMP_SERVICE(){
|
|||||||
if (( $(bc <<< "${temp_f} < ${temp_warn}") )); then
|
if (( $(bc <<< "${temp_f} < ${temp_warn}") )); then
|
||||||
echo 2
|
echo 2
|
||||||
if (( $(bc <<< "${last_temp[${SENSOR}]} > 1") )); then
|
if (( $(bc <<< "${last_temp[${SENSOR}]} > 1") )); then
|
||||||
echo 3
|
|
||||||
SENDNOTICE "${SENSOR} BACK TO NORMAL" "NORMAL TEMP: ${temp_f}${GAUGESH}
|
SENDNOTICE "${SENSOR} BACK TO NORMAL" "NORMAL TEMP: ${temp_f}${GAUGESH}
|
||||||
Previous Temp: ${last_temp[${SENSOR}]}${GAUGESH}"
|
Previous Temp: ${last_temp[${SENSOR}]}${GAUGESH}"
|
||||||
echo -e "($(date +'%Y-%m-%d %H:%M:%S')) - ${temp_f}${GAUGESH} - Back to NORMAL ${GAUGE} - Previous ${GAUGE}: ${last_temp[${SENSOR}]}${GAUGESH}" >> ${logtemp}
|
echo -e "($(date +'%Y-%m-%d %H:%M:%S')) - ${temp_f}${GAUGESH} - Back to NORMAL ${GAUGE} - Previous ${GAUGE}: ${last_temp[${SENSOR}]}${GAUGESH}" >> ${logtemp}
|
||||||
echo -e "($(date +'%Y-%m-%d %H:%M:%S')) - ${temp_f}${GAUGESH} - ${SENSOR} - Back to NORMAL ${GAUGE}" >> ${PW_LOGFILE}
|
echo -e "($(date +'%Y-%m-%d %H:%M:%S')) - ${temp_f}${GAUGESH} - ${SENSOR} - Back to NORMAL ${GAUGE}" >> ${PW_LOGFILE}
|
||||||
# [ "$(compgen -G "${PW_TMPFOLDER}/power.*.off")" != "" ] && rm -f ${PW_TMPFOLDER}/power.*.off
|
# [ "$(compgen -G "${PW_TMPFOLDER}/power.*.off")" != "" ] && rm -f ${PW_TMPFOLDER}/power.*.off
|
||||||
|
|
||||||
elif (( $(bc <<< "${temp_diff} = 0") )); then
|
elif (( $(bc <<< "${last_temp[${SENSOR}]} = 0") )); then
|
||||||
echo 4
|
echo 4
|
||||||
# SENDNOTICE "${SENSOR} TEMP NORMAL" "Service Startup
|
# SENDNOTICE "${SENSOR} TEMP NORMAL" "Service Startup
|
||||||
# NORMAL TEMP: ${temp_f}${GAUGESH}"
|
# NORMAL TEMP: ${temp_f}${GAUGESH}"
|
||||||
@@ -334,11 +333,9 @@ Previous Temp: ${last_temp[${SENSOR}]}${GAUGESH}"
|
|||||||
# [ "$(compgen -G "${PW_TMPFOLDER}/power.*.off")" != "" ] && rm -f ${PW_TMPFOLDER}/power.*.off
|
# [ "$(compgen -G "${PW_TMPFOLDER}/power.*.off")" != "" ] && rm -f ${PW_TMPFOLDER}/power.*.off
|
||||||
|
|
||||||
elif [ "${relog}" == "1" ]; then
|
elif [ "${relog}" == "1" ]; then
|
||||||
echo 5
|
|
||||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${temp_f}${GAUGESH} - Normal ${GAUGE}" >> ${logtemp}
|
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${temp_f}${GAUGESH} - Normal ${GAUGE}" >> ${logtemp}
|
||||||
|
|
||||||
fi
|
fi
|
||||||
echo 6
|
|
||||||
rm -f ${PW_TMPFOLDER}/temp.*
|
rm -f ${PW_TMPFOLDER}/temp.*
|
||||||
rm -f ${PW_TMPFOLDER}/power.${SENSORa}.off
|
rm -f ${PW_TMPFOLDER}/power.${SENSORa}.off
|
||||||
last_temp[${SENSOR}]=1
|
last_temp[${SENSOR}]=1
|
||||||
|
|||||||
Reference in New Issue
Block a user