Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question regarding !filament_names! #627

Open
tom-lp-at opened this issue Feb 8, 2025 · 1 comment
Open

Question regarding !filament_names! #627

tom-lp-at opened this issue Feb 8, 2025 · 1 comment
Labels
believe fixed / answered The bug is believed fixed in latest release

Comments

@tom-lp-at
Copy link

tom-lp-at commented Feb 8, 2025

I have
MMU_START_SETUP INITIAL_TOOL={initial_tool} REFERENCED_TOOLS=!referenced_tools! TOOL_COLORS=!colors! TOOL_TEMPS=!temperatures! TOOL_MATERIALS=!materials! FILAMENT_NAMES=!filament_names! PURGE_VOLUMES=!purge_volumes!
in my Start-machine-GCode.

If i upload the sliced GCode, the following Error comes up in Klipper:
Malformed command 'MMU_START_SETUP INITIAL_TOOL=0 REFERENCED_TOOLS=0,1,2,3 TOOL_COLORS=FFFFFF,0100FF,000000,FFBD00 TOOL_TEMPS=245,240,245,240 TOOL_MATERIALS=PETG,PETG,PETG,PETG FILAMENT_NAMES="Mercury Devil PETG - MMU Weiss - Kupfer","Mercury Devil Design - PETG - MMU - Blau #21","Mercury Devil PETG - MMU SW - Kupfer #29","Mercury Devil Design - PETG- MMU - Orange #42" PURGE_VOLUMES=0.0,150.0,80.0,241.0,250.0,0.0,80.0,591.0,560.0,308.0,0.0,601.0,389.0,258.0,117.0,0.0'

If i change the GCode and reduce the FILAMENT_NAMES to:
"Weiss-Blau-SW-Orange"
it will accept the GCode-File.
I search around regarding "!filament_names!" in the Start-GCode, but can´t find a definition for this command. I think it must be in the Slicer (Orcaslicer by the way) for sure. I searched in the manual from OrcaSlicer and SuperSlicer. I searched also in context of Klipper, but has no success...

I can´t figure out what's wrong with the used and exported Filamentnames.
TBH: the same String of filament names is placed into "filament_settings_id" in the GCode-File. So i have to changed it too.
edit: after some tests i found out that the "#" Character brings up the error... so the question is: is HH responsible for the string or Klipper?

@moggieuk
Copy link
Owner

The HH moonraker plugin is responsible for substituting any placeholder token of the form !xxx!. This is because many of these are not available from the slicer. You are correct that most slicers add the filament names with the following metadata line:

; filament_settings_id = "name", "name", "name", ...

Happy Hare will preprocess this and set !filament_names so it can be passed into the print start macro.

Now klipper has a big problem parsing "#" characters on the command line so they should be stripped. I'll can add a fix to strip them when they are parsed but the easiest solution for now is to remove them from your slicer or editing the ccode file after it has been uploaded to remove the "#" character..

@moggieuk moggieuk added the believe fixed / answered The bug is believed fixed in latest release label Feb 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
believe fixed / answered The bug is believed fixed in latest release
Projects
None yet
Development

No branches or pull requests

2 participants