$entry) { $descr = $entry['cyanCemDescription'] . ' ' . $entry['cyanCemIdentifier']; discover_sensor('current', $device, ".1.3.6.1.4.1.28533.5.30.50.1.1.1.11.$index", $index, 'cyanCemCurrent', $descr, 0.01, $entry['cyanCemCurrent']); $options = []; $options['limit_high'] = $entry['cyanCemIntakeTempAlarmHighThres'] * 0.001; $options['limit_low'] = $entry['cyanCemIntakeTempAlarmLowThres'] * 0.001; $options['warn_high'] = $entry['cyanCemIntakeTempWarnHighThres'] * 0.001; $options['warn_low'] = $entry['cyanCemIntakeTempWarnLowThres'] * 0.001; discover_sensor('temperature', $device, ".1.3.6.1.4.1.28533.5.30.50.1.1.1.20.$index", $index, 'cyanCemIntakeAirTemp', $descr . ' Intake', 0.001, $entry['cyanCemIntakeAirTemp'], $options); $options = []; $options['limit_high'] = $entry['cyanCemExhaustTempAlarmHighThres'] * 0.001; $options['limit_low'] = $entry['cyanCemExhaustTempAlarmLowThres'] * 0.001; $options['warn_high'] = $entry['cyanCemExhaustTempWarnHighThres'] * 0.001; $options['warn_low'] = $entry['cyanCemExhaustTempWarnLowThres'] * 0.001; discover_sensor('temperature', $device, ".1.3.6.1.4.1.28533.5.30.50.1.1.1.13.$index", $index, 'cyanCemExhaustAirTemp', $descr . ' Exhaust', 0.001, $entry['cyanCemExhaustAirTemp'], $options); $options = []; $options['limit_high'] = $entry['cyanCemOvervoltageThreshold'] * 0.001; $options['limit_low'] = $entry['cyanCemUndervoltageThreshold'] * 0.001; discover_sensor('voltage', $device, ".1.3.6.1.4.1.28533.5.30.50.1.1.1.43.$index", $index, 'cyanCemPwrFeedAVoltage', $descr . ' Feed A', 0.001, $entry['cyanCemPwrFeedAVoltage'], $options); discover_sensor('voltage', $device, ".1.3.6.1.4.1.28533.5.30.50.1.1.1.45.$index", $index, 'cyanCemPwrFeedBVoltage', $descr . ' Feed B', 0.001, $entry['cyanCemPwrFeedBVoltage'], $options); } // EOF