This commit is contained in:
2025-07-12 10:37:04 -05:00
parent 5614ae14ac
commit adf883d1d5
4 changed files with 10 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
PW_VERS='2.11.14-07122025'
PW_VERS='2.11.15-07122025'
noheader=' update service dailytemp confsync -r -report test '

View File

@@ -874,7 +874,7 @@ BATT VOLTAGE: `IDS_NUMBER_FORMAT ${BATTVOLT}`'V ~ (`IDS_NUMBER_FORMAT ${BATTLIFE
else
[ $(expr `date +%s` - $(stat -c %Y ${PW_LOGPOWER})) -ge $(echo "scale=0; ${PW_LOG_INTERVAL_NORMAL}*60" | tr -d $'\r' | bc) ] && echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${INPUTACV}'V - Normal Voltage" >> ${PW_LOGPOWER}
if [ -f ${PW_TMPFOLDER}/power.ac.start ]; then
[ ! -f ${NM_TMPFOLDER}/.nosend_update ] && SENDNOTICE "POWER Startup - Nominal" "Service Startup
[ ! -f ${PW_TMPFOLDER}/.nosend_update ] && SENDNOTICE "POWER Startup - Nominal" "Service Startup
Normal voltage detected
GRID VOLTAGE: ${INPUTACV}'V
BATT VOLTAGE: `IDS_NUMBER_FORMAT ${BATTVOLT}`'V ~ (`IDS_NUMBER_FORMAT ${BATTLIFE}`'% @ ${BATT_FULL}'V)"
@@ -901,7 +901,7 @@ BATT VOLTAGE: `IDS_NUMBER_FORMAT ${BATTVOLT}`'V ~ (`IDS_NUMBER_FORMAT ${BATTLIFE
else
[ $(expr `date +%s` - $(stat -c %Y ${PW_LOGPOWER})) -ge 300 ] && echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${INPUTACV}'V / ${BATTVOLT}'V - Power OFF or LOW" >> ${PW_LOGPOWER}
if [ -f ${PW_TMPFOLDER}/power.ac.start ]; then
[ ! -f ${NM_TMPFOLDER}/.nosend_update ] && SENDNOTICE "POWER Startup - POWER OFF/LOW -${PW_DISCHARGE}- !!" "Service Startup
[ ! -f ${PW_TMPFOLDER}/.nosend_update ] && SENDNOTICE "POWER Startup - POWER OFF/LOW -${PW_DISCHARGE}- !!" "Service Startup
Power off or low voltage detected
GRID VOLTAGE: ${INPUTACV}'V
BATT VOLTAGE: `IDS_NUMBER_FORMAT ${BATTVOLT}`'V ~ (`IDS_NUMBER_FORMAT ${BATTLIFE}`'% @ ${BATT_FULL}'V)" 1
@@ -1089,7 +1089,7 @@ AMBIENT TEMP: ${OFFSITE_TEMP}'F"
if [ "${startup}" = "true" ]; then
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${OFFSITE_VOLTIN}'V - ${OFFSITE_WATTS}'W - ${OFFSITE_BATT_CAP}'% Battery - ${OFFSITE_BATT_RUNTIME}'mins - Service startup" >> ${PW_LOGPOWER}
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${OFFSITE_VOLTIN}'V - ${OFFSITE_BATT_CAP}'% Battery - Service startup" >> ${PW_LOGFILE}
[ ! -f ${NM_TMPFOLDER}/.nosend_update ] && OFFSITE_SENDPOWER "OFFSITE MONITOR Service Startup" &
[ ! -f ${PW_TMPFOLDER}/.nosend_update ] && OFFSITE_SENDPOWER "OFFSITE MONITOR Service Startup" &
startup=false
fi
@@ -1190,7 +1190,7 @@ AMBIENT TEMP: ${OFFSITE_TEMP}'F"
POWERLOGGER_SERVICE(){
[ ! -f ${NM_TMPFOLDER}/.nosend_update ] && SENDPOWER "POWER LOGGING Service Startup" &
[ ! -f ${PW_TMPFOLDER}/.nosend_update ] && SENDPOWER "POWER LOGGING Service Startup" &
while true; do
start=$(date +%s)
log_start=$(date "+%Y-%m-%d %H:%M:%S")

View File

@@ -848,7 +848,7 @@ AVERAGETEMP(){
CHECKTEMP_SERVICE(){
cw=20
([ ! -f ${NM_TMPFOLDER}/.nosend_update ] && [[ "${IP}" != "10.6."* ]]) && SENDTEMPS "TEMP Service Startup" &
([ ! -f ${PW_TMPFOLDER}/.nosend_update ] && [[ "${IP}" != "10.6."* ]]) && SENDTEMPS "TEMP Service Startup" &
[ ! -d ${PW_TMPFOLDER}/.lastfancheck ] && mkdir ${PW_TMPFOLDER}/.lastfancheck
[ ! -d ${PW_TMPFOLDER}/.lastinsert ] && mkdir ${PW_TMPFOLDER}/.lastinsert
@@ -1404,7 +1404,7 @@ Previous Temp: ${last_temp}${GAUGESH}"
###################
else
if [ ! -f ${NM_TMPFOLDER}/${SENSOR}.disable ] && ([ "${PW_ESXI_HOST_NAME[${SENSORa}]}" == "" ] || ([[ "${PW_ESXI_HOST_NAME[${SENSORa}]}" != *"10.2."* ]] || ([[ "${PW_ESXI_HOST_NAME[${SENSORa}]}" = *"10.2."* ]] && [ ! -f ${PW_TMPFOLDER}/OFF-vMS-Host1.down ]))); then
if [ ! -f ${PW_TMPFOLDER}/${SENSOR}.disable ] && ([ "${PW_ESXI_HOST_NAME[${SENSORa}]}" == "" ] || ([[ "${PW_ESXI_HOST_NAME[${SENSORa}]}" != *"10.2."* ]] || ([[ "${PW_ESXI_HOST_NAME[${SENSORa}]}" = *"10.2."* ]] && [ ! -f ${PW_TMPFOLDER}/OFF-vMS-Host1.down ]))); then
[ ! -f ${PW_TMPFOLDER}/${SENSOR}.down ] && touch ${PW_TMPFOLDER}/${SENSOR}.down
if [ ! -f ${PW_TMPFOLDER}/${SENSOR}-error.reading ]; then
touch ${PW_TMPFOLDER}/${SENSOR}-error.reading
@@ -1456,7 +1456,7 @@ Previous Temp: ${last_temp}${GAUGESH}"
fi
else
if [ ! -f ${NM_TMPFOLDER}/${SENSORa}.disable ] && ([ "${PW_ESXI_HOST_NAME[${SENSORa}]}" == "" ] || ([[ "${PW_ESXI_HOST_NAME[${SENSORa}]}" != *"10.2."* ]] || ([[ "${PW_ESXI_HOST_NAME[${SENSORa}]}" = *"10.2."* ]] && [ ! -f ${PW_TMPFOLDER}/OFF-vMS-Host1.down ]))); then
if [ ! -f ${PM_TMPFOLDER}/${SENSORa}.disable ] && ([ "${PW_ESXI_HOST_NAME[${SENSORa}]}" == "" ] || ([[ "${PW_ESXI_HOST_NAME[${SENSORa}]}" != *"10.2."* ]] || ([[ "${PW_ESXI_HOST_NAME[${SENSORa}]}" = *"10.2."* ]] && [ ! -f ${PW_TMPFOLDER}/OFF-vMS-Host1.down ]))); then
[ ! -f ${PW_TMPFOLDER}/${SENSORa}.down ] && touch ${PW_TMPFOLDER}/${SENSORa}.down
if [ ! -f ${PW_TMPFOLDER}/${SENSORa}-error.reading ]; then
touch ${PW_TMPFOLDER}/${SENSORa}-error.reading

4
run.sh
View File

@@ -49,7 +49,7 @@ if [ "${1}" == "update" ]; then
echo -en "\e[1A";
echo -e "\e[0K\r ${idsCL[Green]}Update to v${PW_VERS} complete${idsCL[Default]}"
fi
touch ${NM_TMPFOLDER}/.nosend_update
touch ${PW_TMPFOLDER}/.nosend_update
if [ "${2}" != "q" ] && [ "${2}" != "y" ] && [ "${2}" != "n" ]; then
if [ -f ${NM_TMPFOLDER}/.singleserver.PW.primary ] || [ -f ${NM_TMPFOLDER}/.singleserver.PWO.primary ]; then
echo -en "${idsCL[LightCyan]}Do you want to restart PowerWall Services as well? (y/N): "
@@ -69,7 +69,7 @@ if [ "${1}" == "update" ]; then
elif [ "${2}" == "q" ]; then
([ -f ${NM_TMPFOLDER}/.singleserver.PW.primary ] || [ -f ${NM_TMPFOLDER}/.singleserver.PWO.primary ]) && ${PW_SCRIPT} service all restart >/dev/null 2>&1
fi
sleep 60s && rm -f ${NM_TMPFOLDER}/.nosend_update &
sleep 60s && rm -f ${PW_TMPFOLDER}/.nosend_update &
elif [ "${2}" != "q" ]; then
echo -en "\e[1A";