update
This commit is contained in:
@@ -78,7 +78,7 @@ SENDNOTICE(){
|
|||||||
if [ "${PUSHOVER_APP_TOKEN}" != "" ]; then
|
if [ "${PUSHOVER_APP_TOKEN}" != "" ]; then
|
||||||
SN_TIT="$(echo -e "${1}" | sed "s/\%/\%25 /g")"
|
SN_TIT="$(echo -e "${1}" | sed "s/\%/\%25 /g")"
|
||||||
SN_MSG="$(echo -e "${2}" | sed "s/\%/\%25 /g")"
|
SN_MSG="$(echo -e "${2}" | sed "s/\%/\%25 /g")"
|
||||||
echo -e "SENDING:\n${SN_MSG}\n"
|
echo -e "SENT:\n${SN_MSG}\n"
|
||||||
if [ "${TEST_INPUTACV}" != "" ] || [ "${TEST_BATTVOLT}" != "" ]; then
|
if [ "${TEST_INPUTACV}" != "" ] || [ "${TEST_BATTVOLT}" != "" ]; then
|
||||||
PUSH_TO_MOBILE "***TEST MODE***
|
PUSH_TO_MOBILE "***TEST MODE***
|
||||||
|
|
||||||
|
|||||||
@@ -613,10 +613,8 @@ OFFSITE_CHECKPOWER_SERVICE(){
|
|||||||
if [ -d /sys/bus/w1/devices/${PW_SENSOR_DEVICEID['Offsite-ServerRoom']} ]; then
|
if [ -d /sys/bus/w1/devices/${PW_SENSOR_DEVICEID['Offsite-ServerRoom']} ]; then
|
||||||
temp_c=$(cat /sys/bus/w1/devices/${PW_SENSOR_DEVICEID['Offsite-ServerRoom']}/w1_slave | tail -n1 | cut -d "=" -f2)
|
temp_c=$(cat /sys/bus/w1/devices/${PW_SENSOR_DEVICEID['Offsite-ServerRoom']}/w1_slave | tail -n1 | cut -d "=" -f2)
|
||||||
OFFSITE_TEMP=$(echo "scale=2; ${temp_c}/1000" | bc)
|
OFFSITE_TEMP=$(echo "scale=2; ${temp_c}/1000" | bc)
|
||||||
echo "FOUND: ${temp_c} - ${OFFSITE_TEMP}"
|
|
||||||
else
|
else
|
||||||
OFFSITE_TEMP=ERR
|
OFFSITE_TEMP=ERR
|
||||||
echo "NOT FOUND: ${temp_c} - ${OFFSITE_TEMP}"
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -632,7 +630,7 @@ AMBIENT TEMP: ${OFFSITE_TEMP}'F"
|
|||||||
# 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
|
||||||
# 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
|
# 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
|
||||||
[ "${3}" != "" ] && PRIORITY=${3} || PRIORITY=0
|
[ "${3}" != "" ] && PRIORITY=${3} || PRIORITY=0
|
||||||
|
echo -e "SENDING:\n${MESSAGE}\n"
|
||||||
SENDNOTICE ${1} ${MESSAGE} ${PRIORITY} cosmic
|
SENDNOTICE ${1} ${MESSAGE} ${PRIORITY} cosmic
|
||||||
}
|
}
|
||||||
if [ "${startup}" = "true" ]; then
|
if [ "${startup}" = "true" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user