Update temp.inc.sh
This commit is contained in:
@@ -107,7 +107,7 @@ CHECKTEMPSENSOR(){
|
|||||||
echo ${mqtt_message} | cut -d':' -f 6 | cut -d',' -f 1 | read temp_c
|
echo ${mqtt_message} | cut -d':' -f 6 | cut -d',' -f 1 | read temp_c
|
||||||
|
|
||||||
elif [ "${PW_SENSOR_TYPE[${1}]}" == "lacrosse" ]; then
|
elif [ "${PW_SENSOR_TYPE[${1}]}" == "lacrosse" ]; then
|
||||||
temp_c=$(GET_LACROSSE_INFO "${1}")
|
temp_c=$(GET_LACROSSE_INFO "${1}" "probe_temp")
|
||||||
|
|
||||||
elif [ "${PW_SENSOR_TYPE[${1}]}" == "system" ]; then
|
elif [ "${PW_SENSOR_TYPE[${1}]}" == "system" ]; then
|
||||||
temp_c=$(vcgencmd measure_temp)
|
temp_c=$(vcgencmd measure_temp)
|
||||||
@@ -249,7 +249,10 @@ CHECKTEMP_SERVICE(){
|
|||||||
mqtt_message=`${mqtt_conn} -t tele/${SENSOR}/SENSOR -C 1`
|
mqtt_message=`${mqtt_conn} -t tele/${SENSOR}/SENSOR -C 1`
|
||||||
echo ${mqtt_message} | cut -d':' -f 7 | cut -d',' -f 1 | read temp_h
|
echo ${mqtt_message} | cut -d':' -f 7 | cut -d',' -f 1 | read temp_h
|
||||||
echo ${mqtt_message} | cut -d':' -f 6 | cut -d',' -f 1 | read temp_c
|
echo ${mqtt_message} | cut -d':' -f 6 | cut -d',' -f 1 | read temp_c
|
||||||
|
|
||||||
|
elif [ "${PW_SENSOR_TYPE[${1}]}" == "lacrosse" ]; then
|
||||||
|
temp_c=$(GET_LACROSSE_INFO "${1}" "probe_temp")
|
||||||
|
|
||||||
elif [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "system" ]; then
|
elif [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "system" ]; then
|
||||||
temp_c=$(vcgencmd measure_temp)
|
temp_c=$(vcgencmd measure_temp)
|
||||||
temp_c=${temp_c%\'*}; temp_c=${temp_c#*=}
|
temp_c=${temp_c%\'*}; temp_c=${temp_c#*=}
|
||||||
@@ -534,7 +537,7 @@ GET_LACROSSE_INFO(){
|
|||||||
# echo "'${key}' => '${val}'"
|
# echo "'${key}' => '${val}'"
|
||||||
done
|
done
|
||||||
|
|
||||||
echo ${DEVICE_INFO['probe_temp']}
|
echo ${DEVICE_INFO[${2}]}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user