This commit is contained in:
2023-12-30 14:52:53 -06:00
parent 656c71e13f
commit faa2f7026f
2 changed files with 14 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
VERS='2.5.89-12302023'
VERS='2.5.90-12302023'
noheader=' update service dailytemp confsync '

View File

@@ -382,7 +382,7 @@ VOLTAGE: ${INPUTACV}'volts"
else
[ $(expr `date +%s` - $(stat -c %Y ${PW_LOGPOWER})) -ge $(echo "scale=0; ${PW_LOG_INTERVAL_NORMAL}*60" | bc) ] && echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${INPUTACV}'volts - Normal Voltage" >> ${PW_LOGPOWER}
if [ -f ${PW_TMPFOLDER}/power.ac.start ]; then
SENDNOTICE "Power Nominal" "Service Startup
SENDNOTICE "POWER Startup - Nominal" "Service Startup
Normal voltage detected
VOLTAGE: ${INPUTACV}'volts
BATT VOLTAGE: ${BATTVOLT}'volts"
@@ -413,7 +413,18 @@ BATT VOLTAGE: ${BATTVOLT}'volts"
else
[ $(expr `date +%s` - $(stat -c %Y ${PW_LOGPOWER})) -ge 300 ] && echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${INPUTACV}'volts / ${BATTVOLT}'volts - Power OFF or LOW" >> ${PW_LOGPOWER}
if [ -f ${PW_TMPFOLDER}/power.ac.good ]; then
if [ -f ${PW_TMPFOLDER}/power.ac.start ]; then
SENDNOTICE "POWER Startup - POWER OFF/LOW!!" "Service Startup
Power off or low voltage detected
VOLTAGE: ${INPUTACV}'volts
BATT VOLTAGE: ${BATTVOLT}'volts" 1
echo "($(date +'%Y-%m-%d %H:%M:%S')) - Input: ${INPUTACV}'volts - 'Check Power' Service Startup - Normal voltage detected" >> ${PW_LOGFILE}
echo "($(date +'%Y-%m-%d %H:%M:%S')) - Input: ${INPUTACV}'volts - 'Check Power' Service Startup - Normal voltage detected" >> ${PW_LOGPOWER}
rm -f ${PW_TMPFOLDER}/power.ac.start
rm -f ${PW_TMPFOLDER}/power.ac.good
touch ${PW_TMPFOLDER}/power.ac.low
elif [ -f ${PW_TMPFOLDER}/power.ac.good ]; then
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${INPUTACV}'volts / ${BATTVOLT}'volts - Power OFF or LOW voltage detected" >> ${PW_LOGPOWER}
SENDNOTICE "POWER ALERT - POWER OFF/LOW!!" "Power off or low voltage detected
VOLTAGE: ${INPUTACV}'volts