fix(snmp): Update current handling for Tripplite and Liebert models; add APC current logging

This commit is contained in:
2025-10-23 12:45:29 +00:00
parent fbe1cd64cb
commit b7a0bbcf6d
2 changed files with 13 additions and 8 deletions

View File

@@ -707,7 +707,7 @@ export class NupstSnmp {
);
}
return amps;
} else if ((upsModel === 'eaton' || upsModel === 'tripplite' || upsModel === 'liebert') && outputCurrent > 0) {
} else if ((upsModel === 'tripplite' || upsModel === 'liebert') && outputCurrent > 0) {
// RFC 1628 standard: Current is in 0.1A, convert to amps
const amps = outputCurrent / 10;
if (this.debug) {
@@ -718,6 +718,11 @@ export class NupstSnmp {
return amps;
}
// Eaton XUPS-MIB and APC PowerNet report current directly in RMS Amps (no scaling needed)
if ((upsModel === 'eaton' || upsModel === 'apc') && this.debug && outputCurrent > 0) {
console.log(`${upsModel.toUpperCase()} current already in RMS Amps: ${outputCurrent}A`);
}
return outputCurrent;
}
}