Skip to content

MMU — Multi-Material Unit

Module: mmu (optional)
API Endpoint: /printer/objects/query with mmu, mmu_encoder mmu_encoder, and mmu_machine objects.

Collects metrics from Happy Hare Multi-Material Unit — an advanced filament management system for Klipper.

Metrics

Basic State

MetricTypeDescription
klipper_mmu_enabledGaugeMMU enabled state (0/1)
klipper_mmu_homedGaugeMMU homed state (0/1)
klipper_mmu_num_gatesGaugeNumber of MMU gates
klipper_mmu_has_bypassGaugeWhether MMU has a bypass gate (0/1)
klipper_mmu_current_unitGaugeCurrent MMU unit index
klipper_mmu_current_toolGaugeCurrent tool (-1=unknown, -2=bypass)
klipper_mmu_current_gateGaugeCurrent gate index
MetricTypeLabelsDescription
klipper_mmu_print_state_infoGauge=1stateMMU print state
klipper_mmu_action_infoGauge=1actionCurrent MMU action
klipper_mmu_operation_infoGauge=1operationCurrent MMU operation
klipper_mmu_sync_feedback_state_infoGauge=1stateSync feedback state

Filament

MetricTypeDescription
klipper_mmu_filament_loadedGaugeWhether filament is loaded (0/1)
klipper_mmu_filament_position_mmGaugeFilament position in mm
klipper_mmu_filament_pos_stateGaugeFilament position state machine value
klipper_mmu_filament_directionGaugeFilament direction (1=load, -1=unload)
klipper_mmu_runoutGaugeRunout detected (0/1)

Toolchange

MetricTypeDescription
klipper_mmu_toolchanges_totalGaugeTotal toolchanges in current print
klipper_mmu_last_toolGaugeLast tool used
klipper_mmu_next_toolGaugeNext tool during toolchange
klipper_mmu_toolchange_purge_volume_mm3GaugeSuggested purge volume in mm³
klipper_mmu_slicer_total_toolchangesGaugeExpected toolchanges from slicer
klipper_mmu_slicer_initial_toolGaugeInitial tool from slicer

Detection & Sync

MetricTypeDescription
klipper_mmu_clog_detection_modeGaugeClog detection mode (0=off, 1=manual, 2=auto)
klipper_mmu_endless_spool_enabledGaugeEndless spool mode (0=off, 1=enabled, 2=pre-gate)
klipper_mmu_sync_drive_enabledGaugeGear stepper synced to extruder (0/1)
klipper_mmu_servo_position_infoGauge=1Servo position as labeled gauge
klipper_mmu_bowden_progress_percentGaugeBowden move progress (-1 if inactive)

Encoder

MetricTypeDescription
klipper_mmu_encoder_position_mmGaugeEncoder position in mm
klipper_mmu_encoder_detection_length_mmGaugeClog detection length in mm
klipper_mmu_encoder_headroom_mmGaugeCurrent clog detection headroom
klipper_mmu_encoder_min_headroom_mmGaugeMinimum recorded headroom
klipper_mmu_encoder_desired_headroom_mmGaugeDesired headroom
klipper_mmu_encoder_flow_rate_percentGaugeEncoder flow rate percentage
klipper_mmu_encoder_enabledGaugeEncoder enabled for clog detection (0/1)

Per-Gate Metrics

Labels: gate

MetricTypeDescription
klipper_mmu_gate_statusGaugeStatus (-1=unknown, 0=empty, 1=available, 2=buffered)
klipper_mmu_gate_temperatureGaugeGate filament temperature
klipper_mmu_gate_speed_override_percentGaugeSpeed override percentage
klipper_mmu_gate_ttg_mapGaugeTool-to-gate mapping
klipper_mmu_gate_endless_spool_groupGaugeEndless spool group
klipper_mmu_gate_spool_idGaugeSpoolman spool ID (-1 if unset)
klipper_mmu_gate_infoGauge=1Gate info with gate, material, color, filament_name labels
klipper_mmu_pre_gate_sensor_detectedGaugePre-gate filament detected (0/1)
klipper_mmu_pre_gate_sensor_enabledGaugePre-gate sensor enabled (0/1)

Tool Multipliers

Labels: tool

MetricTypeDescription
klipper_mmu_tool_extrusion_multiplierGaugeTool extrusion multiplier (M221)
klipper_mmu_tool_speed_multiplierGaugeTool speed multiplier (M220)

Machine & Active Filament Info

MetricTypeLabelsDescription
klipper_mmu_machine_infoGauge=1name, vendor, version, selector_typeMMU machine info
klipper_mmu_num_unitsGaugeNumber of MMU units
klipper_mmu_active_filament_infoGauge=1name, material, colorActive filament info
klipper_mmu_active_filament_temperatureGaugeActive filament temperature
klipper_mmu_active_filament_spool_idGaugeActive filament Spoolman spool ID

Example PromQL

promql
# Current gate and tool
klipper_mmu_current_gate
klipper_mmu_current_tool

# Gate status (1 = available)
klipper_mmu_gate_status == 1

# Toolchanges per print
klipper_mmu_toolchanges_total

# Encoder headroom (clog risk when low)
klipper_mmu_encoder_headroom_mm < 5

Released under the MIT License.