Check firmware version of poweralert units before applying divisor for current sensor

This commit is contained in:
laf
2016-07-09 22:33:42 +01:00
parent 8ffc889492
commit 4b282018b2

View File

@@ -2,8 +2,11 @@
$divisor = 10;
if ($device['os'] == 'poweralert') {
$serial = trim(snmp_get($device, '.1.3.6.1.4.1.850.100.1.1.4.0', '-Ovq', 'TRIPPLITE-MIB'), '"');
if (version_compare($serial, '12.04.0055', '>=')) {
$divisor = 1;
}
}
// RFC1628 UPS
if (isset($config['modules_compat']['rfc1628'][$device['os']]) && $config['modules_compat']['rfc1628'][$device['os']]) {