Update powerwall.sh

This commit is contained in:
2022-09-11 15:27:44 -05:00
parent e39a8fb557
commit ecf1cdcf4b

View File

@@ -120,15 +120,17 @@ CHECKACV_SERVICE(){
echo "($datetime) normal voltage: ${INPUTACV}V"
if [ $voltstatus -eq 3 ]; then
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 -e "($datetime) Normal voltage detected\nVOLTAGE: ${INPUTACV}V" | mail -s "Power Nominal" $email_alert
echo "alert sent"
fi
last_volt=1
else
echo "($datetime) LOW voltage: ${INPUTACV}V"
if [ $voltstatus -lt 3 ]; then
echo -e "($datetime) Power off or low voltage detected\nVOLTAGE: ${INPUTACV}V" | mail -s "POWER ALERT - LOW POWER!!" $email_alert
echo "alert sent"
fi
voltstatus=3
fi