Klipper print history doesn't count "print duration" or "used filament" when using T1

I have a dual-extrusion printer (Replicator 2X). I pretty much only use only one tool in a print.

On the print history page, all prints have a correct “total duration”.
Prints using T0 have correct print duration and used filament.
But prints that use T1 have 0m 0s for print duration, and 0.0mm (or sometimes nonsense negative numbers) for used filament.

Here’s a screenshot and my klippy.log. Any ideas?


klippy.zip (1.2 MB)

Seems that sometimes the print duration does show correctly with T1 (1 and 3), but the used filament is still nonsense. I definitely didn’t use only 3mm of filament for a half-hour print (1), or 150mm for a 4.5-hour print (3). Print 2 was also with T1 but there’s again just nothing for print duration and used filament.

Given the lack of replies, is there a different place I should go to get help with this issue?

You may try here:

1 Like

So after going to the Fluidd github and creating an issue, they say they pull the data directly from Moonraker so I should talk to them. Made a Moonraker issue, and they say they get the data from Klipper.

The Klipper github doesn’t allow issues to be created and refers back here, so I guess I’m here again.

Could I get this topic moved into General Discussion?

I am running a fork of Klipper that provides MightyBoard support. I can’t try unmodified Klipper because my printer simply won’t work. Can anybody else with multiple tools replicate this behavior? Run a print using only T1 (or probably any non-T0 tool) and check the print statistics/history afterwards.

Edit: Those two github issues, for reference:

Could a moderator move this to the general section? Else I’ll just make another topic there in a few days.

I noticed that during the print, filament is being tracked correctly, but once it finishes, the value corrupts. This is also the value shown in the history. The print duration is still zero but total duration is correct.


image

Klipper does not recognize or support T0, T1, etc. If your fork implemented those as native commands then that’s probably where the problem is.

I have T0/T1 implemented as macros that call ACTIVATE_EXTRUDER.

[gcode_macro T0]
gcode:
    SET_GCODE_OFFSET X=0 Y=0
    BED_MESH_OFFSET X=0 Y=0
    ACTIVATE_EXTRUDER EXTRUDER=extruder

[gcode_macro T1]
gcode:
    SET_GCODE_OFFSET X=-35 Y=0
    BED_MESH_OFFSET X=35 Y=0
    ACTIVATE_EXTRUDER EXTRUDER=extruder1