update
This commit is contained in:
19
defaults.inc
19
defaults.inc
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
VERS='2.3.348-12042023'
|
VERS='2.3.400-12042023'
|
||||||
|
|
||||||
noheader=' update service dailytemp '
|
noheader=' update service dailytemp '
|
||||||
|
|
||||||
@@ -32,14 +32,15 @@ PW_POWERWALL_SERVICES['temp']='monitor-temp'
|
|||||||
PW_POWERWALL_SERVICES['power']='monitor-power'
|
PW_POWERWALL_SERVICES['power']='monitor-power'
|
||||||
PW_POWERWALL_SERVICES['powerlogger']='monitor-powerlogger'
|
PW_POWERWALL_SERVICES['powerlogger']='monitor-powerlogger'
|
||||||
|
|
||||||
declare -A PW_TEMP_THRESHOLDS
|
declare -A PW_THRESHOLDS
|
||||||
# PW_TEMP_THRESHOLDS['ServerRoomTH']="72,74,76" #TEST1
|
# PW_THRESHOLDS['ServerRoomTH']="72,74,76" #TEST1
|
||||||
# PW_TEMP_THRESHOLDS['ServerRoomTH']="83,88,95" #Normal broken
|
# PW_THRESHOLDS['ServerRoomTH']="83,88,95" #Normal broken
|
||||||
PW_TEMP_THRESHOLDS['ServerRoomTH']="80,85,91" #Normal -4
|
PW_THRESHOLDS['ServerRoomTH']="80,85,91" #Normal -4
|
||||||
PW_TEMP_THRESHOLDS['Powerwall-CPU']="122,131,176"
|
PW_THRESHOLDS['Powerwall-CPU']="122,131,176"
|
||||||
PW_TEMP_THRESHOLDS['Powerwall-CPU-Usage']="40,80,90"
|
PW_THRESHOLDS['Powerwall-CPU-Usage']="40,80,90"
|
||||||
PW_TEMP_THRESHOLDS['OctoPi-CPU']="122,131,176"
|
PW_THRESHOLDS['OctoPi-CPU']="122,131,176"
|
||||||
PW_TEMP_THRESHOLDS['OctoPi-CPU-Usage']="40,80,90"
|
PW_THRESHOLDS['OctoPi-CPU-Usage']="40,80,90"
|
||||||
|
PW_THRESHOLDS['OFF-vMS-Host1-FanSpeed']="6360,11040,16080"
|
||||||
|
|
||||||
PW_ServerRoomTH_Dev='-1'
|
PW_ServerRoomTH_Dev='-1'
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ PWO_START(){
|
|||||||
SENDNOTICE(){
|
SENDNOTICE(){
|
||||||
MESSAGE="${TESTMODE}${2}
|
MESSAGE="${TESTMODE}${2}
|
||||||
|
|
||||||
BATTERY CHARGE: ${OFFSITE_BATT_CAP}'%
|
BATTERY CHARGE: ${OFFSITE_BATT_CAP}'%25
|
||||||
BATT RUNTIME: ${OFFSITE_BATT_RUNTIME}'mins
|
BATT RUNTIME: ${OFFSITE_BATT_RUNTIME}'mins
|
||||||
AC VOLTAGE: ${OFFSITE_VOLTIN}'volts"
|
AC VOLTAGE: ${OFFSITE_VOLTIN}'volts"
|
||||||
if [ "${3}" = "1" ]; then PRIORITY="${3}"; MSGSOUND=siren; elif [ "${3}" != "" ]; then PRIORITY=${3}; else PRIORITY=0; fi
|
if [ "${3}" = "1" ]; then PRIORITY="${3}"; MSGSOUND=siren; elif [ "${3}" != "" ]; then PRIORITY=${3}; else PRIORITY=0; fi
|
||||||
|
|||||||
18
powerwall.sh
18
powerwall.sh
@@ -101,8 +101,8 @@ CHECKTEMP(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
CHECKTEMPSENSOR(){
|
CHECKTEMPSENSOR(){
|
||||||
echo ${PW_TEMP_THRESHOLDS[${1}]} | cut -d',' -f 1 | read temp_warn
|
echo ${PW_THRESHOLDS[${1}]} | cut -d',' -f 1 | read temp_warn
|
||||||
echo ${PW_TEMP_THRESHOLDS[${1}]} | cut -d',' -f 2 | read temp_crit
|
echo ${PW_THRESHOLDS[${1}]} | cut -d',' -f 2 | read temp_crit
|
||||||
[ "${PW_SENSOR_TYPE[${1}]}" == "cpu" ] && GAUGESH="'%" || GAUGESH="'F"
|
[ "${PW_SENSOR_TYPE[${1}]}" == "cpu" ] && GAUGESH="'%" || GAUGESH="'F"
|
||||||
|
|
||||||
if [ "${6}" != "noavg" ]; then
|
if [ "${6}" != "noavg" ]; then
|
||||||
@@ -261,10 +261,10 @@ CHECKTEMP_SERVICE(){
|
|||||||
fi
|
fi
|
||||||
if [ "${SENSORS_CHECK}" != "" ]; then
|
if [ "${SENSORS_CHECK}" != "" ]; then
|
||||||
for SENSOR in "${SENSORS_CHECK[@]}"; do
|
for SENSOR in "${SENSORS_CHECK[@]}"; do
|
||||||
if [ "${PW_TEMP_THRESHOLDS[${SENSORa}]}" != "" ]; then
|
if [ "${PW_THRESHOLDS[${SENSORa}]}" != "" ]; then
|
||||||
echo ${PW_TEMP_THRESHOLDS[${SENSORa}]} | cut -d',' -f 1 | read temp_warn
|
echo ${PW_THRESHOLDS[${SENSORa}]} | cut -d',' -f 1 | read temp_warn
|
||||||
echo ${PW_TEMP_THRESHOLDS[${SENSORa}]} | cut -d',' -f 2 | read temp_crit
|
echo ${PW_THRESHOLDS[${SENSORa}]} | cut -d',' -f 2 | read temp_crit
|
||||||
[ "$(echo ${PW_TEMP_THRESHOLDS[${SENSORa}]} | cut -d',' -f 3)" != "" ] && echo ${PW_TEMP_THRESHOLDS[${SENSORa}]} | cut -d',' -f 3 | read temp_crit_sys || temp_crit_sys=${temp_crit}
|
[ "$(echo ${PW_THRESHOLDS[${SENSORa}]} | cut -d',' -f 3)" != "" ] && echo ${PW_THRESHOLDS[${SENSORa}]} | cut -d',' -f 3 | read temp_crit_sys || temp_crit_sys=${temp_crit}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "mqtt" ]; then
|
if [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "mqtt" ]; then
|
||||||
@@ -323,9 +323,9 @@ CHECKTEMP_SERVICE(){
|
|||||||
# echo "HERE: ${SENSOR} - ${temp_c} - ${temp_f} - ${temp_warn} - ${temp_crit} - ${temp_crit_sys}"
|
# echo "HERE: ${SENSOR} - ${temp_c} - ${temp_f} - ${temp_warn} - ${temp_crit} - ${temp_crit_sys}"
|
||||||
|
|
||||||
if [ "${PW_SENSOR_TYPE[${SENSORa}]}" != "esxi" ]; then
|
if [ "${PW_SENSOR_TYPE[${SENSORa}]}" != "esxi" ]; then
|
||||||
echo ${PW_TEMP_THRESHOLDS[${SENSOR}]} | cut -d',' -f 1 | read temp_warn
|
echo ${PW_THRESHOLDS[${SENSOR}]} | cut -d',' -f 1 | read temp_warn
|
||||||
echo ${PW_TEMP_THRESHOLDS[${SENSOR}]} | cut -d',' -f 2 | read temp_crit
|
echo ${PW_THRESHOLDS[${SENSOR}]} | cut -d',' -f 2 | read temp_crit
|
||||||
echo ${PW_TEMP_THRESHOLDS[${SENSOR}]} | cut -d',' -f 3 | read temp_crit_sys
|
echo ${PW_THRESHOLDS[${SENSOR}]} | cut -d',' -f 3 | read temp_crit_sys
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${last_temp[${SENSOR}]}" != "" ]; then
|
if [ "${last_temp[${SENSOR}]}" != "" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user