From c0d1a5ef1f06efa2297032746ecc7135e004f5a5 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Fri, 12 May 2023 18:53:54 -0500 Subject: [PATCH] Update powerwall.sh --- powerwall.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/powerwall.sh b/powerwall.sh index bdbf00d3..da7fd37c 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -131,12 +131,11 @@ CHECKPOWER(){ } CHECKACV_SERVICE(){ - voltstatus=0 - battstatus=0 - while true - do - INPUTACV=$(curl -s "http://10.10.0.61/stats.json" | jq '.inputs .inV') - BATTVOLT=$(curl -s "http://10.10.0.61/stats.json" | jq '.inputs .battV') + voltstatus=0 + battstatus=0 + while true; do + INPUTACV=$(curl -s "http://10.10.0.61/stats.json" | jq '.inputs .inV') + BATTVOLT=$(curl -s "http://10.10.0.61/stats.json" | jq '.inputs .battV') datetime=`date +'%Y-%m-%d %H:%M:%S'` if [ ${INPUTACV} -ge ${min_acvolt} ]; then if [ $voltstatus -eq 3 ]; then