Update powerwall.sh
This commit is contained in:
10
powerwall.sh
10
powerwall.sh
@@ -241,7 +241,12 @@ CHECKTEMP_SERVICE(){
|
||||
echo -e "($datetime) - ${temp_f}'F - Shutting down SYS servers" >> ${logtemp}
|
||||
fi
|
||||
else
|
||||
[ ! -f ${PW_TMPFOLDER}/temp.* ] && [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.${SENSOR}.sentdaily)) -gt 600 ] && [ $(date +%H)$(date +%M) -ge 0700 ] && [ $(date +%H)$(date +%M) -lt 0705 ] && touch ${PW_TMPFOLDER}/.${SENSOR}.sentdaily && SENDNOTICE "Daily Temp Readings" "$(DAILYTEMP)" &
|
||||
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
|
||||
touch ${PW_TMPFOLDER}/.${SENSOR}.sentdaily
|
||||
SENDNOTICE "Daily Temp Readings" "$(DAILYTEMP)" &
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ${last_temp[${SENSOR}]} -gt 1 ]; then
|
||||
SENDNOTICE "${SENSOR} BACK TO NORMAL" "($datetime) NORMAL TEMP: ${temp_f}'F
|
||||
@@ -326,6 +331,9 @@ DAILYTEMP(){
|
||||
elif [ "${PW_SENSOR_TYPE[${SENSOR}]}" == "system" ]; then
|
||||
temp_c=$(vcgencmd measure_temp)
|
||||
temp_c=${temp_c%\'*}; temp_c=${temp_c#*=}
|
||||
|
||||
else
|
||||
temp_c=''
|
||||
|
||||
fi
|
||||
if [ "$temp_c" != "null" ] && [ "$temp_c" != "" ]; then
|
||||
|
||||
Reference in New Issue
Block a user