NilsRo / OctoPrint-SlicerEstimator

GNU Affero General Public License v3.0
5 stars 1 forks source link

prusaslicer files give estimate intermittently, then reverts to null #8

Closed adcurtin closed 3 years ago

adcurtin commented 3 years ago

I've got the plugin set to prusaslicer, and my estimate is alternating between the correct time remaining, and null.

it looks like about every minute, the estimate is correct for 10 seconds, then null for the rest.

NilsRo commented 3 years ago

Hi.

Can you upload the gcode file or a octoprint log with the plug-in debug mode set. I sliced a testfile with the newest version of PrusaSlicer which run without issues but will check again.

Nils

adcurtin commented 3 years ago

how do I set debug mode on the plugin?

NilsRo commented 3 years ago

It is a general Octoprint function. You have to enable debug for octoprint.plugin.slicerestimator or something like this. After you reproduced the issue download octoprint.log from the same Place.

https://community.octoprint.org/t/where-can-i-find-octoprints-and-octopis-log-files/299

Activate ˋvirtual printerˋ if you like to do a simulated print.

As everything is contained in the Gcode file it would be another option.

cyrusjk commented 3 years ago

I am using PrusaSlicer and I am also getting nulls displayed

image

I get a value during the first layer but then blank after that. Nothing intermittent.

NilsRo commented 3 years ago

@cyrusjk Interesting, I cannot reproduce it with PrusaSlicer. Could you upload the debug logs and the GCODE file? Description you can find in the post before.

Do you perhaps use another plugin doing something special to the remaining printing time send via M73?

cyrusjk commented 3 years ago

I will try with a smaller file once my current print is done. In the meantime, here is a shot of my current listed plugins:

image

NilsRo commented 3 years ago

@cyrusjk I had installed also most if them. 2 Plugins injecting GCODE commands regarding print time to the printer commands. Detailed Progress and Octoprint-Display-ETA. You should disable the injection or delete one of them as both injecting the same which could be a problem in general. I tested Octoprint-Display-ETA which works fine.

By the way, PrusaSlicer would be the 3rd tool injecting progess information. As on the "Detailed Progess" Homepage a rotation is mentioned perhaps this is the cause for the intermediate display described by @adcurtin If this is confirmed I can change two things...try to get the GCODE before it is changed by the plugins or harden the RegEx to get the information from the GCODE.

I think a debug log will be fine as in my opinion it is not a problem with the GCODE generated by the slicer.

cyrusjk commented 3 years ago

Removed "Detailed Progress" and added in "PrintTimeGenius Plugin", and now I am seeing estimates intermittently. They are rounded off to the minute.

with: image

without: image

NilsRo commented 3 years ago

Without the debug log I cannot do anything. I need it for the analysis of the issue. But what you described shows we are on the right way.

cyrusjk commented 3 years ago

Just did a calibration cube.

debug_calibrations.zip

NilsRo commented 3 years ago

Hi @cyrusjk

I found the issue for this. There are unknown M73 commands in addition to the commands generated by PrusaSlicer. grafik

I still added to logging for this but the exception handling was wrong. So unknown commands run into the - estimation.

You can download a correction here and test it: https://github.com/NilsRo/OctoPrint-SlicerEstimator/archive/Development.zip Uninstall the plugin before and then use the link for installation in the plugin manager. It should show version 0.60 then. It also includes an update of the file browser if you upload a file to OctoPrint in its first version.

If you like to do a "virtual" print you can simply activate the virtual printer like shown here and connect to it instead: grafik

cyrusjk commented 3 years ago

Success! That does seem to remedy the issue for me using the virtual printer.

It would be nice to have seconds as well as minutes, but I know that the data PrusaSlicer provides doesn't have that.

NilsRo commented 3 years ago

Perfect.

The estimation handler is not called that often that it makes sense to do a calculation to fill the gap. But I will check this for a future enhancement, it should not be very complex to implement.

adcurtin commented 3 years ago

ah yeah the M73 Q and S are for stealth mode, and P and R are for regular mode.

This is awesome, thanks for fixing quickly :)