Switch support for Avtech RoomAlert 4E

This commit is contained in:
Tony Murray
2016-06-06 15:39:04 -05:00
parent 807e3dfe61
commit ad8ecb0f82
2 changed files with 13 additions and 10 deletions

View File

@ -4,7 +4,7 @@
if ($device['os'] == 'avtech') {
echo 'AVTECH: ';
if (strpos($device['sysObjectID'], '.20916.1.9') !== false) {
// RoomAlert 3E
// RoomAlert 3E
$device_oid = '.1.3.6.1.4.1.20916.1.9.';
$switch = array(
@ -15,4 +15,16 @@ if ($device['os'] == 'avtech') {
);
avtech_add_sensor($device, $switch);
}
elseif (strpos($device['sysObjectID'], '.20916.1.6') !== false) {
// RoomAlert 4E
$device_oid = '.1.3.6.1.4.1.20916.1.6.';
$switch = array(
'id' => 0,
'type' => 'switch',
'oid' => $device_oid.'1.3.1.0',
'descr_oid' => $device_oid.'1.3.2.0',
);
avtech_add_sensor($device, $switch);
}
}

View File

@ -114,14 +114,5 @@ if ($device['os'] == 'avtech') {
'divisor' => $divisor,
);
avtech_add_sensor($device, $sen2);
/* we don't support switches at this time
$switch = array(
'oid' => $device_oid.'1.3.1.0',
'descr_oid' => $device_oid.'1.3.2.0',
'type' => 'switch'
);
avtech_add_sensor($device, $switch);
*/
}
}//end if