Update powerwall.sh
This commit is contained in:
10
powerwall.sh
10
powerwall.sh
@@ -179,7 +179,8 @@ 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
|
||||||
@@ -424,8 +425,8 @@ 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 # &
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -702,7 +703,7 @@ POWERLOGGER(){
|
|||||||
POWERLOGGER_SERVICE(){
|
POWERLOGGER_SERVICE(){
|
||||||
while true; do
|
while true; do
|
||||||
datetime=`date +'%Y-%m-%d %H:%M:%S'`
|
datetime=`date +'%Y-%m-%d %H:%M:%S'`
|
||||||
echo go
|
|
||||||
INVSTATSINFO=$(curl -s "https://inv1.scity.us/stats.json")
|
INVSTATSINFO=$(curl -s "https://inv1.scity.us/stats.json")
|
||||||
inV=`echo ${INVSTATSINFO} | jq '.inputs .inV'`
|
inV=`echo ${INVSTATSINFO} | jq '.inputs .inV'`
|
||||||
inA=`echo ${INVSTATSINFO} | jq '.inputs .inA'`
|
inA=`echo ${INVSTATSINFO} | jq '.inputs .inA'`
|
||||||
@@ -744,7 +745,6 @@ POWERLOGGER_SERVICE(){
|
|||||||
sleep 1m
|
sleep 1m
|
||||||
else
|
else
|
||||||
sleep 5m
|
sleep 5m
|
||||||
echo sleeping
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user