Added sensors for outlets on Schleifenbauer devices. (#10949)

* Added sensors for outlets on Schleifenbauer devices. Also use the outlet name when configured.

* Updated tests for Schleifenbauer

* Fixed on test for Schleifenbauer

* Optimized polling by retriving only outlets from the device with the network connection, not all devices on the data-bus.

* Fixed code styling

* Use shorthand comparisons for names

* Fix for conflicting $entPhysicalIndex
This commit is contained in:
Jurrian van Iersel
2020-04-27 00:35:00 +02:00
committed by GitHub
parent 5242c26fb4
commit d61cfb5688
7 changed files with 119 additions and 20 deletions

View File

@@ -4,10 +4,11 @@ $divisor = 100;
foreach ($pre_cache['sdbMgmtCtrlDevUnitAddress'] as $sdbMgmtCtrlDevUnitAddress => $sdbDevIdIndex) { foreach ($pre_cache['sdbMgmtCtrlDevUnitAddress'] as $sdbMgmtCtrlDevUnitAddress => $sdbDevIdIndex) {
foreach ($pre_cache['sdbDevInActualCurrent'][$sdbDevIdIndex] as $sdbDevInIndex => $sdbDevInActualCurrent) { foreach ($pre_cache['sdbDevInActualCurrent'][$sdbDevIdIndex] as $sdbDevInIndex => $sdbDevInActualCurrent) {
$name = trim($pre_cache['sdbDevInName'][$sdbDevIdIndex][$sdbDevInIndex], '"');
$current_oid = ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.5.$sdbDevIdIndex.$sdbDevInIndex"; $current_oid = ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.5.$sdbDevIdIndex.$sdbDevInIndex";
$current = $sdbDevInActualCurrent / $divisor; $current = $sdbDevInActualCurrent / $divisor;
$serial_input = $pre_cache['sdbDevIdSerialNumber'][$sdbDevIdIndex] ."-L". $sdbDevInIndex; $serial_input = $pre_cache['sdbDevIdSerialNumber'][$sdbDevIdIndex] ."-L". $sdbDevInIndex;
$descr = "$serial_input RMS Current"; $descr = $name ?: "$serial_input RMS Current";
$warn_limit = $pre_cache['sdbDevInMaxAmps'][$sdbDevIdIndex][$sdbDevInIndex] / $divisor; $warn_limit = $pre_cache['sdbDevInMaxAmps'][$sdbDevIdIndex][$sdbDevInIndex] / $divisor;
$high_limit = $pre_cache['sdbDevCfMaximumLoad'][$sdbDevIdIndex]; $high_limit = $pre_cache['sdbDevCfMaximumLoad'][$sdbDevIdIndex];
@@ -17,3 +18,19 @@ foreach ($pre_cache['sdbMgmtCtrlDevUnitAddress'] as $sdbMgmtCtrlDevUnitAddress =
discover_sensor($valid['sensor'], 'current', $device, $current_oid, $serial_input, 'schleifenbauer', $descr, $divisor, '1', null, null, $warn_limit, $high_limit, $current, 'snmp', $entPhysicalIndex); discover_sensor($valid['sensor'], 'current', $device, $current_oid, $serial_input, 'schleifenbauer', $descr, $divisor, '1', null, null, $warn_limit, $high_limit, $current, 'snmp', $entPhysicalIndex);
} }
} }
$unit = current($pre_cache['sdbMgmtCtrlDevUnitAddress']);
foreach ($pre_cache['sdbDevOutMtActualCurrent'] as $sdbDevOutMtIndex => $sdbDevOutMtActualCurrent) {
$name = trim($pre_cache['sdbDevOutName'][$sdbDevOutMtIndex], '"');
$current_oid = ".1.3.6.1.4.1.31034.12.1.1.2.7.2.1.5.$unit.$sdbDevOutMtIndex";
$current = $sdbDevOutMtActualCurrent / $divisor;
$serial_output = $pre_cache['sdbDevIdSerialNumber'][$unit] ." Outlet ". $sdbDevOutMtIndex;
$descr = $name ?: "$serial_output RMS Current";
$warn_limit = $pre_cache['sdbDevOutMtMaxAmps'][$sdbDevOutMtIndex] / $divisor;
$high_limit = $pre_cache['sdbDevCfMaximumLoad'][$unit];
// See includes/discovery/entity-physical/schleifenbauer.inc.php for an explanation why we set this as the entPhysicalIndex.
$entPhysicalIndex = $sdbMgmtCtrlDevUnitAddress * 1000000 + 200000 + $sdbDevOutMtIndex * 1000 + 120;
discover_sensor($valid['sensor'], 'current', $device, $current_oid, $serial_output, 'schleifenbauer', $descr, $divisor, '1', null, null, $warn_limit, $high_limit, $current, 'snmp', $entPhysicalIndex);
}

View File

@@ -3,9 +3,10 @@ echo 'Schleifenbauer ';
foreach ($pre_cache['sdbMgmtCtrlDevUnitAddress'] as $sdbMgmtCtrlDevUnitAddress => $sdbDevIdIndex) { foreach ($pre_cache['sdbMgmtCtrlDevUnitAddress'] as $sdbMgmtCtrlDevUnitAddress => $sdbDevIdIndex) {
foreach ($pre_cache['sdbDevInPowerVoltAmpere'][$sdbDevIdIndex] as $sdbDevInIndex => $sdbDevInPowerVoltAmpere) { foreach ($pre_cache['sdbDevInPowerVoltAmpere'][$sdbDevIdIndex] as $sdbDevInIndex => $sdbDevInPowerVoltAmpere) {
$name = trim($pre_cache['sdbDevInName'][$sdbDevIdIndex][$sdbDevInIndex], '"');
$power_oid = ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.9.$sdbDevIdIndex.$sdbDevInIndex"; $power_oid = ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.9.$sdbDevIdIndex.$sdbDevInIndex";
$serial_input = $pre_cache['sdbDevIdSerialNumber'][$sdbDevIdIndex] ."-L". $sdbDevInIndex; $serial_input = $pre_cache['sdbDevIdSerialNumber'][$sdbDevIdIndex] ."-L". $sdbDevInIndex;
$descr = "$serial_input Apparent Power"; $descr = $name ?: "$serial_input Apparent Power";
// See includes/discovery/entity-physical/schleifenbauer.inc.php for an explanation why we set this as the entPhysicalIndex. // See includes/discovery/entity-physical/schleifenbauer.inc.php for an explanation why we set this as the entPhysicalIndex.
$entPhysicalIndex = $sdbMgmtCtrlDevUnitAddress * 1000000 + 100000 + $sdbDevInIndex * 1000 + 130; $entPhysicalIndex = $sdbMgmtCtrlDevUnitAddress * 1000000 + 100000 + $sdbDevInIndex * 1000 + 130;
@@ -13,3 +14,16 @@ foreach ($pre_cache['sdbMgmtCtrlDevUnitAddress'] as $sdbMgmtCtrlDevUnitAddress =
discover_sensor($valid['sensor'], 'power', $device, $power_oid, $serial_input, 'schleifenbauer', $descr, '1', '1', null, null, null, null, $sdbDevInPowerVoltAmpere, 'snmp', $entPhysicalIndex); discover_sensor($valid['sensor'], 'power', $device, $power_oid, $serial_input, 'schleifenbauer', $descr, '1', '1', null, null, null, null, $sdbDevInPowerVoltAmpere, 'snmp', $entPhysicalIndex);
} }
} }
$unit = current($pre_cache['sdbMgmtCtrlDevUnitAddress']);
foreach ($pre_cache['sdbDevOutMtPowerVoltAmpere'] as $sdbDevOutMtIndex => $sdbDevOutMtPowerVoltAmpere) {
$name = trim($pre_cache['sdbDevOutName'][$sdbDevOutMtIndex], '"');
$power_oid = ".1.3.6.1.4.1.31034.12.1.1.2.7.2.1.10.$unit.$sdbDevOutMtIndex";
$serial_input = $pre_cache['sdbDevIdSerialNumber'][$unit] ." Outlet ". $sdbDevOutMtIndex;
$descr = $name ?: "$serial_input Apparent Power";
// See includes/discovery/entity-physical/schleifenbauer.inc.php for an explanation why we set this as the entPhysicalIndex.
$entPhysicalIndex = $sdbMgmtCtrlDevUnitAddress * 1000000 + 200000 + $sdbDevOutMtIndex * 1000 + 130;
discover_sensor($valid['sensor'], 'power', $device, $power_oid, $serial_input, 'schleifenbauer', $descr, '1', '1', null, null, null, null, $sdbDevOutMtPowerVoltAmpere, 'snmp', $entPhysicalIndex);
}

View File

@@ -3,9 +3,10 @@ echo 'Schleifenbauer ';
foreach ($pre_cache['sdbMgmtCtrlDevUnitAddress'] as $sdbMgmtCtrlDevUnitAddress => $sdbDevIdIndex) { foreach ($pre_cache['sdbMgmtCtrlDevUnitAddress'] as $sdbMgmtCtrlDevUnitAddress => $sdbDevIdIndex) {
foreach ($pre_cache['sdbDevInKWhTotal'][$sdbDevIdIndex] as $sdbDevInIndex => $sdbDevInKWhTotal) { foreach ($pre_cache['sdbDevInKWhTotal'][$sdbDevIdIndex] as $sdbDevInIndex => $sdbDevInKWhTotal) {
$name = trim($pre_cache['sdbDevInName'][$sdbDevIdIndex][$sdbDevInIndex], '"');
$power_consumed_oid = ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.2.$sdbDevIdIndex.$sdbDevInIndex"; $power_consumed_oid = ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.2.$sdbDevIdIndex.$sdbDevInIndex";
$serial_input = $pre_cache['sdbDevIdSerialNumber'][$sdbDevIdIndex] ."-L". $sdbDevInIndex; $serial_input = $pre_cache['sdbDevIdSerialNumber'][$sdbDevIdIndex] ."-L". $sdbDevInIndex;
$descr = "$serial_input Lifetime kWh Total"; $descr = $name ?: "$serial_input Lifetime kWh Total";
// See includes/discovery/entity-physical/schleifenbauer.inc.php for an explanation why we set this as the entPhysicalIndex. // See includes/discovery/entity-physical/schleifenbauer.inc.php for an explanation why we set this as the entPhysicalIndex.
$entPhysicalIndex = $sdbMgmtCtrlDevUnitAddress * 1000000 + 100000 + $sdbDevInIndex * 1000 + 140; $entPhysicalIndex = $sdbMgmtCtrlDevUnitAddress * 1000000 + 100000 + $sdbDevInIndex * 1000 + 140;
@@ -13,3 +14,16 @@ foreach ($pre_cache['sdbMgmtCtrlDevUnitAddress'] as $sdbMgmtCtrlDevUnitAddress =
discover_sensor($valid['sensor'], 'power_consumed', $device, $power_consumed_oid, $serial_input, 'schleifenbauer', $descr, '1', '1', '0', null, null, '16777215', $sdbDevInKWhTotal, 'snmp', $entPhysicalIndex); discover_sensor($valid['sensor'], 'power_consumed', $device, $power_consumed_oid, $serial_input, 'schleifenbauer', $descr, '1', '1', '0', null, null, '16777215', $sdbDevInKWhTotal, 'snmp', $entPhysicalIndex);
} }
} }
$unit = current($pre_cache['sdbMgmtCtrlDevUnitAddress']);
foreach ($pre_cache['sdbDevOutMtKWhTotal'] as $sdbDevOutMtIndex => $sdbDevOutMtKWhTotal) {
$name = trim($pre_cache['sdbDevOutName'][$sdbDevOutMtIndex], '"');
$power_consumed_oid = ".1.3.6.1.4.1.31034.12.1.1.2.7.2.1.2.$unit.$sdbDevOutMtIndex";
$serial_input = $pre_cache['sdbDevIdSerialNumber'][$unit] ." Outlet ". $sdbDevOutMtIndex;
$descr = $name ?: "$serial_input Lifetime kWh Total";
// See includes/discovery/entity-physical/schleifenbauer.inc.php for an explanation why we set this as the entPhysicalIndex.
$entPhysicalIndex = $sdbMgmtCtrlDevUnitAddress * 1000000 + 200000 + $sdbDevOutMtIndex * 1000 + 140;
discover_sensor($valid['sensor'], 'power_consumed', $device, $power_consumed_oid, $serial_input, 'schleifenbauer', $descr, '1', '1', '0', null, null, '16777215', $sdbDevOutMtKWhTotal, 'snmp', $entPhysicalIndex);
}

View File

@@ -4,10 +4,11 @@ $divisor = 10000;
foreach ($pre_cache['sdbMgmtCtrlDevUnitAddress'] as $sdbMgmtCtrlDevUnitAddress => $sdbDevIdIndex) { foreach ($pre_cache['sdbMgmtCtrlDevUnitAddress'] as $sdbMgmtCtrlDevUnitAddress => $sdbDevIdIndex) {
foreach ($pre_cache['sdbDevInPowerFactor'][$sdbDevIdIndex] as $sdbDevInIndex => $sdbDevInPowerFactor) { foreach ($pre_cache['sdbDevInPowerFactor'][$sdbDevIdIndex] as $sdbDevInIndex => $sdbDevInPowerFactor) {
$name = trim($pre_cache['sdbDevInName'][$sdbDevIdIndex][$sdbDevInIndex], '"');
$power_factor_oid = ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.4.$sdbDevIdIndex.$sdbDevInIndex"; $power_factor_oid = ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.4.$sdbDevIdIndex.$sdbDevInIndex";
$power_factor = $sdbDevInPowerFactor / $divisor; $power_factor = $sdbDevInPowerFactor / $divisor;
$serial_input = $pre_cache['sdbDevIdSerialNumber'][$sdbDevIdIndex] ."-L". $sdbDevInIndex; $serial_input = $pre_cache['sdbDevIdSerialNumber'][$sdbDevIdIndex] ."-L". $sdbDevInIndex;
$descr = "$serial_input Power Factor"; $descr = $name ?: "$serial_input Power Factor";
// See includes/discovery/entity-physical/schleifenbauer.inc.php for an explanation why we set this as the entPhysicalIndex. // See includes/discovery/entity-physical/schleifenbauer.inc.php for an explanation why we set this as the entPhysicalIndex.
$entPhysicalIndex = $sdbMgmtCtrlDevUnitAddress * 1000000 + 100000 + $sdbDevInIndex * 1000 + 150; $entPhysicalIndex = $sdbMgmtCtrlDevUnitAddress * 1000000 + 100000 + $sdbDevInIndex * 1000 + 150;
@@ -15,3 +16,17 @@ foreach ($pre_cache['sdbMgmtCtrlDevUnitAddress'] as $sdbMgmtCtrlDevUnitAddress =
discover_sensor($valid['sensor'], 'power_factor', $device, $power_factor_oid, $serial_input, 'schleifenbauer', $descr, $divisor, '1', '0', null, null, '1', $power_factor, 'snmp', $entPhysicalIndex); discover_sensor($valid['sensor'], 'power_factor', $device, $power_factor_oid, $serial_input, 'schleifenbauer', $descr, $divisor, '1', '0', null, null, '1', $power_factor, 'snmp', $entPhysicalIndex);
} }
} }
$unit = current($pre_cache['sdbMgmtCtrlDevUnitAddress']);
foreach ($pre_cache['sdbDevOutMtPowerFactor'] as $sdbDevOutMtIndex => $sdbDevOutMtPowerFactor) {
$name = trim($pre_cache['sdbDevOutName'][$sdbDevOutMtIndex], '"');
$power_factor_oid = ".1.3.6.1.4.1.31034.12.1.1.2.7.2.1.4.$unit.$sdbDevOutMtIndex";
$power_factor = $sdbDevOutMtPowerFactor / $divisor;
$serial_input = $pre_cache['sdbDevIdSerialNumber'][$unit] ." Outlet ". $sdbDevOutMtIndex;
$descr = $name ?: "$serial_input Power Factor";
// See includes/discovery/entity-physical/schleifenbauer.inc.php for an explanation why we set this as the entPhysicalIndex.
$entPhysicalIndex = $sdbMgmtCtrlDevUnitAddress * 1000000 + 200000 + $sdbDevOutMtIndex * 1000 + 150;
discover_sensor($valid['sensor'], 'power_factor', $device, $power_factor_oid, $serial_input, 'schleifenbauer', $descr, $divisor, '1', '0', null, null, '1', $power_factor, 'snmp', $entPhysicalIndex);
}

View File

@@ -16,6 +16,9 @@ $pre_cache['sdbMgmtCtrlDevUnitAddress'] = current(snmpwalk_array_num($device, '.
echo 'sdbDevIdSerialNumber '; echo 'sdbDevIdSerialNumber ';
$pre_cache['sdbDevIdSerialNumber'] = current(snmpwalk_array_num($device, '.1.3.6.1.4.1.31034.12.1.1.2.1.1.1.6', 1)); $pre_cache['sdbDevIdSerialNumber'] = current(snmpwalk_array_num($device, '.1.3.6.1.4.1.31034.12.1.1.2.1.1.1.6', 1));
echo 'sdbDevInName ';
$pre_cache['sdbDevInName'] = current(snmpwalk_array_num($device, '.1.3.6.1.4.1.31034.12.1.1.2.6.1.1.13', 2));
echo 'sdbDevInActualVoltage '; echo 'sdbDevInActualVoltage ';
$pre_cache['sdbDevInActualVoltage'] = current(snmpwalk_array_num($device, '.1.3.6.1.4.1.31034.12.1.1.2.6.1.1.7', 2)); $pre_cache['sdbDevInActualVoltage'] = current(snmpwalk_array_num($device, '.1.3.6.1.4.1.31034.12.1.1.2.6.1.1.7', 2));
@@ -36,3 +39,24 @@ $pre_cache['sdbDevInKWhTotal'] = current(snmpwalk_array_num($device, '.
echo 'sdbDevInPowerFactor '; echo 'sdbDevInPowerFactor ';
$pre_cache['sdbDevInPowerFactor'] = current(snmpwalk_array_num($device, '.1.3.6.1.4.1.31034.12.1.1.2.6.1.1.4', 2)); $pre_cache['sdbDevInPowerFactor'] = current(snmpwalk_array_num($device, '.1.3.6.1.4.1.31034.12.1.1.2.6.1.1.4', 2));
echo 'sdbDevOutName ';
$pre_cache['sdbDevOutName'] = current(snmpwalk_array_num($device, '.1.3.6.1.4.1.31034.12.1.1.2.7.1.1.2.' . current($pre_cache['sdbMgmtCtrlDevUnitAddress']), 1));
echo 'sdbDevOutMtActualVoltage ';
$pre_cache['sdbDevOutMtActualVoltage'] = current(snmpwalk_array_num($device, '.1.3.6.1.4.1.31034.12.1.1.2.7.2.1.7.' . current($pre_cache['sdbMgmtCtrlDevUnitAddress']), 1));
echo 'sdbDevOutMtActualCurrent ';
$pre_cache['sdbDevOutMtActualCurrent'] = current(snmpwalk_array_num($device, '.1.3.6.1.4.1.31034.12.1.1.2.7.2.1.5.' . current($pre_cache['sdbMgmtCtrlDevUnitAddress']), 1));
echo 'sdbDevOutMtMaxAmps ';
$pre_cache['sdbDevOutMtMaxAmps'] = current(snmpwalk_array_num($device, '.1.3.6.1.4.1.31034.12.1.1.2.7.2.1.8.' . current($pre_cache['sdbMgmtCtrlDevUnitAddress']), 1));
echo 'sdbDevOutMtPowerVoltAmpere ';
$pre_cache['sdbDevOutMtPowerVoltAmpere']= current(snmpwalk_array_num($device, '.1.3.6.1.4.1.31034.12.1.1.2.7.2.1.10.' . current($pre_cache['sdbMgmtCtrlDevUnitAddress']), 1));
echo 'sdbDevOutMtKWhTotal ';
$pre_cache['sdbDevOutMtKWhTotal'] = current(snmpwalk_array_num($device, '.1.3.6.1.4.1.31034.12.1.1.2.7.2.1.2.' . current($pre_cache['sdbMgmtCtrlDevUnitAddress']), 1));
echo 'sdbDevOutMtPowerFactor ';
$pre_cache['sdbDevOutMtPowerFactor'] = current(snmpwalk_array_num($device, '.1.3.6.1.4.1.31034.12.1.1.2.7.2.1.4.' . current($pre_cache['sdbMgmtCtrlDevUnitAddress']), 1));

View File

@@ -4,10 +4,11 @@ $divisor = 100;
foreach ($pre_cache['sdbMgmtCtrlDevUnitAddress'] as $sdbMgmtCtrlDevUnitAddress => $sdbDevIdIndex) { foreach ($pre_cache['sdbMgmtCtrlDevUnitAddress'] as $sdbMgmtCtrlDevUnitAddress => $sdbDevIdIndex) {
foreach ($pre_cache['sdbDevInActualVoltage'][$sdbDevIdIndex] as $sdbDevInIndex => $sdbDevInActualVoltage) { foreach ($pre_cache['sdbDevInActualVoltage'][$sdbDevIdIndex] as $sdbDevInIndex => $sdbDevInActualVoltage) {
$name = trim($pre_cache['sdbDevInName'][$sdbDevIdIndex][$sdbDevInIndex], '"');
$voltage_oid = ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.7.$sdbDevIdIndex.$sdbDevInIndex"; $voltage_oid = ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.7.$sdbDevIdIndex.$sdbDevInIndex";
$voltage = $sdbDevInActualVoltage / $divisor; $voltage = $sdbDevInActualVoltage / $divisor;
$serial_input = $pre_cache['sdbDevIdSerialNumber'][$sdbDevIdIndex] ."-L". $sdbDevInIndex; $serial_input = $pre_cache['sdbDevIdSerialNumber'][$sdbDevIdIndex] ."-L". $sdbDevInIndex;
$descr = "$serial_input Voltage"; $descr = $name ?: "$serial_input Voltage";
// See includes/discovery/entity-physical/schleifenbauer.inc.php for an explanation why we set this as the entPhysicalIndex. // See includes/discovery/entity-physical/schleifenbauer.inc.php for an explanation why we set this as the entPhysicalIndex.
$entPhysicalIndex = $sdbMgmtCtrlDevUnitAddress * 1000000 + 100000 + $sdbDevInIndex * 1000 + 110; $entPhysicalIndex = $sdbMgmtCtrlDevUnitAddress * 1000000 + 100000 + $sdbDevInIndex * 1000 + 110;
@@ -15,3 +16,17 @@ foreach ($pre_cache['sdbMgmtCtrlDevUnitAddress'] as $sdbMgmtCtrlDevUnitAddress =
discover_sensor($valid['sensor'], 'voltage', $device, $voltage_oid, $serial_input, 'schleifenbauer', $descr, $divisor, '1', null, null, null, null, $voltage, 'snmp', $entPhysicalIndex); discover_sensor($valid['sensor'], 'voltage', $device, $voltage_oid, $serial_input, 'schleifenbauer', $descr, $divisor, '1', null, null, null, null, $voltage, 'snmp', $entPhysicalIndex);
} }
} }
$unit = current($pre_cache['sdbMgmtCtrlDevUnitAddress']);
foreach ($pre_cache['sdbDevOutMtActualVoltage'] as $sdbDevOutMtIndex => $sdbDevOutMtActualVoltage) {
$name = trim($pre_cache['sdbDevOutName'][$sdbDevOutMtIndex], '"');
$voltage_oid = ".1.3.6.1.4.1.31034.12.1.1.2.7.2.1.7.$unit.$sdbDevOutMtIndex";
$voltage = $sdbDevOutMtActualVoltage / $divisor;
$serial_input = $pre_cache['sdbDevIdSerialNumber'][$unit] ." Outlet ". $sdbDevOutMtIndex;
$descr = $name ?: "$serial_input Voltage";
// See includes/discovery/entity-physical/schleifenbauer.inc.php for an explanation why we set this as the entPhysicalIndex.
$entPhysicalIndex = $sdbMgmtCtrlDevUnitAddress * 1000000 + 200000 + $sdbDevOutMtIndex * 1000 + 110;
discover_sensor($valid['sensor'], 'voltage', $device, $voltage_oid, $serial_input, 'schleifenbauer', $descr, $divisor, '1', null, null, null, null, $voltage, 'snmp', $entPhysicalIndex);
}

View File

@@ -319,7 +319,7 @@
"sensor_oid": ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.5.210.1", "sensor_oid": ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.5.210.1",
"sensor_index": "SVNL00056319-L1", "sensor_index": "SVNL00056319-L1",
"sensor_type": "schleifenbauer", "sensor_type": "schleifenbauer",
"sensor_descr": "SVNL00056319-L1 RMS Current", "sensor_descr": "t=master",
"group": null, "group": null,
"sensor_divisor": 100, "sensor_divisor": 100,
"sensor_multiplier": 1, "sensor_multiplier": 1,
@@ -343,7 +343,7 @@
"sensor_oid": ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.5.210.2", "sensor_oid": ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.5.210.2",
"sensor_index": "SVNL00056319-L2", "sensor_index": "SVNL00056319-L2",
"sensor_type": "schleifenbauer", "sensor_type": "schleifenbauer",
"sensor_descr": "SVNL00056319-L2 RMS Current", "sensor_descr": "t=slave2",
"group": null, "group": null,
"sensor_divisor": 100, "sensor_divisor": 100,
"sensor_multiplier": 1, "sensor_multiplier": 1,
@@ -367,7 +367,7 @@
"sensor_oid": ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.5.210.3", "sensor_oid": ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.5.210.3",
"sensor_index": "SVNL00056319-L3", "sensor_index": "SVNL00056319-L3",
"sensor_type": "schleifenbauer", "sensor_type": "schleifenbauer",
"sensor_descr": "SVNL00056319-L3 RMS Current", "sensor_descr": "t=slave3",
"group": null, "group": null,
"sensor_divisor": 100, "sensor_divisor": 100,
"sensor_multiplier": 1, "sensor_multiplier": 1,
@@ -391,7 +391,7 @@
"sensor_oid": ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.9.210.1", "sensor_oid": ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.9.210.1",
"sensor_index": "SVNL00056319-L1", "sensor_index": "SVNL00056319-L1",
"sensor_type": "schleifenbauer", "sensor_type": "schleifenbauer",
"sensor_descr": "SVNL00056319-L1 Apparent Power", "sensor_descr": "t=master",
"group": null, "group": null,
"sensor_divisor": 1, "sensor_divisor": 1,
"sensor_multiplier": 1, "sensor_multiplier": 1,
@@ -415,7 +415,7 @@
"sensor_oid": ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.9.210.2", "sensor_oid": ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.9.210.2",
"sensor_index": "SVNL00056319-L2", "sensor_index": "SVNL00056319-L2",
"sensor_type": "schleifenbauer", "sensor_type": "schleifenbauer",
"sensor_descr": "SVNL00056319-L2 Apparent Power", "sensor_descr": "t=slave2",
"group": null, "group": null,
"sensor_divisor": 1, "sensor_divisor": 1,
"sensor_multiplier": 1, "sensor_multiplier": 1,
@@ -439,7 +439,7 @@
"sensor_oid": ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.9.210.3", "sensor_oid": ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.9.210.3",
"sensor_index": "SVNL00056319-L3", "sensor_index": "SVNL00056319-L3",
"sensor_type": "schleifenbauer", "sensor_type": "schleifenbauer",
"sensor_descr": "SVNL00056319-L3 Apparent Power", "sensor_descr": "t=slave3",
"group": null, "group": null,
"sensor_divisor": 1, "sensor_divisor": 1,
"sensor_multiplier": 1, "sensor_multiplier": 1,
@@ -463,7 +463,7 @@
"sensor_oid": ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.2.210.1", "sensor_oid": ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.2.210.1",
"sensor_index": "SVNL00056319-L1", "sensor_index": "SVNL00056319-L1",
"sensor_type": "schleifenbauer", "sensor_type": "schleifenbauer",
"sensor_descr": "SVNL00056319-L1 Lifetime kWh Total", "sensor_descr": "t=master",
"group": null, "group": null,
"sensor_divisor": 1, "sensor_divisor": 1,
"sensor_multiplier": 1, "sensor_multiplier": 1,
@@ -487,7 +487,7 @@
"sensor_oid": ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.2.210.2", "sensor_oid": ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.2.210.2",
"sensor_index": "SVNL00056319-L2", "sensor_index": "SVNL00056319-L2",
"sensor_type": "schleifenbauer", "sensor_type": "schleifenbauer",
"sensor_descr": "SVNL00056319-L2 Lifetime kWh Total", "sensor_descr": "t=slave2",
"group": null, "group": null,
"sensor_divisor": 1, "sensor_divisor": 1,
"sensor_multiplier": 1, "sensor_multiplier": 1,
@@ -511,7 +511,7 @@
"sensor_oid": ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.2.210.3", "sensor_oid": ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.2.210.3",
"sensor_index": "SVNL00056319-L3", "sensor_index": "SVNL00056319-L3",
"sensor_type": "schleifenbauer", "sensor_type": "schleifenbauer",
"sensor_descr": "SVNL00056319-L3 Lifetime kWh Total", "sensor_descr": "t=slave3",
"group": null, "group": null,
"sensor_divisor": 1, "sensor_divisor": 1,
"sensor_multiplier": 1, "sensor_multiplier": 1,
@@ -535,7 +535,7 @@
"sensor_oid": ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.4.210.1", "sensor_oid": ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.4.210.1",
"sensor_index": "SVNL00056319-L1", "sensor_index": "SVNL00056319-L1",
"sensor_type": "schleifenbauer", "sensor_type": "schleifenbauer",
"sensor_descr": "SVNL00056319-L1 Power Factor", "sensor_descr": "t=master",
"group": null, "group": null,
"sensor_divisor": 10000, "sensor_divisor": 10000,
"sensor_multiplier": 1, "sensor_multiplier": 1,
@@ -559,7 +559,7 @@
"sensor_oid": ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.4.210.2", "sensor_oid": ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.4.210.2",
"sensor_index": "SVNL00056319-L2", "sensor_index": "SVNL00056319-L2",
"sensor_type": "schleifenbauer", "sensor_type": "schleifenbauer",
"sensor_descr": "SVNL00056319-L2 Power Factor", "sensor_descr": "t=slave2",
"group": null, "group": null,
"sensor_divisor": 10000, "sensor_divisor": 10000,
"sensor_multiplier": 1, "sensor_multiplier": 1,
@@ -583,7 +583,7 @@
"sensor_oid": ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.4.210.3", "sensor_oid": ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.4.210.3",
"sensor_index": "SVNL00056319-L3", "sensor_index": "SVNL00056319-L3",
"sensor_type": "schleifenbauer", "sensor_type": "schleifenbauer",
"sensor_descr": "SVNL00056319-L3 Power Factor", "sensor_descr": "t=slave3",
"group": null, "group": null,
"sensor_divisor": 10000, "sensor_divisor": 10000,
"sensor_multiplier": 1, "sensor_multiplier": 1,
@@ -631,7 +631,7 @@
"sensor_oid": ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.7.210.1", "sensor_oid": ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.7.210.1",
"sensor_index": "SVNL00056319-L1", "sensor_index": "SVNL00056319-L1",
"sensor_type": "schleifenbauer", "sensor_type": "schleifenbauer",
"sensor_descr": "SVNL00056319-L1 Voltage", "sensor_descr": "t=master",
"group": null, "group": null,
"sensor_divisor": 100, "sensor_divisor": 100,
"sensor_multiplier": 1, "sensor_multiplier": 1,
@@ -655,7 +655,7 @@
"sensor_oid": ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.7.210.2", "sensor_oid": ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.7.210.2",
"sensor_index": "SVNL00056319-L2", "sensor_index": "SVNL00056319-L2",
"sensor_type": "schleifenbauer", "sensor_type": "schleifenbauer",
"sensor_descr": "SVNL00056319-L2 Voltage", "sensor_descr": "t=slave2",
"group": null, "group": null,
"sensor_divisor": 100, "sensor_divisor": 100,
"sensor_multiplier": 1, "sensor_multiplier": 1,
@@ -679,7 +679,7 @@
"sensor_oid": ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.7.210.3", "sensor_oid": ".1.3.6.1.4.1.31034.12.1.1.2.6.1.1.7.210.3",
"sensor_index": "SVNL00056319-L3", "sensor_index": "SVNL00056319-L3",
"sensor_type": "schleifenbauer", "sensor_type": "schleifenbauer",
"sensor_descr": "SVNL00056319-L3 Voltage", "sensor_descr": "t=slave3",
"group": null, "group": null,
"sensor_divisor": 100, "sensor_divisor": 100,
"sensor_multiplier": 1, "sensor_multiplier": 1,