diff --git a/defaults.inc b/defaults.inc index dc3abd63..0758c93a 100755 --- a/defaults.inc +++ b/defaults.inc @@ -1,6 +1,6 @@ #!/usr/bin/env bash -PW_VERS='2.12.10-07272025' +PW_VERS='2.12.12-08122025' noheader=' update service dailytemp confsync -r -report test ' diff --git a/inc/power.inc.sh b/inc/power.inc.sh index 27d027bc..53533d8b 100644 --- a/inc/power.inc.sh +++ b/inc/power.inc.sh @@ -1463,9 +1463,7 @@ POWERLOGGER_SERVICE(){ KYLE_AMP=$(snmpwalk -t 1 -r 0 -v 1 -c public ${PW_KP_UPS_IP} iso.3.6.1.2.1.33.1.4.4.1.3.1 | sed 's/.*: //')\ KYLE_AMP=`echo "scale=2; ${KYLE_AMP}/10" | tr -d $'\r' | bc` KYLE_WATT=`echo "scale=2; ${KYLE_VOLT}*${KYLE_AMP}" | tr -d $'\r' | bc` - - echo "HERE: '${KYLE_VOLT}','${KYLE_AMP}','${KYLE_WATT}'" - + if [ "${KYLE_AMP}" != "" ]; then QRY="INSERT INTO power_data (sensorid, date, volt, amp, watt) VALUES ('${PW_POWERSENSOR_ID['KP-Power']}',CONVERT_TZ('${LogDataTime}', 'America/Chicago', 'UTC'),'${KYLE_VOLT}','${KYLE_AMP}','${KYLE_WATT}')"