This commit is contained in:
2025-08-12 21:13:54 -05:00
parent 8c4196b4b0
commit fe8b483c77
2 changed files with 2 additions and 4 deletions

View File

@@ -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}')"