j7126 / OctoPrint-Dashboard

A dashboard for Octoprint
GNU Affero General Public License v3.0
288 stars 39 forks source link

Extruder filament widget not working correctly #309

Closed georgandersen closed 2 years ago

georgandersen commented 3 years ago

Describe the bug Extruder widget not counting To Reproduce Steps to reproduce the behavior:

  1. Widget not counting
  2. On refreshing the page gives numbers in 1000 of meters
  3. Tried om two different printers, with two slicers (3ds and superslicer) same result
  4. Installed version 18.3 and everything works (installed 19.1 and the problem reoccurs)

Screenshots Ashampoo_Snap_6  november 2021_19h35m46s_001_

Ashampoo_Snap_6  november 2021_19h36m47s_002_

Files (please attach the following Files or screenshots when applicable):

OctoPrint server and Plugins:

Desktop (please complete the following information): Windows 10 Chrome 3dS and superslicer Logs octoprint (1).log

Additional context Problem solve for now by going back to ver 18.3 at least for me.

georgandersen commented 3 years ago

Tried 1.19.5, - same issue as previously reported . Gone back to 1.18.3

steadyaero commented 2 years ago

I will cross post my comment here from a different thread with a similar issue: https://github.com/j7126/OctoPrint-Dashboard/issues/315#issuecomment-987051744

j7126 commented 2 years ago

Hi, sorry I have taken so long to get to this issue, please can you upload the gcode file that you were printing when you experienced the issue.

georgandersen commented 2 years ago

Ashampoo_Snap_11  december 2021_17h22m47s_002_

krukke 50mm laag_0.2mm_PLA_ENDER3BLTOUCH_36m.zip

Troox73 commented 2 years ago

Here another one, hope you need it ;-) Zwischenablage02 sample.zip

Octoprint on Pi4 with Ender 3 Pro / Prusa Slicer

colindawson commented 2 years ago

I'm getting this happening as well. Every print that I do, doesn't matter if I use Cura or Simplify3D to slide. The filament amount is always wrong.

image

The filament length in the dashboard doesn't seem related to the filament used in the print.

colindawson commented 2 years ago

I've taken a quick look at this it appears from what I'm seeing is that the problem is in the data being fed to the onDataUpdaterPluginMessage function. So it looks like the data that's comming in from octoprint itself either corrupted, or not in meters. Looks to me like this needs to be fixed in the octoprint source, not the dashboard.

georgandersen commented 2 years ago

Looks to me like this needs to be fixed in the octoprint source, not the dashboard.

The issue started after version 18.3. So i am used 18.3, where everything works fine, also after upgrading Octoprint.

j7126 commented 2 years ago

Looks to me like this needs to be fixed in the octoprint source, not the dashboard.

@colindawson the onDataUpdaterPluginMessage is just a way of passing data from the back-end of octoprint to the front-end. This line here: if (plugin == "dashboard") { means that all these messages are in fact coming from the back-end of dashboard, not from octoprint, so it is indeed an issue with dashboard.

j7126 commented 2 years ago

This is related to the new gcode processing that was introduced recently in dashboard, as it seems to be having some issues interpreting gcode from any Slic3r++ forks, such as PrusaSlicer, SuperSlicer etc.

j7126 commented 2 years ago

image

j7126 commented 2 years ago

Ok so I think that I may have solved this issue. It seems that the cause was dashboard was not correctly handling the G92 GCODE command. I will make a new release soon.

j7126 commented 2 years ago

New version released

colindawson commented 2 years ago

@j7126 awesome. I'm not fully up to speed with Python, just started doing some MicroPython recently (YAY RP PICO) and was trying to apply what I know from other programming languages. I'm not familiar with the architecture of Octoprint and the plug in mechanism, hence why I thought I was coming from the OctoPrint source. Sounds like my pointer helped to narrow down where the problem was a bit. Hopefully, next time, I'll know to keep digging so that I can find the true source of the problem, and not just stop half way to the root.

Thank you for fixing this. Glad it sounds like it wasn't too difficult in the end.