OctoPrint-SpoolManager icon indicating copy to clipboard operation
OctoPrint-SpoolManager copied to clipboard

Magic Spool Selection Comment for API Submitted gcode Files

Open tduehr opened this issue 3 years ago • 13 comments

I submit most jobs through the API with Cura or Prusa Slic3r. Being able to select the spool in GCODE would help me track filament usage correctly without having to open a browser every time.

tduehr avatar Jul 25 '20 13:07 tduehr

Hi @tduehr ,

this is a good idea and this is already on my long-term list, see Backlog: https://github.com/OllisGit/OctoPrint-SpoolManager/projects/1

OllisGit avatar Jul 25 '20 20:07 OllisGit

This issue has been automatically marked for closing, because it has not had activity in 30 days. It will be closed if no further activity occurs in 10 days.

stale[bot] avatar Sep 01 '20 20:09 stale[bot]

Hi @tduehr , do you know a "standard" gcode-comand to identify a spool selection? If I use a comment instead, like ;spool_selection=My Best Spool then I need to parse the file at the beginning. But this is not possible for SD-Card prints, because OP has no access to this. Or is there a "standard" comment in your slices for selecting a spool?

OllisGit avatar Sep 03 '20 21:09 OllisGit

@OllisGit maybe take advantage of the M118 gcode for SD card prints? So adding something like M118 A1 spool:My Best Spool to a gcode file before printing could signal the plugin to select that spool.

wchill avatar Sep 05 '20 00:09 wchill

I don't use the SD card myself so I'm tempted to say it's not really something you can do. M118 sounds like a good idea. It'd be nice if there was a way to do the spool selection that prusa slic3r uses.

How much of the print information from an SD print is available anyway? Should this be handled by some sort of manual process to add/modify a print?

tduehr avatar Sep 07 '20 14:09 tduehr

I think using the M118 command can be great and could be easily managed by the on_sentGCodeHook hook (cf. https://github.com/OllisGit/OctoPrint-SpoolManager/blob/master/octoprint_SpoolManager/init.py#L367). But, I can't see how we can ignore the Spool warning message without reading the GCode before.

Also, I suggest M118 A1 spool:<filament_id>:<spool_name> (or something like that) instead of ``M118 A1 spool:<spool_name>` to prepare for the multi-filament feature.

What do you think ?

xunleii avatar Sep 28 '20 16:09 xunleii

Better would be to replicate what OctoPrint-ActionCommandsPlugin is doing:

https://github.com/benlye/OctoPrint-ActionCommandsPlugin/blob/ed03e15e96f52140b4066d58ba069e3612cca30d/octoprint_actioncommands/init.py#L24

The hook there lets you inspect serial input coming from the printer, which works well when you use M118 and should work even for SD card prints. Though you're right, the spool warning might not be easy to fix without preprocessing.

wchill avatar Sep 28 '20 18:09 wchill

@OllisGit do you mind if I take this feature? I need something to work on for Hacktoberfest and I just recently got a MMU2S so it'll be useful for me anyway.

wchill avatar Sep 29 '20 00:09 wchill

This issue has been automatically marked for closing, because it has not had activity in 30 days. It will be closed if no further activity occurs in 10 days.

stale[bot] avatar Oct 29 '20 02:10 stale[bot]

I was going to put in this request. Is there any chance we can re-open this issue? I think it would be a great idea since you can set filament gcode in prusaslicer and possibility others?

samwiseg0 avatar Mar 06 '21 00:03 samwiseg0

This issue has been automatically marked for closing, because it has not had activity in 30 days. It will be closed if no further activity occurs in 10 days.

github-actions[bot] avatar Jan 15 '22 02:01 github-actions[bot]

fyi: Not closed any more, because I want to implement this in one of the next releases.

OllisGit avatar Jan 16 '22 09:01 OllisGit

Are there any news about this addition?

FabioForcina avatar Jan 14 '23 12:01 FabioForcina