diff --git a/defaults.inc b/defaults.inc index 8da7bfba..454de586 100755 --- a/defaults.inc +++ b/defaults.inc @@ -1,6 +1,6 @@ #!/usr/bin/env bash -VERS='2.5.283-02072024' +VERS='2.5.284-02072024' noheader=' update service dailytemp confsync -r -report ' diff --git a/inc/power.inc.sh b/inc/power.inc.sh index fd413d7c..58033f29 100644 --- a/inc/power.inc.sh +++ b/inc/power.inc.sh @@ -627,17 +627,16 @@ BATTERY CHARGE: ${OFFSITE_BATT_CAP}'% BATT RUNTIME: ${OFFSITE_BATT_RUNTIME}'mins AC VOLTAGE: ${OFFSITE_VOLTIN}'volts WATT USAGE: ${OFFSITE_WATTS}'watts -AMBIENT TEMP: ${OFFSITE_TEMP}'F - -$(date)" - MESSAGE="$(echo -e "${MESSAGE}" | sed "s/\%/\%25 /g")" - if [ "${3}" = "1" ]; then PRIORITY="${3}"; MSGSOUND=siren; elif [ "${3}" != "" ]; then PRIORITY=${3}; else PRIORITY=0; fi - curl -m 3 -sd "token=${PW_PUSHOVER_APP_TOKEN}&user=${PW_PUSHOVER_USER_TOKEN}&message=$(echo "${MESSAGE}" | sed -e "s/%/%25/g")&title=${1}&priority=${PRIORITY}&sound=cosmic" https://api.pushover.net/1/messages.json >/dev/null 2>&1 +AMBIENT TEMP: ${OFFSITE_TEMP}'F" + # MESSAGE="$(echo -e "${MESSAGE}" | sed "s/\%/\%25 /g")" + # if [ "${3}" = "1" ]; then PRIORITY="${3}"; MSGSOUND=siren; elif [ "${3}" != "" ]; then PRIORITY=${3}; else PRIORITY=0; fi + # curl -m 3 -sd "token=${PW_PUSHOVER_APP_TOKEN}&user=${PW_PUSHOVER_USER_TOKEN}&message=$(echo "${MESSAGE}" | sed -e "s/%/%25/g")&title=${1}&priority=${PRIORITY}&sound=cosmic" https://api.pushover.net/1/messages.json >/dev/null 2>&1 + SENDNOTICE "${1}" "${MESSAGE}" } if [ "${startup}" = "true" ]; then echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${OFFSITE_VOLTIN}'volts - ${OFFSITE_WATTS}'watts - ${OFFSITE_BATT_CAP}'% Battery - ${OFFSITE_BATT_RUNTIME}'mins - Service startup" >> ${PW_LOGPOWER} echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${OFFSITE_VOLTIN}'volts - ${OFFSITE_BATT_CAP}'% Battery - Service startup" >> ${PW_LOGFILE} - # SENDNOTICE2 "OFFSITE POWER SERVICE STARTUP" "Service starting" + SENDNOTICE2 "OFFSITE POWER SERVICE STARTUP" "Service starting" OFFSITE_SENDPOWER "OFFSITE POWER Service Startup" & startup=false fi @@ -1014,7 +1013,7 @@ SENDPOWER(){ OFFSITE_SENDPOWER(){ st_power=`${PW_SCRIPT} check power -o -p -r` - SENDNOTICE2 "${1}" "${st_power}" + SENDNOTICE "${1}" "${st_power}" }