Happy Hare keeps track of the current print state in a similar way to the klipper print_stats module. It is subtly difference and can even work when streaming a job for Octoprint (although some special precautions must be taken). The current state is available via the printer variable printer.mmu.print_job_state. This can be useful in your own custom gcode macros but also ensures that Happy Hare restores things like temperatures, stepper motor current and idle_timeout at the right time.
It is a good idea to familiarize yourself with this to aid debugging and state recovery even if you are not using in your own macros.
Job State Transitions
Important
Users printing from the "virtual SD-card" via Mainsail or Fluidd don't have any extras steps to take but if streaming a job (e.g. from Octoprint) the user is responsible to add
_MMU_PRINT_STARTto their print_start macro or sequence and_MMU_PRINT_ENDto their end_print macro or sequence. The addition of those commands on "virtual sd-card print" will not cause harm but they are but are unnecessary and will be ignored (hence the underscore naming). Also note that theprint_start_detectionsetting can be used to disable the automatic behavior and act like a job streamed from Octoprint.
stateDiagram-v2
initialized --> started: (print_start)
note left of initialized: reset
standby --> started: (print_start)
note left of standby: idle_timeout
ready --> started: (print_start)
started --> printing
printing --> complete: (print_complete))
printing --> error: (print_error)
printing --> cancelled: CANCEL_PRINT
printing --> PAUSE: mmu error or MMU_PAUSE
state PAUSE {
direction LR
pause_locked --> paused: (MMU_UNLOCK)
}
PAUSE --> printing: RESUME
State machine transitions in detail...
MMU starts in initialized state. On printing it will briefly enter started (until _MMU_PRINT_START is complete) then transition to printing. On job completion (at end of _MMU_PRINT_END) or job error the state will transition to complete or error respectively. If the print is explicitly cancelled the CANCEL_PRINT interception transitions to cancelled. If idle_timeout is experience the state will transition back to standby. ready is a resting state similar to standby an just means that the printer is not yet idle.
While printing, if an mmu error occurs (or the user explicitly calls MMU_PAUSE) the state will transition to pause_locked. If the user is quick to respond (before extruder temp drops) the print can be resumed with RESUME command. The MMU_UNLOCK is optional and will restore temperatures allowing for direct MMU interaction and thus can be considered a half-step towards resuming (must still run RESUME to continue printing).
Note
MMU_PAUSEoutside of a print will have no effect unlessMMU_PAUSE FORCE_IN_PRINT=1is specified to mimick the behavior (like z-hop move and running PAUSE macro, etc).- Directly calling
PAUSEwill stop the job but will have no effect on the MMU (i.e. it does not put the MMU into thepause_lockedstate, only MMU_PAUSE does that.- When entering
pause_lockedHappy Hare will always remember the toolhead position and, if configured, perform a z-hop, but will also run the user PAUSE macro- When
RESUMEis called the user RESUME macro will be called, finally followed by Happy Hare restoring the original toolhead position.- Outside of a print the toolhead is never moved by Happy Hare (only user's PAUSE/RESUME macros).
MMU_PRINT_END STATE=xxxif called directly can accept statescomplete|error|cancelled|standby|readyalthough typically would only be called withcomplete|error
*** NEW V4 DOC IS HERE ***
1. Introduction
2. Installation
3. Essential Configuration
5. Operation
-- YOUR MMU IS READY TO PLAY WITH --
6. Slicer-MMU Setup
-- NOW YOU ARE READY TO PRINT! --
7. Tuning
8. Optional Feature Setup
9. Advanced Configuration
10. Advanced Concepts
- State Persistence
- Statistics and Counters
- Tool and Gate Maps
- Filament Bypass
- Runout/Clog Detection
- Consumption Counters
- Synchronized Gear/Extruder
11. Quick References
12. Troubleshooting
13. FAQ
14. MCU Board Reference 🆕
15. Change Log
Happy Hare Discord
(\_/)
( *,*)
(")_(") Happy Hare Ready
Copyright (C) 2022-2026 Paul Morgan