Skip to content

Commit

Permalink
Merge pull request #49 from jukebox42/mk4-single
Browse files Browse the repository at this point in the history
Support MK3.5+ single print mode
  • Loading branch information
jukebox42 authored Aug 15, 2024
2 parents 4e5cead + 948f6fb commit c4534ed
Show file tree
Hide file tree
Showing 7 changed files with 505 additions and 82 deletions.
34 changes: 28 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Octoprint-PrusaMMU

Note: MK3.5/3.9/4 is not yet supported for single filament prints. Work in progress.
<span style="color:red">**For MK3.5/3.9/5 you cannot use single print profile. You MUST use use the
MMU profile with a single filament, what you pick doesn't matter, we will overwrite the filament
with the tool you choose.**</span>

**Description:** This plugin adds Prusa MMU support to OctoPrint. The active filament will be
displayed in the navbar and you will be prompted to select which filament to use when slicing in
"MMU Single" mode. Other settings are available to name each tool and set defaults. This plugin
only works for Prusa printers with an MMU. Supports MMU firmware `3.X.X`.
only works for Prusa printers with an MMU. Supports MK3s/3.5/3.9/4 MMU3 firmware `3.X.X`.

This plugin was inspired by the [MMU2filamentselect](https://plugins.octoprint.org/plugins/mmu2filamentselect/)
plugin. I wanted to try and take it a step further.
Expand Down Expand Up @@ -58,7 +60,19 @@ The command interactions are as follows:

### MK3.5/3.9/4 MMU 3.X.X - Single Print

Unsupported, TBD. Prusa removed the single print profile which served a `Tx` we use to do the detection.
Note Prusa removed the single print profile which served a `Tx` we use to do the detection. We use
something different for MK3.5+. <span style="color:red">**For MK3.5+ you cannot use single print
profile. You MUST use use the MMU profile with a single filament, what you pick doesn't matter, we
will overwrite the filament with the tool you choose.**</span>

When a print is started, the print is immediately pause and the user is prompted to select a
filament. The plugin then stores the selected option and each time a `T#` is encountered, it
rewrites the command to the chosen tool. If the dialog times out, the print will continue with the
sliced tool. This behavior varies from the MK3 which will pause at the printer.

*This does mean you will always get the prompt modal for every print, but you can click skip and
have it preserve the default behavior. In a future release, I will try to read ahead and figure out
if only one tool was used in the profile.*

### MK3s MMU 3.X.X - MMU State Detection

Expand Down Expand Up @@ -168,6 +182,7 @@ Payload:
previousTool: int
response: string
responseData: string
prusaVersion: string
}
```

Expand All @@ -187,12 +202,14 @@ Payload:
previousTool: int
response: string
responseData: string
prusaVersion: string
}
```

#### `plugin_prusammu_show_prompt`

The plugin heard a `Tx` and needs to prompt the user to pick the filament.
The plugin heard a `Tx` (or a print was started if you use are using an MK4) and needs to prompt
the user to pick the filament.

Payload: `None`

Expand Down Expand Up @@ -227,9 +244,12 @@ Response:
previousTool: int
response: string
responseData: string
prusaVersion: string
}
```

Response: None

### Exposed Javascript Functions

A small set of javascript functions are available to interact with. Look at the `getFilamentList()`
Expand Down Expand Up @@ -375,15 +395,17 @@ Special thanks to:
- [@skellied](https://github.com/skellied) for help with the initial release of MMU 3.0.0 support.
- [@Kevman323](https://github.com/Kevman323) for a significant revamp of the MMU 3.0.0 code,
cleaning up error codes, and bringing in more data to the nav.
- For help supporting the MK3.5/3.9/4:
- For help testing/supporting the MK3.5/3.9/4:
- [@AaronVARC](https://github.com/AaronVARC)
- [@Anubis1971](https://github.com/Anubis1971)
- [@BlueFyre](https://github.com/BlueFyre) - For the single print solution recommendation.
- [@jshank](https://github.com/jshank)
- [@Kjubyte](https://github.com/Kjubyte)
- [@MysticGringo](https://github.com/MysticGringo)
- [@MysticGringo](https://github.com/MysticGringo) - For testing so, so many version.

## Useful Link
- [MMU2 Commands](https://cfl.prusa3d.com/display/PI3M3/MMU2+commands)
- [Debugging MMU2](https://revilor.github.io/MMU2-Marlin/debugging.html)
- [Buddy Board Commands](https://help.prusa3d.com/article/buddy-firmware-specific-g-code-commands_633112)
- [MMU2 LEDs Meaning](https://help.prusa3d.com/article/mmu2s-leds-meaning_2187#red-light)
- [Octoprint Plugin Docs](https://docs.octoprint.org/en/master/plugins/mixins.html)
Loading

0 comments on commit c4534ed

Please sign in to comment.