This commit is contained in:
2023-12-17 20:59:07 -06:00
parent 823f0f8fd4
commit 0a5ca7c720
2 changed files with 6 additions and 6 deletions

View File

@@ -471,7 +471,7 @@ Shutting down main servers" 1
fi
if [ -f ${PW_TMPFOLDER}/power.ac.low ] || [ -f ${PW_TMPFOLDER}/power.dc.low ]; then
volt_diff=`echo "scale=1; ${last_battvolt}-${BATTVOLT}" | bc`
(( $(bc <<<"${volt_diff} < 0") )) && volt_diff=`echo "scale=1; ${volt_diff} * -1" | bc`
(( $(bc <<<"${volt_diff} < 0") )) && volt_diff=`echo "scale=2; ${volt_diff} * -1" | bc`
if (( $(bc <<<"${volt_diff} > 0.5") )); then
SENDNOTICE "BATTERY VOLTAGE CHANGE" "Battery Voltage: ${BATTVOLT}'volts"
echo -e "($(date +'%Y-%m-%d %H:%M:%S')) - ${BATTVOLT}'volts - Battery Voltage Change" >> ${PW_LOGPOWER}

View File

@@ -107,9 +107,9 @@ CHECKTEMPSENSOR(){
echo ${mqtt_message} | cut -d':' -f 6 | cut -d',' -f 1 | read temp_c
elif [ "${PW_SENSOR_TYPE[${1}]}" == "lacrosse" ]; then
INFO=$(curl -s --get -d "deviceid=${PW_LACROSSE_ID[${1}]}" -d "limit=1" -d "metric=1" -d "timezone=2" https://decent-destiny-704.appspot.com/laxservices/device_info.php | jq)
temp_c=$(echo ${INFO} | jq -r '.device0 .obs[].ambient_temp')
temp_probe_c=$(echo ${INFO} | jq -r '.device0 .obs[].probe_temp')
INFO=$(curl -s --get -d "deviceid=${PW_LACROSSE_ID[${SENSOR}]}" -d "limit=1" -d "metric=1" -d "timezone=2" https://decent-destiny-704.appspot.com/laxservices/device_info.php | jq)
temp_probe_c=`IDS_NUMBER_FORMAT $(echo ${INFO} | jq -r '.device0 .obs[].ambient_temp') 2 yes`
temp_c=`IDS_NUMBER_FORMAT $(echo ${INFO} | jq -r '.device0 .obs[].probe_temp') 2 yes`
elif [ "${PW_SENSOR_TYPE[${1}]}" == "system" ]; then
temp_c=$(vcgencmd measure_temp)
@@ -287,8 +287,8 @@ CHECKTEMP_SERVICE(){
elif [ "${PW_SENSOR_TYPE[${SENSOR}]}" == "lacrosse" ]; then
INFO=$(curl -s --get -d "deviceid=${PW_LACROSSE_ID[${SENSOR}]}" -d "limit=1" -d "metric=1" -d "timezone=2" https://decent-destiny-704.appspot.com/laxservices/device_info.php | jq)
temp_probe_c=$(echo ${INFO} | jq -r '.device0 .obs[].ambient_temp')
temp_c=$(echo ${INFO} | jq -r '.device0 .obs[].probe_temp')
temp_probe_c=`IDS_NUMBER_FORMAT $(echo ${INFO} | jq -r '.device0 .obs[].ambient_temp') 2 yes`
temp_c=`IDS_NUMBER_FORMAT $(echo ${INFO} | jq -r '.device0 .obs[].probe_temp') 2 yes`
temp_h=$(echo ${INFO} | jq -r '.device0 .obs[].humidity')
elif [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "system" ]; then