Update powerwall.sh
This commit is contained in:
11
powerwall.sh
11
powerwall.sh
@@ -179,8 +179,7 @@ CHECKTEMP_SERVICE(){
|
|||||||
cw=20
|
cw=20
|
||||||
declare -A last_temp
|
declare -A last_temp
|
||||||
while true; do
|
while true; do
|
||||||
start=`date +%s`
|
# start=`date +%s`
|
||||||
echo go
|
|
||||||
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
|
||||||
@@ -425,7 +424,7 @@ Previous Temp: ${last_temp[${SENSOR}]}'F"
|
|||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
end=`date +%s`; runtime=$((end-start)); echo "runtime: ${runtime}, pausing for 60secs..."
|
# end=`date +%s`; runtime=$((end-start)); echo "runtime: ${runtime}, pausing for 60secs..."
|
||||||
sleep 60
|
sleep 60
|
||||||
done # &
|
done # &
|
||||||
}
|
}
|
||||||
@@ -1159,11 +1158,11 @@ fi
|
|||||||
if [ "${3}" = "start" ] || [ "${3}" = "" ]; then
|
if [ "${3}" = "start" ] || [ "${3}" = "" ]; then
|
||||||
if [ "${2}" = "temp" ]; then
|
if [ "${2}" = "temp" ]; then
|
||||||
SENDNOTICE "Temp Monitor Startup" "$(DAILYTEMP)" &
|
SENDNOTICE "Temp Monitor Startup" "$(DAILYTEMP)" &
|
||||||
CHECKTEMP_SERVICE &
|
CHECKTEMP_SERVICE
|
||||||
elif [ "${2}" = "power" ]; then
|
elif [ "${2}" = "power" ]; then
|
||||||
CHECKPOWER_SERVICE &
|
CHECKPOWER_SERVICE
|
||||||
elif [ "${2}" = "powerlogger" ]; then
|
elif [ "${2}" = "powerlogger" ]; then
|
||||||
POWERLOGGER_SERVICE &
|
POWERLOGGER_SERVICE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
elif [ "${3}" = "stop" ]; then
|
elif [ "${3}" = "stop" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user