fix(snmp): Update current handling for Tripplite and Liebert models; add APC current logging
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user