Update temp.inc.sh
This commit is contained in:
@@ -644,6 +644,7 @@ SENDTEMP(){
|
|||||||
if [ "${PW_SENSOR_TYPE[${SENSORa}]}" != "esxi" ] && ([ "${PW_SENSOR_TYPE[${SENSORa}]}" == "lacrosse" ] || ([ "${PW_REMOTE_SENSORS[${SENSORa}]}" != "" ] && [ "$(CHECK_HOST ${PW_REMOTE_SENSORS[${SENSORa}]})" != "false" ])); then
|
if [ "${PW_SENSOR_TYPE[${SENSORa}]}" != "esxi" ] && ([ "${PW_SENSOR_TYPE[${SENSORa}]}" == "lacrosse" ] || ([ "${PW_REMOTE_SENSORS[${SENSORa}]}" != "" ] && [ "$(CHECK_HOST ${PW_REMOTE_SENSORS[${SENSORa}]})" != "false" ])); then
|
||||||
SENSORS_CHECK=(${SENSORa})
|
SENSORS_CHECK=(${SENSORa})
|
||||||
for SENSOR in "${SENSORS_CHECK[@]}"; do
|
for SENSOR in "${SENSORS_CHECK[@]}"; do
|
||||||
|
echo "Checking: ${SENSOR}"
|
||||||
if [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "cpu" ]; then
|
if [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "cpu" ]; then
|
||||||
GAUGESH="'%25"
|
GAUGESH="'%25"
|
||||||
elif [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "system" ] && [[ "${SENSOR}" = *"FAN"* ]]; then
|
elif [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "system" ] && [[ "${SENSOR}" = *"FAN"* ]]; then
|
||||||
@@ -653,8 +654,10 @@ SENDTEMP(){
|
|||||||
fi
|
fi
|
||||||
[ "${last_sensor}" != "" ] && [ "${last_sensor}" != "${SENSOR%%-*}" ] && echo
|
[ "${last_sensor}" != "" ] && [ "${last_sensor}" != "${SENSOR%%-*}" ] && echo
|
||||||
if [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "mqtt" ]; then
|
if [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "mqtt" ]; then
|
||||||
|
echo -en "testing mqtt"
|
||||||
mqtt_message=`${mqtt_conn} -t tele/${SENSORa}/SENSOR -C 1`
|
mqtt_message=`${mqtt_conn} -t tele/${SENSORa}/SENSOR -C 1`
|
||||||
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
|
||||||
|
echo "done"
|
||||||
|
|
||||||
elif [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "lacrosse" ]; then
|
elif [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "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)
|
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)
|
||||||
|
|||||||
Reference in New Issue
Block a user