From a6577328492cd7a35a473725908e655814400602 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sun, 11 Sep 2022 15:32:32 -0500 Subject: [PATCH] Update powerwall.sh --- powerwall.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/powerwall.sh b/powerwall.sh index 81a902e4..8a8e9ae2 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -117,11 +117,12 @@ CHECKACV_SERVICE(){ INPUTACV=$(curl -s "http://10.10.0.61/stats.json" | jq '.inputs .inV') datetime=`date +'%Y-%m-%d %H:%M:%S'` if [ ${INPUTACV} -ge ${min_volt} ]; then - echo "($datetime) normal voltage: ${INPUTACV}V" if [ $voltstatus -eq 3 ]; then + echo "($datetime) back to normal voltage: ${INPUTACV}V" echo -e "($datetime) Normal voltage detected\nVOLTAGE: ${INPUTACV}V" | mail -s "POWER NOMINAL AGAIN" $email_alert echo "alert sent" elif [ $voltstatus -eq 0 ]; then + echo "($datetime) normal voltage: ${INPUTACV}V" echo -e "($datetime) Normal voltage detected\nVOLTAGE: ${INPUTACV}V" | mail -s "Power Nominal" $email_alert echo "alert sent" fi