Update powerwall.sh

This commit is contained in:
2023-11-07 21:51:56 -06:00
parent 7e9a931411
commit 8d264d1d15

View File

@@ -211,13 +211,13 @@ CHECKTEMP_SERVICE(){
declare -A last_temp declare -A last_temp
while true; do while true; do
# start=`date +%s` # start=`date +%s`
time="$(date +%H)$(date +%M)" # time="$(date +%H)$(date +%M)"
if [ ! -f ${PW_TMPFOLDER}/temp.* ] && [ $(date +%H)$(date +%M) -ge 0700 ] && [ $(date +%H)$(date +%M) -lt 0705 ]; then # if [ ! -f ${PW_TMPFOLDER}/temp.* ] && [ $(date +%H)$(date +%M) -ge 0700 ] && [ $(date +%H)$(date +%M) -lt 0705 ]; then
if [ ! -f ${PW_TMPFOLDER}/.sentdaily ] || [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.sentdaily)) -gt 600 ]; then # if [ ! -f ${PW_TMPFOLDER}/.sentdaily ] || [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.sentdaily)) -gt 600 ]; then
touch ${PW_TMPFOLDER}/.sentdaily # touch ${PW_TMPFOLDER}/.sentdaily
SENDDAILY & # SENDDAILY &
fi # fi
fi # fi
for SENSORa in ${PW_SENSOR_ORD[@]}; do for SENSORa in ${PW_SENSOR_ORD[@]}; do
logtemp=${PW_LOGFOLDER}/log-temp-${SENSORa} logtemp=${PW_LOGFOLDER}/log-temp-${SENSORa}
[ ! -f ${logtemp} ] && touch ${logtemp} [ ! -f ${logtemp} ] && touch ${logtemp}