Update powerwall.sh
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user