---
# Error codes list for the MMU for the Original Prusa i3 and Buddy FW
# GitHub repo https://github.com/prusa3d/Prusa-Error-Codes
# Printer code
# MMU            04xxx
# Error categories
# MECHANICAL     xx1xx   # Mechanical failures - FINDA, FSENSOR not triggering
# TEMPERATURE    xx2xx   # Temperature measurement of TMC drivers
# ELECTRICAL     xx3xx   # Electrical - TMC non-temperature-related errors
# CONNECTIVITY   xx4xx   # Connectivity - UART/RS485 connectivity
# SYSTEM         xx5xx   # System - internal MMU errors
# BOOTLOADER     xx6xx   # Bootloader related issues
# WARNINGS       xx7xx   # Category-less warnings
#
# for TMC-related errors the decimal digit specifies the TMC/motor in question:
# 0 - pulley
# 1 - selector
# 2 - idler


Errors:

# MECHANICAL

- code: "04101"
  title: "FINDA DIDNT TRIGGER"
  text: "FINDA didn't trigger while loading the filament. Ensure the filament can move and FINDA works."
  action: [Retry]
  id: "FINDA_DIDNT_TRIGGER"
  approved: true
  type: WARNING
  gui_layout: "mmu_dialog"

- code: "04102"
  title: "FINDA FILAM. STUCK"
  text: "FINDA didn't switch off while unloading filament. Try unloading manually. Ensure filament can move and FINDA works."
  action: [Retry]
  id: "FINDA_FILAMENT_STUCK"
  approved: true
  type: WARNING
  gui_layout: "mmu_dialog"

- code: "04103"
  title: "FSENSOR DIDNT TRIGG."
  text: "Filament sensor didn't trigger while loading the filament. Ensure the sensor is calibrated and the filament reached it."
  action: [Retry]
  id: "FSENSOR_DIDNT_TRIGGER"
  approved: true
  type: WARNING
  gui_layout: "mmu_dialog"

- code: "04104"
  title: "FSENSOR FIL. STUCK"
  text: "Filament sensor didn't switch off while unloading filament. Ensure filament can move and the sensor works."
  action: [Retry]
  id: "FSENSOR_FILAMENT_STUCK"
  approved: true
  type: WARNING
  gui_layout: "mmu_dialog"

- code: "04105"
  title: "PULLEY CANNOT MOVE"
  text: "Pulley motor stalled. Ensure the pulley can move and check the wiring."
  action: [Retry]
  id: "PULLEY_CANNOT_MOVE"
  approved: true
  type: WARNING
  gui_layout: "mmu_dialog"

- code: "04106"
  title: "FSENSOR TOO EARLY"
  text: "Filament sensor triggered too early while loading to extruder. Check there isn't anything stuck in PTFE tube. Check that sensor reads properly."
  action: [Retry]
  id: "FSENSOR_TOO_EARLY"
  approved: true
  type: WARNING
  gui_layout: "mmu_dialog"

- code: "04107"
  title: "INSPECT FINDA"
  text: "Selector can't move due to FINDA detecting a filament. Make sure no filament is in Selector and FINDA works properly."
  action: [Retry]
  id: "INSPECT_FINDA"
  approved: true
  type: WARNING
  gui_layout: "mmu_dialog"

- code: "04108"
  title: "LOAD TO EXTR. FAILED"
  text: "Loading to extruder failed. Inspect the filament tip shape. Refine the sensor calibration, if needed."
  action: [Continue]
  id: "LOAD_TO_EXTRUDER_FAILED"
  approved: true
  type: WARNING
  gui_layout: "mmu_dialog"

- code: "04115"
  title: "SELECTOR CANNOT HOME"
  text: "The Selector cannot home properly. Check for anything blocking its movement."
  action: [Retry]
  id: "SELECTOR_CANNOT_HOME"
  approved: true
  type: WARNING
  gui_layout: "mmu_dialog"

- code: "04116"
  title: "SELECTOR CANNOT MOVE"
  text: "The Selector cannot move. Check for anything blocking its movement. Check if the wiring is correct."
  action: [Retry]
  id: "SELECTOR_CANNOT_MOVE"
  approved: true
  type: WARNING
  gui_layout: "mmu_dialog"

- code: "04125"
  title: "IDLER CANNOT HOME"
  text: "The Idler cannot home properly. Check for anything blocking its movement."
  action: [Retry]
  id: "IDLER_CANNOT_HOME"
  approved: true
  type: WARNING
  gui_layout: "mmu_dialog"

- code: "04126"
  title: "IDLER CANNOT MOVE"
  text: "The Idler cannot move properly. Check for anything blocking its movement. Check if the wiring is correct."
  action: [Retry]
  id: "IDLER_CANNOT_MOVE"
  approved: true
  type: WARNING
  gui_layout: "mmu_dialog"

# TEMPERATURE    xx2xx   # Temperature measurement
- code: "04201"
  title: "WARNING TMC TOO HOT"
  text: "TMC driver for the Pulley motor is almost overheating. Make sure there is sufficient airflow near the MMU board."
  text_short: "More details online."
  action: [Continue,ResetMMU]
  id: "WARNING_TMC_PULLEY_TOO_HOT"
  approved: true
  type: ERROR
  gui_layout: "mmu_dialog"

- code: "04211"
  title: "WARNING TMC TOO HOT"
  text: "TMC driver for the Selector motor is almost overheating. Make sure there is sufficient airflow near the MMU board."
  text_short: "More details online."
  action: [Continue,ResetMMU]
  id: "WARNING_TMC_SELECTOR_TOO_HOT"
  approved: true
  type: ERROR
  gui_layout: "mmu_dialog"

- code: "04221"
  title: "WARNING TMC TOO HOT"
  text: "TMC driver for the Idler motor is almost overheating. Make sure there is sufficient airflow near the MMU board."
  text_short: "More details online."
  action: [Continue,ResetMMU]
  id: "WARNING_TMC_IDLER_TOO_HOT"
  approved: true
  type: ERROR
  gui_layout: "mmu_dialog"

- code: "04202"
  title: "TMC OVERHEAT ERROR"
  text: "TMC driver for the Pulley motor is overheated. Cool down the MMU board and reset MMU."
  text_short: "More details online."
  action: [ResetMMU]
  id: "TMC_PULLEY_OVERHEAT_ERROR"
  approved: true
  type: ERROR
  gui_layout: "mmu_dialog"

- code: "04212"
  title: "TMC OVERHEAT ERROR"
  text: "TMC driver for the Selector motor is overheated. Cool down the MMU board and reset MMU."
  text_short: "More details online."
  action: [ResetMMU]
  id: "TMC_SELECTOR_OVERHEAT_ERROR"
  approved: true
  type: ERROR
  gui_layout: "mmu_dialog"

- code: "04222"
  title: "TMC OVERHEAT ERROR"
  text: "TMC driver for the Idler motor is overheated. Cool down the MMU board and reset MMU."
  text_short: "More details online."
  action: [ResetMMU]
  id: "TMC_IDLER_OVERHEAT_ERROR"
  approved: true
  type: ERROR
  gui_layout: "mmu_dialog"

# ELECTRICAL     xx3xx
- code: "04301"
  title: "TMC DRIVER ERROR"
  text: "TMC driver for the Pulley motor is not responding. Try resetting the MMU. If the issue persists contact support."
  text_short: "More details online."
  action: [ResetMMU]
  id: "TMC_PULLEY_DRIVER_ERROR"
  approved: true
  type: ERROR
  gui_layout: "mmu_dialog"

- code: "04311"
  title: "TMC DRIVER ERROR"
  text: "TMC driver for the Selector motor is not responding. Try resetting the MMU. If the issue persists contact support."
  text_short: "More details online."
  action: [ResetMMU]
  id: "TMC_SELECTOR_DRIVER_ERROR"
  approved: true
  type: ERROR
  gui_layout: "mmu_dialog"

- code: "04321"
  title: "TMC DRIVER ERROR"
  text: "TMC driver for the Idler motor is not responding. Try resetting the MMU. If the issue persists contact support."
  text_short: "More details online."
  action: [ResetMMU]
  id: "TMC_IDLER_DRIVER_ERROR"
  approved: true
  type: ERROR
  gui_layout: "mmu_dialog"

- code: "04302"
  title: "TMC DRIVER RESET"
  text: "TMC driver for the Pulley motor was restarted. There is probably an issue with the electronics. Check the wiring and connectors."
  text_short: "More details online."
  action: [ResetMMU]
  id: "TMC_PULLEY_DRIVER_RESET"
  approved: true
  type: ERROR
  gui_layout: "mmu_dialog"

- code: "04312"
  title: "TMC DRIVER RESET"
  text: "TMC driver for the Selector motor was restarted. There is probably an issue with the electronics. Check the wiring and connectors."
  text_short: "More details online."
  action: [ResetMMU]
  id: "TMC_SELECTOR_DRIVER_RESET"
  approved: true
  type: ERROR
  gui_layout: "mmu_dialog"

- code: "04322"
  title: "TMC DRIVER RESET"
  text: "TMC driver for the Idler motor was restarted. There is probably an issue with the electronics. Check the wiring and connectors."
  text_short: "More details online."
  action: [ResetMMU]
  id: "TMC_IDLER_DRIVER_RESET"
  approved: true
  type: ERROR
  gui_layout: "mmu_dialog"

- code: "04303"
  title: "TMC UNDERVOLTAGE ERR"
  text: "Not enough current for the Pulley TMC driver. There is probably an issue with the electronics. Check the wiring and connectors."
  text_short: "More details online."
  action: [ResetMMU]
  id: "TMC_PULLEY_UNDERVOLTAGE_ERROR"
  approved: true
  type: ERROR
  gui_layout: "mmu_dialog"

- code: "04313"
  title: "TMC UNDERVOLTAGE ERR"
  text: "Not enough current for the Selector TMC driver. There is probably an issue with the electronics. Check the wiring and connectors."
  text_short: "More details online."
  action: [ResetMMU]
  id: "TMC_SELECTOR_UNDERVOLTAGE_ERROR"
  approved: true
  type: ERROR
  gui_layout: "mmu_dialog"

- code: "04323"
  title: "TMC UNDERVOLTAGE ERR"
  text: "Not enough current for the Idler TMC driver. There is probably an issue with the electronics. Check the wiring and connectors."
  text_short: "More details online."
  action: [ResetMMU]
  id: "TMC_IDLER_UNDERVOLTAGE_ERROR"
  approved: true
  type: ERROR
  gui_layout: "mmu_dialog"

- code: "04304"
  title: "TMC DRIVER SHORTED"
  text: "Short circuit on the Pulley TMC driver. Check the wiring and connectors. If the issue persists contact support."
  text_short: "More details online."
  action: [ResetMMU]
  id: "TMC_PULLEY_DRIVER_SHORTED"
  approved: true
  type: ERROR
  gui_layout: "mmu_dialog"

- code: "04314"
  title: "TMC DRIVER SHORTED"
  text: "Short circuit on the Selector TMC driver. Check the wiring and connectors. If the issue persists contact support."
  text_short: "More details online."
  action: [ResetMMU]
  id: "TMC_SELECTOR_DRIVER_SHORTED"
  approved: true
  type: ERROR
  gui_layout: "mmu_dialog"

- code: "04324"
  title: "TMC DRIVER SHORTED"
  text: "Short circuit on the Idler TMC driver. Check the wiring and connectors. If the issue persists contact support."
  text_short: "More details online."
  action: [ResetMMU]
  id: "TMC_IDLER_DRIVER_SHORTED"
  approved: true
  type: ERROR
  gui_layout: "mmu_dialog"

- code: "04305"
  title: "MMU SELFTEST FAILED"
  text: "MMU selftest failed on the Pulley TMC driver. Check the wiring and connectors. If the issue persists contact support."
  text_short: "More details online."
  action: [ResetMMU]
  id: "MMU_PULLEY_SELFTEST_FAILED"
  approved: true
  type: ERROR
  gui_layout: "mmu_dialog"

- code: "04315"
  title: "MMU SELFTEST FAILED"
  text: "MMU selftest failed on the Selector TMC driver. Check the wiring and connectors. If the issue persists contact support."
  text_short: "More details online."
  action: [ResetMMU]
  id: "MMU_SELECTOR_SELFTEST_FAILED"
  approved: true
  type: ERROR
  gui_layout: "mmu_dialog"

- code: "04325"
  title: "MMU SELFTEST FAILED"
  text: "MMU selftest failed on the Idler TMC driver. Check the wiring and connectors. If the issue persists contact support."
  text_short: "More details online."
  action: [ResetMMU]
  id: "MMU_IDLER_SELFTEST_FAILED"
  approved: true
  type: ERROR
  gui_layout: "mmu_dialog"

- code: "04306"
  title: "MMU MCU ERROR"
  text: "MMU detected a power-related issue. Check the wiring and connectors. If the issue persists, contact support."
  text_short: "More details online."
  action: [ResetMMU]
  id: "MCU_POWER_ERROR"
  approved: true
  type: ERROR
  gui_layout: "mmu_dialog"

- code: "04307"
  title: "MMU MCU UNDERPOWER"
  text: "MMU MCU detected a 5V undervoltage. There might be an issue with the electronics. Check the wiring and connectors"
  text_short: "More details online."
  action: [ResetMMU]
  id: "MCU_UNDERVOLTAGE_VCC"
  approved: true
  type: ERROR
  gui_layout: "mmu_dialog"

# CONNECTIVITY
- code: "04401"
  title: "MMU NOT RESPONDING"
  text: "MMU not responding. Check the wiring and connectors."
  action: [ResetMMU,DisableMMU]
  id: "MMU_NOT_RESPONDING"
  approved: true
  type: ERROR
  gui_layout: "mmu_dialog"

- code: "04402"
  title: "COMMUNICATION ERROR"
  text: "MMU not responding correctly. Check the wiring and connectors."
  action: [ResetMMU,DisableMMU]
  id: "COMMUNICATION_ERROR"
  approved: true
  type: ERROR
  gui_layout: "mmu_dialog"

# SYSTEM
- code: "04501"
  title: "FIL. ALREADY LOADED"
  text: "Cannot perform the action, filament is already loaded. Unload it first."
  action: [Unload,Continue]
  id: "FILAMENT_ALREADY_LOADED"
  approved: true
  type: WARNING
  gui_layout: "mmu_dialog"

- code: "04502"
  title: "INVALID TOOL"
  text: "Requested filament tool is not available on this hardware. Check the G-code for tool index out of range (T0-T4)."
  action: [StopPrint,ResetMMU]
  id: "INVALID_TOOL"
  approved: true
  type: ERROR
  gui_layout: "mmu_dialog"

- code: "04503"
  title: "QUEUE FULL"
  text: "MMU Firmware internal error, please reset the MMU."
  action: [ResetMMU]
  id: "QUEUE_FULL"
  approved: true
  type: ERROR
  gui_layout: "mmu_dialog"

- code: "04504"
  title: "MMU FW UPDATE NEEDED"
  text: "The MMU firmware version is incompatible with the printer's FW. Update to compatible version."
  text_short: "MMU FW version is incompatible with printer FW.Update to version 3.0.1."
  action: [ResetMMU,DisableMMU]
  id: "FW_UPDATE_NEEDED"
  approved: true
  type: USER_ACTION
  gui_layout: "mmu_dialog"

- code: "04505"
  title: "FW RUNTIME ERROR"
  text: "Internal runtime error. Try resetting the MMU or updating the firmware."
  action: [ResetMMU]
  id: "FW_RUNTIME_ERROR"
  approved: true
  type: ERROR
  gui_layout: "mmu_dialog"

- code: "04506"
  title: "UNLOAD MANUALLY"
  text: "Filament detected unexpectedly. Ensure no filament is loaded. Check the sensors and wiring."
  action: [Retry]
  id: "UNLOAD_MANUALLY"
  approved: true
  type: USER_ACTION
  gui_layout: "mmu_dialog"

- code: "04507"
  title: "FILAMENT EJECTED"
  text: "Remove the ejected filament from the front of the MMU.\n\nTip: Filament is automatically ejected when the end of the spool is reached."
  text_short: "Remove the ejected filament from the front of the MMU."
  action: [Continue]
  id: "FILAMENT_EJECTED"
  approved: true
  type: USER_ACTION
  gui_layout: "mmu_dialog"

- code: "04900"
  title: "UNKNOWN ERROR"
  text: "Unexpected error occurred."
  action: [ResetMMU]
  id: "UNKNOWN_ERROR"
  approved: false
  type: ERROR
  gui_layout: "mmu_dialog"