From 4879a342db9d388816a1054d48c4eec067adc98a Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Fri, 18 Aug 2023 18:27:36 -0500 Subject: [PATCH] Update powerwall.sh --- powerwall.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/powerwall.sh b/powerwall.sh index 2bf69f89..ee8b1a9e 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -149,7 +149,6 @@ CHECKTEMP_SERVICE(){ # while true; do for SENSORa in ${PW_SENSOR_ORD[@]}; do - echo $SENSORa logtemp=${PW_LOGFOLDER}/log-temp-${SENSORa} [ ! -f ${logtemp} ] && touch ${logtemp} logtime=$(expr `date +%s` - $(stat -c %Y ${logtemp})) @@ -217,7 +216,7 @@ CHECKTEMP_SERVICE(){ fi temp_f=`echo "scale=2; $temp_c*1.8 + 32" | bc` - echo "HERE: ${SENSOR} - ${temp_f} - ${temp_warn} - ${temp_crit} - ${temp_crit_sys}" + # echo "HERE: ${SENSOR} - ${temp_f} - ${temp_warn} - ${temp_crit} - ${temp_crit_sys}" if [ "${PW_SENSOR_TYPE[${SENSORa}]}" != "esxi" ]; then echo ${PW_TEMP_THRESHOLDS[${SENSOR}]} | cut -d',' -f 1 | read temp_warn @@ -271,6 +270,7 @@ Shutting down system servers!!" 1 else if [ ! -f ${PW_TMPFOLDER}/temp.* ] && [ $(date +%H)$(date +%M) -ge 0700 ] && [ $(date +%H)$(date +%M) -lt 0705 ]; then if [ ! -f ${PW_TMPFOLDER}/.${SENSOR}.sentdaily ] || [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.${SENSOR}.sentdaily)) -gt 600 ]; then + rm -f ${PW_TMPFOLDER}/.${SENSOR}.sentdaily touch ${PW_TMPFOLDER}/.${SENSOR}.sentdaily SENDNOTICE "Daily Temp Readings" "$(DAILYTEMP)" & fi @@ -360,8 +360,8 @@ DAILYTEMP(){ echo -e "Sensor Temperature(s) Now / 1DayAVG / 7DayAVG" DIVIDER . . 60 for SENSOR in ${!PW_SENSOR_ID[@]}; do - average1=$(AVERAGETEMP ${PW_SENSOR_ID[$SENSOR]} 1) - average7=$(AVERAGETEMP ${PW_SENSOR_ID[$SENSOR]} 7) + # average1=$(AVERAGETEMP ${PW_SENSOR_ID[$SENSOR]} 1) + # average7=$(AVERAGETEMP ${PW_SENSOR_ID[$SENSOR]} 7) if [ "${PW_SENSOR_TYPE[${SENSOR}]}" == "mqtt" ]; then mqtt_message=`${mqtt_conn} -t tele/${SENSOR}/SENSOR -C 1`