update
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
VERS='2.5.262-02062024'
|
||||
VERS='2.5.263-02062024'
|
||||
|
||||
noheader=' update service dailytemp confsync -r -report '
|
||||
|
||||
@@ -62,7 +62,6 @@ if [ -f ${PW_FOLDER}/settings.local.conf ]; then
|
||||
declare -A PW_INVERTER_STATES
|
||||
declare -A PW_INVERTER_MODES
|
||||
declare -A PW_INVERTER_ERRORS
|
||||
declare -A PW_LACROSSE_ID
|
||||
declare -A PW_SENSOR_DEVICEID
|
||||
|
||||
source ${PW_FOLDER}/settings.local.conf
|
||||
|
||||
@@ -240,7 +240,7 @@ CHECKTEMPSENSOR(){
|
||||
echo ${mqtt_message} | cut -d':' -f 6 | cut -d',' -f 1 | read temp_c
|
||||
|
||||
elif [ "${PW_SENSOR_TYPE[${1}]}" == "lacrosse" ]; then
|
||||
if ! INFO=$(curl -m 7 -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) ; then TIMEOUT=1; fi
|
||||
if ! INFO=$(curl -m 7 -s --get -d "deviceid=${PW_SENSOR_DEVICEID[${SENSOR}]}" -d "limit=1" -d "metric=1" -d "timezone=2" https://decent-destiny-704.appspot.com/laxservices/device_info.php) ; then TIMEOUT=1; fi
|
||||
if [ "${INFO}" != "" ]; then
|
||||
if [[ "${1}" = *"-Probe" ]]; then
|
||||
temp_c=`IDS_NUMBER_FORMAT $(echo ${INFO} | jq -r '.device0 .obs[].probe_temp') 2 yes`
|
||||
@@ -528,7 +528,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
|
||||
echo ${mqtt_message} | cut -d':' -f 6 | cut -d',' -f 1 | read temp_c
|
||||
|
||||
elif [ "${PW_SENSOR_TYPE[${SENSOR}]}" == "lacrosse" ]; then
|
||||
INFO=$(curl -m 5 -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 -m 5 -s --get -d "deviceid=${PW_SENSOR_DEVICEID[${SENSOR}]}" -d "limit=1" -d "metric=1" -d "timezone=2" https://decent-destiny-704.appspot.com/laxservices/device_info.php | jq)
|
||||
if [[ "${SENSOR}" = *"-Probe" ]]; then
|
||||
temp_c=`IDS_NUMBER_FORMAT $(echo ${INFO} | jq -r '.device0 .obs[].probe_temp') 2 yes`
|
||||
else
|
||||
@@ -988,7 +988,7 @@ SENDTEMP(){
|
||||
echo ${mqtt_message} | cut -d':' -f 6 | cut -d',' -f 1 | read temp_c
|
||||
|
||||
elif [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "lacrosse" ]; then
|
||||
INFO=$(curl -m 5 -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 -m 5 -s --get -d "deviceid=${PW_SENSOR_DEVICEID[${SENSOR}]}" -d "limit=1" -d "metric=1" -d "timezone=2" https://decent-destiny-704.appspot.com/laxservices/device_info.php | jq)
|
||||
if [[ "${SENSORa}" = *"-Probe" ]]; then
|
||||
temp_c=`IDS_NUMBER_FORMAT $(echo ${INFO} | jq -r '.device0 .obs[].probe_temp') 2 yes`
|
||||
else
|
||||
@@ -1077,7 +1077,7 @@ SENDTEMP(){
|
||||
}
|
||||
|
||||
GET_LACROSSE_INFO(){
|
||||
INFO=$(/bin/python3 ${PW_INCFOLDER}/getInfo.lacrosse.py "${PW_LACROSSE_ID[${1}]}" | sed -e "s/\[{'//g" | sed -e "s/}\]//g" | sed -e "s/', '/~/g" | sed -e "s/': '/:/g" | sed -e "s/': /:/g")
|
||||
INFO=$(/bin/python3 ${PW_INCFOLDER}/getInfo.lacrosse.py "${PW_SENSOR_DEVICEID[${1}]}" | sed -e "s/\[{'//g" | sed -e "s/}\]//g" | sed -e "s/', '/~/g" | sed -e "s/': '/:/g" | sed -e "s/': /:/g")
|
||||
IFS=$'~'; read -rd '' -a INFO <<<"${INFO}"; unset IFS; declare -A DEVICE_INFO
|
||||
for DINFOtmp in "${INFO[@]}"; do key=${DINFOtmp%%:*}; val=${DINFOtmp##*:}; val=${val//[$'\t\r\n ']}; DEVICE_INFO[${key}]=${val}; done
|
||||
echo ${DEVICE_INFO['probe_temp']}
|
||||
|
||||
Reference in New Issue
Block a user