bchanudet / OctoPrint-Octorant

Discord plugin for OctoPrint
MIT License
26 stars 14 forks source link

Incorrect Progress Messages #46

Closed recrudesce closed 1 year ago

recrudesce commented 4 years ago

I have OctoRant installed, and it will happily message my Discord channel when the printer is online/offline etc. But it will never send a progress message even when set to notify at 1%.

I suspect this is due to me having Dashboard, PrimeTimeGenius or the DisplayLayerProgress plugin installed.

Any thoughts as to what I can check ?

recrudesce commented 4 years ago

OK, they are coming through, they're just not at the % that's shown in Octoprint. Like I'm getting a 30% complete message when the print is about 50% complete.

I guess it's pulling the progress from somewhere else than the data being displayed ?

recrudesce commented 4 years ago

It sent a 80% complete when the job showed as 75%, and then sent a 90% complete when the job was at 78%.

I guess there's a disconnect between the plugins I have and the data OctoRant is reading.

bchanudet commented 4 years ago

Hello there!

Thanks for your feedback and ongoing investigation, greatly appreciated!

OctoRant uses the "official" ProgressPlugin Mixin provided by OctoPrint to get what the progress of the current print is.

What is most likely happening is that PrimeTimeGenius computes its own progress value, shows it in the UI in place of the progress computed by OctoPrint, but doesn't replace it on the server side, and thus OctoRant continues to receive the incoherent progress value from OctoPrint.

This is based on a very quick investigation, I'll need to have a closer look at it. This is not the only report I had on the progress part of the plugin (cf #31, #37 and #41), so I think it's time I get on it.

Fank commented 3 years ago

I noticed the same issue, that the percent which is posted is not the same percent i see from the bar in octroprint. This is my best example, check the percent vs time vs timestamp: Format: 📢 Printing is at {progress}% running for {spent_formatted}, remaining {remaining_formatted} image

I was using the https://plugins.octoprint.org/plugins/DisplayLayerProgress/ before, because i thought it may collide with the percent progress and removed it, but still same behaviour.

bchanudet commented 3 years ago

Hi @Fank and thank you for your report :)

I'll have a closer look at the code handling the progress of the print and do some tests on my side. I'm also thinking about implementing other ways to track the progress of a print job. It should all land in a 1.3.0 version, though I can't really give a release date for now.

Fank commented 3 years ago

Not sure if helpfull but the worst example i had: image

CCR6SE_Plate_v9.gcode

Maybe helps debugging