Update temp.inc.sh
This commit is contained in:
@@ -756,7 +756,7 @@ CHECKTEMPSENSOR(){
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
elif [ "${PW_SENSOR_TYPE[${1}]}" == "ds18b20" ]; then
|
elif [ "${PW_SENSOR_TYPE[${1}]}" == "ds18b20" ]; then
|
||||||
if ! temp_c=$(${SSHCMD} root@${PW_REMOTE_SENSORS[${1}]} cat /sys/bus/w1/devices/${PW_SENSOR_DEVICEID[${1}]}/w1_slave | tail -n1 | cut -d "=" -f2) ; then TIMEOUT=1; fi
|
if ! temp_c=$(${SSHCMD} root@${PW_REMOTE_SENSORS[${1}]} cat /sys/devices/w1_bus_master1/${PW_SENSOR_DEVICEID[${1}]}/w1_slave | tail -n1 | cut -d "=" -f2) ; then TIMEOUT=1; fi
|
||||||
[ "${temp_c}" != "" ] && temp_c=$(echo "scale=2; ${temp_c}/1000" | bc)
|
[ "${temp_c}" != "" ] && temp_c=$(echo "scale=2; ${temp_c}/1000" | bc)
|
||||||
|
|
||||||
fi
|
fi
|
||||||
@@ -1040,7 +1040,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
|
|||||||
temp_h=''
|
temp_h=''
|
||||||
|
|
||||||
elif [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "ds18b20" ]; then
|
elif [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "ds18b20" ]; then
|
||||||
if ! temp_c=$(${SSHCMD} root@${PW_REMOTE_SENSORS[${SENSORa}]} cat /sys/bus/w1/devices/${PW_SENSOR_DEVICEID[${SENSORa}]}/w1_slave | tail -n1 | cut -d "=" -f2) ; then TIMEOUT=1; fi
|
if ! temp_c=$(${SSHCMD} root@${PW_REMOTE_SENSORS[${SENSORa}]} cat /sys/devices/w1_bus_master1/${PW_SENSOR_DEVICEID[${SENSORa}]}/w1_slave | tail -n1 | cut -d "=" -f2) ; then TIMEOUT=1; fi
|
||||||
[ "${temp_c}" != "" ] && temp_c=$(echo "scale=2; ${temp_c}/1000" | bc)
|
[ "${temp_c}" != "" ] && temp_c=$(echo "scale=2; ${temp_c}/1000" | bc)
|
||||||
temp_h=''
|
temp_h=''
|
||||||
|
|
||||||
@@ -1677,7 +1677,7 @@ SENDTEMP(){
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
elif [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "ds18b20" ]; then
|
elif [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "ds18b20" ]; then
|
||||||
if ! temp_c=$(${SSHCMD} root@${PW_REMOTE_SENSORS[${SENSORa}]} cat /sys/bus/w1/devices/${PW_SENSOR_DEVICEID[${SENSORa}]}/w1_slave | tail -n1 | cut -d "=" -f2) ; then TIMEOUT=1; fi
|
if ! temp_c=$(${SSHCMD} root@${PW_REMOTE_SENSORS[${SENSORa}]} cat /sys/devices/w1_bus_master1/${PW_SENSOR_DEVICEID[${SENSORa}]}/w1_slave | tail -n1 | cut -d "=" -f2) ; then TIMEOUT=1; fi
|
||||||
[ "${temp_c}" != "" ] && temp_c=$(echo "scale=2; ${temp_c}/1000" | bc)
|
[ "${temp_c}" != "" ] && temp_c=$(echo "scale=2; ${temp_c}/1000" | bc)
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user