This commit is contained in:
2024-05-02 21:48:29 -05:00
parent b89d4c136a
commit f9f0a4cad6
4 changed files with 7 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
VERS='2.7.25-05012024'
VERS='2.7.26-05022024'
noheader=' update service dailytemp confsync -r -report '

View File

@@ -167,7 +167,7 @@ CHECKPOWER(){
SVRRM_AMP=$(snmpwalk -t 1 -r 0 -v 1 -c public ${PW_UPS_IP} iso.3.6.1.4.1.850.1.1.3.1.3.3.2.1.3.1.1 | sed 's/.*: //')
SVRRM_AMP=`echo "scale=2; ${SVRRM_AMP}/100" | bc`
AIRCON_INFO=$(curl -m 3 -s http://${PW_TUYA_API}/status/${PW_SENSOR_DEVICEID['ServerRoom-AC']} | jq '.dps')
AIRCON_INFO=$(curl -m 3 -s http://${PW_REMOTE_SENSOR}:8888/status/${PW_SENSOR_DEVICEID['ServerRoom-AC']} | jq '.dps')
AIRCON_AMP=$(echo "${AIRCON_INFO}" | grep '"18":' | cut -d' ' -f 4 | sed 's/,//g')
AIRCON_AMP=$(ROUND_NUMBER $(echo "scale=3; ${AIRCON_AMP}/1000" | bc -l) 2)
AIRCON_WATT=$(echo "${AIRCON_INFO}" | grep '"19":' | cut -d' ' -f 4 | sed 's/,//g')
@@ -835,7 +835,7 @@ POWERLOGGER_SERVICE(){
${mysql_conn} -e "USE servermonitor; ${QRY}"
fi
AIRCON_INFO=$(curl -m 3 -s http://${PW_TUYA_API}/status/${PW_SENSOR_DEVICEID['ServerRoom-AC']} | jq '.dps')
AIRCON_INFO=$(curl -m 3 -s http://${PW_REMOTE_SENSOR}:8888/status/${PW_SENSOR_DEVICEID['ServerRoom-AC']} | jq '.dps')
if [ "${AIRCON_INFO}" != "" ]; then
AIRCON_AMP=$(echo "${AIRCON_INFO}" | grep '"18":' | cut -d' ' -f 4 | sed 's/,//g')
AIRCON_AMP=$(ROUND_NUMBER $(echo "scale=3; ${AIRCON_AMP}/1000" | bc -l) 2)

View File

@@ -139,7 +139,7 @@ CHECKPOWER(){
SVRRM_AMP=$(snmpwalk -t 1 -r 0 -v 1 -c public ${PW_UPS_IP} iso.3.6.1.4.1.850.1.1.3.1.3.3.2.1.3.1.1 | sed 's/.*: //')
SVRRM_AMP=`echo "scale=2; ${SVRRM_AMP}/100" | bc`
AIRCON_INFO=$(curl -m 3 -s http://${PW_TUYA_API}/status/${PW_SENSOR_DEVICEID['ServerRoom-AC']} | jq '.dps')
AIRCON_INFO=$(curl -m 3 -s http://${PW_REMOTE_SENSOR}:8888/status/${PW_SENSOR_DEVICEID['ServerRoom-AC']} | jq '.dps')
if [ "${AIRCON_INFO}" != "" ]; then
AIRCON_AMP=$(echo "${AIRCON_INFO}" | grep '"18":' | cut -d' ' -f 4 | sed 's/,//g')
AIRCON_AMP=$(ROUND_NUMBER $(echo "scale=3; ${AIRCON_AMP}/1000" | bc -l) 2)
@@ -950,7 +950,7 @@ POWERLOGGER_SERVICE(){
${mysql_conn} -e "USE servermonitor; ${QRY}"
fi
AIRCON_INFO=$(curl -m 3 -s http://${PW_TUYA_API}/status/${PW_SENSOR_DEVICEID['ServerRoom-AC']} | jq '.dps')
AIRCON_INFO=$(curl -m 3 -s http://${PW_REMOTE_SENSOR}:8888/status/${PW_SENSOR_DEVICEID['ServerRoom-AC']} | jq '.dps')
if [ "${AIRCON_INFO}" != "" ]; then
AIRCON_AMP=$(echo "${AIRCON_INFO}" | grep '"18":' | cut -d' ' -f 4 | sed 's/,//g')
AIRCON_AMP=$(ROUND_NUMBER $(echo "scale=3; ${AIRCON_AMP}/1000" | bc -l) 2)
@@ -1214,7 +1214,7 @@ OFFSITE_SENDPOWER(){
}
GET_TUYA_POWER(){
INFO=$(curl -m 3 -s http://${PW_TUYA_API}/status/${PW_SENSOR_DEVICEID[${1}]} | jq '.dps')
INFO=$(curl -m 3 -s http://${PW_REMOTE_SENSOR}:8888/status/${PW_SENSOR_DEVICEID[${1}]} | jq '.dps')
if [ "${INFO}" != "" ]; then
WATT=-1
if [ "$(echo "${INFO}" | grep '"18":')" != "" ]; then

View File

@@ -1502,7 +1502,7 @@ GET_DEFAULT_FANSPEED(){
}
GET_TUYA_TEMP(){
INFO=$(curl -m 3 -s http://${PW_TUYA_API}/status/${PW_SENSOR_DEVICEID[${1}]} | jq '.dps')
INFO=$(curl -m 3 -s http://${PW_REMOTE_SENSOR}:8888/status/${PW_SENSOR_DEVICEID[${1}]} | jq '.dps')
if [ "${INFO}" != "" ]; then
TEMP=-1
if [ "$(echo "${INFO}" | grep '"108":')" != "" ]; then