update
This commit is contained in:
24
powerwall.sh
24
powerwall.sh
@@ -495,7 +495,7 @@ DAILYTEMP(){
|
||||
|
||||
|
||||
CHECKPOWER(){
|
||||
INVSTATSINFO=$(curl -s "http://10.10.0.61/stats.json")
|
||||
INVSTATSINFO=$(curl -s "https://inv1.scity.us/stats.json")
|
||||
INPUTV=`echo ${INVSTATSINFO} | jq '.inputs .inV'`
|
||||
INPUTA=`echo ${INVSTATSINFO} | jq '.inputs .inA'`
|
||||
OUTPUTV=`echo ${INVSTATSINFO} | jq '.outputs .outV'`
|
||||
@@ -523,15 +523,15 @@ CHECKPOWER_SERVICE(){
|
||||
while true; do
|
||||
INVSTATSINFO=$(curl -s "https://inv1.scity.us/stats.json")
|
||||
if [ "${INVSTATSINFO}" != "" ]; then
|
||||
[ -f ${PW_TMPFOLDER}/powerlogger.insert ] && lastinsert=$(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/powerlogger.insert)) || lastinsert=100000
|
||||
if [ "$(compgen -G "${PW_TMPFOLDER}/temp.*")" != "" ] || [ "$(compgen -G "${PW_TMPFOLDER}/power.ac.*")" != "" ] || [ "$(compgen -G "${PW_TMPFOLDER}/power.dc.*")" != "" ]; then
|
||||
wait=60
|
||||
else
|
||||
wait=300
|
||||
fi
|
||||
if [ ${lastinsert} -ge ${wait} ]; then
|
||||
POWERLOGGER "${INVSTATSINFO}" &
|
||||
fi
|
||||
# [ -f ${PW_TMPFOLDER}/powerlogger.insert ] && lastinsert=$(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/powerlogger.insert)) || lastinsert=100000
|
||||
# if [ "$(compgen -G "${PW_TMPFOLDER}/temp.*")" != "" ] || [ "$(compgen -G "${PW_TMPFOLDER}/power.ac.*")" != "" ] || [ "$(compgen -G "${PW_TMPFOLDER}/power.dc.*")" != "" ]; then
|
||||
# wait=60
|
||||
# else
|
||||
# wait=300
|
||||
# fi
|
||||
# if [ ${lastinsert} -ge ${wait} ]; then
|
||||
# POWERLOGGER "${INVSTATSINFO}" &
|
||||
# fi
|
||||
|
||||
INPUTACV=$(echo ${INVSTATSINFO} | jq '.inputs .inV')
|
||||
BATTVOLT=$(echo ${INVSTATSINFO} | jq '.inputs .battV')
|
||||
@@ -634,7 +634,7 @@ CHECKPOWER_SERVICE(){
|
||||
POWERLOGGER(){
|
||||
INVSTATSINFO=${1}
|
||||
datetime=`date +'%Y-%m-%d %H:%M:%S'`
|
||||
# INVSTATSINFO=$(curl -s "http://10.10.0.61/stats.json")
|
||||
# INVSTATSINFO=$(curl -s "https://inv1.scity.us/stats.json")
|
||||
inV=`echo ${INVSTATSINFO} | jq '.inputs .inV'`
|
||||
inA=`echo ${INVSTATSINFO} | jq '.inputs .inA'`
|
||||
outV=`echo ${INVSTATSINFO} | jq '.outputs .outV'`
|
||||
@@ -658,7 +658,7 @@ POWERLOGGER_SERVICE(){
|
||||
while true; do
|
||||
datetime=`date +'%Y-%m-%d %H:%M:%S'`
|
||||
|
||||
INVSTATSINFO=$(curl -s "http://10.10.0.61/stats.json")
|
||||
INVSTATSINFO=$(curl -s "https://inv1.scity.us/stats.json")
|
||||
inV=`echo ${INVSTATSINFO} | jq '.inputs .inV'`
|
||||
inA=`echo ${INVSTATSINFO} | jq '.inputs .inA'`
|
||||
outV=`echo ${INVSTATSINFO} | jq '.outputs .outV'`
|
||||
|
||||
Reference in New Issue
Block a user