Skip to content

Adding Prusa XL/XL+ Fix plugin - #1497

Merged
jneilliii merged 2 commits into
OctoPrint:gh-pagesfrom
anuzellig:gh-pages
Oct 23, 2026
Merged

jneilliii merged 2 commits into
OctoPrint:gh-pagesfrom
anuzellig:gh-pages

Conversation

@anuzellig

Copy link
Copy Markdown
Contributor
  • [ X] You have read the "Registering a new Plugin" guide.
  • [ X] You want to and are able to maintain the plugin you are registering, long-term.
  • [X ] You understand why the plugin you are registering works.
  • [X ] You have read and acknowledge the Code of Conduct.

What is the name of your plugin?

Prusa XL/XL+ Fix

What does your plugin do?

A fix for an incompatibility introduced with Prusa firmware 6.10.x and later

Where can we find the source code of your plugin?

https://github.com/anuzellig/octoprint-prusa-xl-fix

Was any kind of genAI (ChatGPT, Copilot etc) involved in creating this plugin?

Yes

Is your plugin commercial in nature?

No

Does your plugin rely on some cloud services?

No

Further notes

@jneilliii

jneilliii commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

@anuzellig, I was looking at your plugin; to me it looks way over complicated for what it is patching. I'm sure this is mostly because of AI, but I was curious if you would be open to accepting a refactor. I want to give you credit for what you figured out, but I think this would be much simpler as a single file plugin.

I put this together just now and was hoping you could test it. All you would need to do is disable the plugin you made in plugin manager and then copy/paste the URL below into plugin manager > get more > ...from URL and click install.

https://gist.githubusercontent.com/jneilliii/5198b0e5a0057f57821459dec510a659/raw/e503a069632d39cee29546341e353b26065853ff/prusa_toolhead_patch.py

@anuzellig

Copy link
Copy Markdown
Contributor Author

You're right, that was way too convoluted. I tested it and your code works, thanks for the re-write. It can actually be little bit simpler because the commands don't need the current toolhead, just any valid toolhead. This one uses T0 because I assume that would always be available, but if you think it's best to use the current toolhead that works too:

https://gist.githubusercontent.com/anuzellig/28f183852b4a83e1746eb7a703a20fbd/raw/929f0d3464abc00c56a0b51b7d242ac07c1a7954/prusa_firmware_toolhead_patch.py

Let me know if you think this should be published in the plugin repository or via some different method. Whatever is easiest for you folks. No concerns about credit from my side, I'm just happy for the fix to get out there.

@jneilliii

Copy link
Copy Markdown
Contributor

Thanks for testing and verifying. I wanted to keep the currentTool there in case there was plans on making it act differently in the future by Prusa. Not sure what they have in the works related to multiple toolheads, INDX, and what not. There could be a reason that they added those parameters into the code to address specific tools during swaps or something.

@anuzellig

Copy link
Copy Markdown
Contributor Author

Looks like I misspoke, in some cases there is no current tool when these commands run. So this version tries to select the current tool and if there is none defaults to T0. Same URL:

https://gist.githubusercontent.com/anuzellig/28f183852b4a83e1746eb7a703a20fbd/raw/19b62736fb55eb14c4a7f4268007d65c10867ba8/prusa_firmware_toolhead_patch.py

@jneilliii

Copy link
Copy Markdown
Contributor

Slightly different implementation, with the addition of a software update hook and slight change to the conditional logic. Thinking about it a little, I assume there could be a condition where currentTool is not defined and the command includes a different tool assignment. This would lead to sending the command with two "T" parameters. If my change of checking just to see if "T" not in gcode.upper()" is too broad, could switch that to a regular expression match instead.

https://gist.githubusercontent.com/jneilliii/5198b0e5a0057f57821459dec510a659/raw/8be5b0a5b312c2f62d1e81aa88b9f373bdfda826/prusa_toolhead_patch.py

@anuzellig

Copy link
Copy Markdown
Contributor Author

Good catch. I think this will be fine, because for the GCODE commands we're modifying T always means toolhead. I'm testing it now and so far so good. I'll let you know how it goes once the print is finished.

@anuzellig

anuzellig commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor Author

Confirmed the new patch worked with a multi-tool print. Should submit a new PR?

@jneilliii

Copy link
Copy Markdown
Contributor

I'll register it tonight after work. @foosel once that's done, wondering if something in firmware check plugin could be added to point to the plugin/FAQ entry?

@foosel

foosel commented Oct 22, 2026

Copy link
Copy Markdown
Member

In principle yes. We'd just need to find a good way to detect the situation. I'm not deep enough into the discussion at the moment to know what would be the best approach, firmware name/version? Behaviour?

@anuzellig

anuzellig commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor Author

In theory this patch should be applicable to any Prusa printer running firmware 6.10 and later. However so far I've only seen reports of successful tests with the XL and XL+. IMHO it's probably best if it's left up to the user to enable the patch, at least for now until we know for sure if this is needed (or has no negative effects) with other models.

@jneilliii
jneilliii merged commit 6ff76dc into OctoPrint:gh-pages Oct 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants