0) { // Cache device sensors attribs (currently need for get sensor_addition attrib) $GLOBALS['cache']['entity_attribs'] = array_merge((array)$GLOBALS['cache']['entity_attribs'], get_device_entities_attribs($device['device_id'], 'sensor')); //print_vars($GLOBALS['cache']['entity_attribs']); poll_cache_oids($device, 'sensor', $oid_cache); global $table_rows; $table_rows = []; // Call poll_sensor for each sensor type that we support. global $multi_update_db; $multi_update_db = []; foreach ($sensor_classes as $sensor_class) { $sensor_class_data = $config['sensor_types'][$sensor_class]; poll_sensor($device, $sensor_class, $sensor_class_data['symbol'], $oid_cache); } if (count($multi_update_db)) { print_debug("MultiUpdate sensors DB."); // Multiupdate required all UNIQUE keys! dbUpdateMulti($multi_update_db, 'sensors'); } $headers = ['Descr', 'Class', 'Type', 'Origin', 'Value', 'Event', 'Last Changed']; print_cli_table($table_rows, $headers); } // EOF