chip-battery/chipmonk.cfg

24 lines
797 B
INI

# chipmonk.cfg
# Configuration for /usr/local/bin/chipmonk.sh which is normally
# installed as a service started at bootup.
SENSOR_READ_FREQUENCY=5 # Period for polling sensors in seconds
BATTERY_SHUT_VALUE=7 # When battery percentage is below this, shut down.
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_WARN_VALUE=650 # Warning temperature in tenths of a degree C.
GOTIFY_TOKEN="AXNh7yz0zMOfqSO"
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}"
}