This commit is contained in:
2023-10-25 15:53:40 -05:00
parent 0a882df743
commit 29acf0378b
2 changed files with 13 additions and 13 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
VERS='2.3.15-10252023' VERS='2.3.16-10252023'
noheader=' update service dailytemp ' noheader=' update service dailytemp '

View File

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