From 29acf0378b87a9d603c2f5e9717afc43e4331471 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Wed, 25 Oct 2023 15:53:40 -0500 Subject: [PATCH] update --- defaults.inc | 2 +- powerwall.sh | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/defaults.inc b/defaults.inc index b9ce159a..80a3ccdb 100755 --- a/defaults.inc +++ b/defaults.inc @@ -1,6 +1,6 @@ #!/usr/bin/env bash -VERS='2.3.15-10252023' +VERS='2.3.16-10252023' noheader=' update service dailytemp ' diff --git a/powerwall.sh b/powerwall.sh index 6603b5cf..ac6beb27 100755 --- a/powerwall.sh +++ b/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'`