I like to parse comments "; Blabla" during printing but the handlers like octoprint.comm.protocol.gcode.queuing or the events does not publish comments stored in the GCODE file. Does anybody know if it is possible to get comments of the line actually processed by OctoPrint?
No, I need it during printing as I like to read out the remaining print time added by Cura. As a workaround I can add M117 but I like to build it with the standard comments.
If that it actually not possible I could perhaps add a new event in Cura itself. Does OctoPrint ignores comments in building the queue (that would be I expect…)? So perhaps I can add a event or hook there…
the @ command won't get processed by your printer and therefore not available with SD printing. Hooks — OctoPrint master documentation. You can get around that using M118 action/echo commands and then snagging it with the gcode received phase to act on to be more real-time information so replacing ;TIME_ELAPSED 123 with M118 TIME_ELAPSED 123 would then send back to the plugin the TIME_ELAPSED 123 bit...
Hello, this is my first post. I actually searched for the same kind of issue raised in this post. When there is no way to have octoprint read scripts while printing, is there another way to have, for example, the nozzle wiped every 3 millimeter in Z? Or maybe whipe the nozzle at every pause? I have to learn a lot of things and this “break in” during printing would be very helpful if its possible. Thx.
you'd have to do that in slicer I think. closest thing I've seen to what your asking for was using the EasyServo plugin to perform the actions of moving the nozzle over to the side and wiping it with a bruch attached to servo on every layer change.
Yes. In cura its no problem to set it to wipe it at every layer. But im not sure it will improve the print by having the nozzle enter the print every layer from outside. I hoped to find a way to set it to wipe every 2 or 3 mm in Z height (every 10 layers?).
Its not that its impossible to pause the print and perform a nozzle wipe or some other action. Pressing pause does this.
Im going to edit the pause script to perform a nozzle wipe every time i press the pause button, but it would be so helpful if octoprint monitors the Z-height and pushes for this nozzle wipe every moment you want to have the nozzle cleaned.
For PETG its not a problem, for PLA it is. The amount of force when the nozzle hits a hard blob of PLA is too much
I implemented a first version with hook octoprint.filemanager.preprocessor to add AT commands and it works very fine. Before I used the FILE_ADDED event but then the file is available a short time in old format. I ask me if I can do all file scanning in the preprocessing also which would save time but as the file is not copied to the final folder I am not sure if the metadata should be set at that step.
What I like to do:
pre-process file and change the content - gather metadata information also in that step as all lines are read...
write the extracted information to file metadata. ; But what would be the best step to store metadata with set_additional_metadata to the file? Still the FILE_ADDED event as in the pre-processing hook I cannot write it. I am afraid if the user is "fast" he can upload the next file before everything is stored...
Ok, that would be similar to pass the logger only. Checked the simply print plugin plugin but it has one class only. But anyhow, if that is a good solution to pass the logger (or plugin class) it is fine.