mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Updated discovery sensors module directory structure
This commit is contained in:
59
includes/discovery/sensors/humidity/pcoweb.inc.php
Normal file
59
includes/discovery/sensors/humidity/pcoweb.inc.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
if ($device['os'] == 'pcoweb') {
|
||||
echo ' pCOWeb ';
|
||||
|
||||
$humidities = array(
|
||||
array(
|
||||
'mib' => 'CAREL-ug40cdz-MIB::roomRH.0',
|
||||
'descr' => 'Room Relative Humidity',
|
||||
'oid' => '.1.3.6.1.4.1.9839.2.1.2.6.0',
|
||||
'precision' => '10',
|
||||
),
|
||||
array(
|
||||
'mib' => 'CAREL-ug40cdz-MIB::dehumPband.0',
|
||||
'descr' => 'Dehumidification Prop. Band',
|
||||
'oid' => '.1.3.6.1.4.1.9839.2.1.3.12.0',
|
||||
'precision' => '1',
|
||||
),
|
||||
array(
|
||||
'mib' => 'CAREL-ug40cdz-MIB::humidPband.0',
|
||||
'descr' => 'Humidification Prop. Band',
|
||||
'oid' => '.1.3.6.1.4.1.9839.2.1.3.13.0',
|
||||
'precision' => '1',
|
||||
),
|
||||
array(
|
||||
'mib' => 'CAREL-ug40cdz-MIB::dehumSetp.0',
|
||||
'descr' => 'Dehumidification Set Point',
|
||||
'oid' => '.1.3.6.1.4.1.9839.2.1.3.16.0',
|
||||
'precision' => '1',
|
||||
),
|
||||
array(
|
||||
'mib' => 'CAREL-ug40cdz-MIB::humidSetp.0',
|
||||
'descr' => 'Humidification Set Point',
|
||||
'oid' => '.1.3.6.1.4.1.9839.2.1.3.17.0',
|
||||
'precision' => '1',
|
||||
),
|
||||
);
|
||||
|
||||
foreach ($humidities as $humidity) {
|
||||
$current = (snmp_get($device, $humidity['mib'], '-OqvU') / $humidity['precision']);
|
||||
|
||||
$high_limit = null;
|
||||
$low_limit = null;
|
||||
|
||||
if (is_numeric($current) && $current != 0) {
|
||||
$index = implode('.', array_slice(explode('.', $humidity['oid']), -5));
|
||||
discover_sensor($valid['sensor'], 'humidity', $device, $humidity['oid'], $index, 'pcoweb', $humidity['descr'], $humidity['precision'], '1', $low_limit, null, null, $high_limit, $current);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
FIXME
|
||||
|
||||
hhAlarmThrsh.0 = INTEGER: 80 rH%
|
||||
lhAlarmThrsh.0 = INTEGER: 30 rH%
|
||||
smDehumSetp.0 = INTEGER: 75 rH%
|
||||
smHumidSetp.0 = INTEGER: 35 rH%
|
||||
*/
|
||||
}
|
||||
Reference in New Issue
Block a user