Possible to edit the queued gcode?

Is there any way to edit the queued gcode commands in OctoPrint?

I have a print that is currently paused by an M600 command that came from Vitor's enclosure plugin; however, due to an odd issue with the plugin settings (I have the timeout set to 3600 seconds, but it sends 2 per minute), there are about 160 additional M600 commands queued up behind this one...so my choice is to either babysit the printer through 160 filament change procedures, or cancel the print and start over. Unless there's a way I can go into the backend and remove all those extra M600 commands. I'm quite handy on the command line...

It's probably cached somewhere in OctoPrint, I'd guess. So (I theorize), any edits to the code file wouldn't affect the currently-running print job.

I've written a cool plugin to comment out any G29 commands when seen but that requires a restart of OctoPrint to turn it on/off so that approach isn't useful to you in this scenario. If you could get at the cached copy in memory, replacing M600 with ;600 wouldn't change the file offsets throughout, at least in theory anyway.

I have a use case for for modifying temps. I have set of my production gcode that I print in my ever growing farm. A prompt to change temps after gcode is loaded I GUI be before print begins is what I'm thinking.

Where can I find your plugins?

Here's the particular plugin. You could take the code and change it for what you're attempting to do.

1 Like