Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SpoolManager errors trigger CPQ job retries #220

Open
Terandium opened this issue Mar 8, 2023 · 13 comments
Open

SpoolManager errors trigger CPQ job retries #220

Terandium opened this issue Mar 8, 2023 · 13 comments
Labels
bug Something isn't working

Comments

@Terandium
Copy link

Terandium commented Mar 8, 2023

Describe the bug
I have a g-code script that calibrates the bed, which only runs occasionally.
It extrudes no filament and thus has no filament usage data, the 2.4.0 release freaks out and keeps restarting the print.

The sys info:
octoprint-systeminfo-20230308210635.zip

And screenshots:
image
image
it just keeps repeating that and never starts the actual print
it does work with a g-code file that extrudes filament

bed calibration g-code (in case you need it):
G90
M140 S70 ; bed heating (non-blocking)
M104 S210 ; tool heating (non-blocking)
M190 S70 ; bed heating (blocking)
START_PRINT
G1 x220 y220 z10 f8000

@Terandium Terandium added the bug Something isn't working label Mar 8, 2023
@smartin015
Copy link
Owner

Thanks for the report... and sorry the new release broke your setup. Will await the sysinfo and screenshots.

@Terandium
Copy link
Author

No worries, bugs happen!
I have seen the new features in the preprocessors they look dope! Haven't had to use them just yet. But I most certainly will soon enough.

Hope the info provided can help you out

@smartin015
Copy link
Owner

smartin015 commented Mar 8, 2023

Oh I see, so this is a custom (in-queue?) gcode script that doesn't extrude anything. Does SpoolManager complain at all about the print file if you run it outside of CPQ, with the Print button?

Looking at the plugin code, it seems like it'll throw a warning but continue anyways if it thinks metadata is missing for the file. I'm torn between emulating SpoolManager's behavior here and preventing the queue from overrunning the spool if a file happens to have a metadata failure. What do you think?

Edit: maybe this suggests a patch is needed for SpoolManager, as "has metadata but zero filament length" is absolutely detectable from "has no metadata". Presumably it shouldn't even throw a warning if the gcode file has no extrusion in it.

@Terandium
Copy link
Author

If I run the file directly, it will give me a warning about the file containing no metadata.
However I always just click on continue as I know it has no metadata as it extrudes nothing ;)

I agree that this might require a patch from SpoolManager however I am uncertain if that dev replies. I think I have made an issue before there and it got ignored, but I am not 100% certain.

I do think that outside of what SpoolManager does the way CPQ handles it isn't "correct" either, as it just continues retries.

Also last time we spoke I wanted to use SpoolManager as a filament runout sensor, but I came to the conclusion it's too unreliable. I've gotten a filament runout sensor recently and I am using that instead.

@Terandium
Copy link
Author

I have created an issue at the SpoolManager repo, feel free to add any more info there.
OllisGit/OctoPrint-SpoolManager#318

@smartin015
Copy link
Owner

I do think that outside of what SpoolManager does the way CPQ handles it isn't "correct" either, as it just continues retries.

Yeah, that's definitely not great behavior either. I'll update it to pause the queue rather than keep retrying when SpoolManager errors or claims insufficient filament

Also last time we spoke I wanted to use SpoolManager as a filament runout sensor, but I came to the conclusion it's too unreliable. I've gotten a filament runout sensor recently and I am using that instead.

Interesting - is that due to SM missing extrusion so air-printing still happens? Or was there a different issue?

@smartin015 smartin015 changed the title SpoolManager integration broken SpoolManager errors trigger CPQ job retries Mar 9, 2023
@Terandium
Copy link
Author

Terandium commented Mar 9, 2023

Yeah, that's definitely not great behavior either. I'll update it to pause the queue rather than keep retrying when SpoolManager errors or claims insufficient filament

That works ^^ I am currently just manually running the calibration script and that works fine. As I only run it when I do some manual intervention anyways haha

Interesting - is that due to SM missing extrusion so air-printing still happens? Or was there a different issue?

I had some under-extrusion issues, that have been fixed by now.
But the filament isn't 100% accurate if the printer for example does something wrong and it skips the filament.
It loses accuracy, I've had it now once or twice where something went wrong in the middle of the night and it'll keep on printing in the air, as the filament got snapped in half.

So all in all, it's just not an accurate way of measuring it. If everything were to go right all the time, it would. But it simply doesn't always go right so it ends up being wrong. And a DIY filament sensor is like a few euros XD or even free if you have a bl-touch installed. (you will have a z-stop laying around)

@Terandium
Copy link
Author

Terandium commented Mar 10, 2023

Heyy last night it had filament left on the spool but the filament manager said it was empty, thus having it spam repeat.
I had to reset my print job history DB, as it had thousands of new entries (I'll remove all duplicates later by SQL, the interface is too slow to do so haha)

Anyways my question is, could you maybe add an option in the settings that will make it so continuous print ignores the values from the spool manager, the integration is neat but it doesn't always work (on the spool managers side) so maybe a potential opt-out, can be good? Because even if you fix the repeat issue, it'll still pause the print even tho I currently have a filament runout sensor and the spools in the filament manager aren't 100% accurate. (Do you want me to make a separate issue for this?)

tl;dr: have a opt-out in settings to ignore the filament remaining with the spool manager integration

@smartin015
Copy link
Owner

Damn. Yeah, probably should add a bulk history deletion option.

Rather than a setting, what about if CPQ skips checks if SpoolManager has no spools loaded (i.e. no "tools" with spools assigned)? I'm concerned yet another behavioral setting would get forgotten and folks would get confused as to why CPQ isn't referencing SpoolManager - this would make it so that spoolmanager configuration dictates CPQ's behavior. WDYT?

Regardless, I think we can keep it in this bug for now until plans have settled :)

@Terandium
Copy link
Author

I use another plugin for history, and that one got spammed. I think your history db didn't register it(unsure)

Anyways I get that an option would confuse people, thus my idea was an opt-out. So if you have spool-manager installed it's enabled by default, but you can disable it if needed.

Because in my case, sometimes the spool manager says a spool is out but there are still, for example, 100 grams left. This would then force me to manually change the spool amount remaining. Which is quite a nuisance as it happens quite often surprisingly.

At least that is my idea, as the integration works great, it's just that my spool manager isn't always 100% accurate as to what's actually on my spool. But I don't use it for that(not anymore at least) I use it for price calculation, history, and government inventory paperwork.

@smartin015
Copy link
Owner

I use another plugin for history, and that one got spammed. I think your history db didn't register it(unsure)

Ah, I see. Yeah, it's unavoidable for CPQ event triggered scripts to end up in another history plugin, since they're treated as scripts themselves.

...sometimes the spool manager says a spool is out but there are still, for example, 100 grams left. This would then force me to manually change the spool amount remaining. Which is quite a nuisance as it happens quite often surprisingly.

IMO changing the spool amount is about as much work as changing a CPQ setting in terms of clicks/keypresses. The solution I proposed was instead deselecting the spool as a way to "disable" CPQ spoolmanager checks, i.e. clicking the X button here:

image

In other words: no spool selected => no filament checking. Turning it back on is as simple as selecting the spool again.

At least that is my idea, as the integration works great, it's just that my spool manager isn't always 100% accurate as to what's actually on my spool. But I don't use it for that(not anymore at least) I use it for price calculation, history, and government inventory paperwork.

Agreed, even as a reference it's pretty handy. I do wonder what it'd take to make it more reliable, maybe for SpoolManager to support something like this spool weight sensor for more precise estimates.

@Terandium
Copy link
Author

Terandium commented Apr 18, 2023

IMO changing the spool amount is about as much work as changing a CPQ setting in terms of clicks/keypresses. The solution I proposed was instead deselecting the spool as a way to "disable" CPQ spoolmanager checks, i.e. clicking the X button here:

A bit late but I was thinking of not disabling it per spool, but to to just disable the entire pausing of queue when filament is out.
I need the queue selected like that for, price calculation, print history, etc. And it's accurate enough to show filament extruded.

But I would like the pausing of print when spool is out, disabled. As that functionality only backfires for me. As explained in: #230

@smartin015
Copy link
Owner

Gotcha - thanks for being patient on this as I've been a bit sidetracked with some other projects. Thanks for making this a separate FR as well :) let's continue the disable option convo there and leave this for the retry bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants