add some echos for testing

master
Bryan 2021-01-02 14:33:28 -06:00
parent 4d2d5620d1
commit 5dd7a4b463
2 changed files with 18 additions and 8 deletions

View File

@ -1,14 +1,23 @@
# chipmonk.cfg # chipmonk.cfg
# Configuration for /usr/local/bin/chipmonk.sh which is normally # Configuration for /usr/local/bin/chipmonk.sh which is normally
# installed as a service started at bootup. # installed as a service started at bootup.
# See https://github.com/ondsinet/chipmonk
SENSOR_READ_FREQUENCY=5 # Period for polling sensors in seconds SENSOR_READ_FREQUENCY=5 # Period for polling sensors in seconds
#BATTERY_SHUT_VALUE=7 # When battery percentage is below this, shut down. BATTERY_SHUT_VALUE=7 # When battery percentage is below this, shut down.
BATTERY_WARN_VALUE=20 # When battery percentage is below this, assert warning. BATTERY_WARN_VALUE=20 # When battery percentage is below this, assert warning.
#TEMPERATURE_SHUT_VALUE=800 # Shutdown temperature in tenths of a degree C. TEMPERATURE_SHUT_VALUE=800 # Shutdown temperature in tenths of a degree C.
TEMPERATURE_WARN_VALUE=650 # Warning temperature in tenths of a degree C. TEMPERATURE_WARN_VALUE=650 # Warning temperature in tenths of a degree C.
#TEMPERATURE_WARN_GPIO=XIO_P6 # When temperature warning, activate this GPIO. GOTIFY_TOKEN="AXNh7yz0zMOfqSO"
#TEMPERATURE_WARN_GPIO_VALUE=0 # Warning value to write to WARN_TEMPERATURE_GPIO.
gotify_alert() {
# takes: <title> <message> [<priority>]
if [ -z $3 ]; then
priority=$3
else
priority="4"
fi
curl -X POST "https://ths.tnet.space/gotify/message?token=${GOTIFY_TOKEN}" -F "title=${1}" -F "message=${2}" -F "priority=${priority}"
}

View File

@ -274,9 +274,10 @@ compile_warnings(){
WARN_BATT=0 WARN_BATT=0
echo "ok batt" echo "ok batt"
fi fi
# echo $BATTERY_WARN_VALUE
# echo $BATTERY_VALUE echo "temp: $TEMPERATURE_VALUE"
# echo $WARN_BATT echo "power source: $POWER_SOURCE"
echo "battery value: $BATTERY_VALUE"
#power disconnected #power disconnected