Closed puterboy closed 7 months ago
Any reason why this patch (or similar) has not been included? The duplicate email messages on pause are annoying :)
I have been tied up with other priorities.
Since you seem to be very close to having a fix. Can you send a PR, hopefully tested on your own printer?
I posted a simple patch above :) Do you need it in another format?
Yes it'll be great if you can send it in as a PR. Also please do as much testing as you can on your end.
Just sent a PR. My ultimate change was simpler and cleaner. For reference the patch is:
--- gcode_hooks.py.orig 2022-12-27 11:58:30.611436571 -0500
+++ gcode_hooks.py 2022-12-27 11:29:10.691600082 -0500
@@ -21,6 +21,7 @@
return line
def check_for_filament_change(self, gcode=None, line=None):
+ if gcode:
self.num_gcode_until_next_filament_change -= 1
if self.num_gcode_until_next_filament_change > 0:
return
@Kevin - what is the status of this? Thanks
@puterboy Sorry for the delay. Have been really tied up with other tasks. But this is an important issue. So will probably get around to it next week.
I'm getting a filament change notification every 10 minutes for a print that was finished over 10 hours ago. Is there a fix?
I'm getting a filament change notification every 10 minutes for a print that was finished over 10 hours ago. Is there a fix?
This issue was actually fixed (this is why you are not getting notifications every 50s). I'm closing this. Please open another issue.
Two related bugs with the same one line fix.
Pausing (whether from Octoprint or from Printer console) causes an erroneous email saying that "Your print job requires filament change."
An actual filament change event (e.g., M600), causes multiple repeat such emails every 50 seconds, rather than a single email.
The cause is due to the line in gcode_hooks.py:
if "m600" in lineLower or "fsensor_update" in lineLower or "paused for user" in lineLower or "action:paused" in lineLower:
In case #1, there are no more subsequent m600 gcodes or lineLowers that trigger this again. In case #2, the printer (or at least my Prusa), sends the line
echo:busy: paused for user
every second, resulting in a new event being triggered every 50 loops or every 50 seconds as the variableself.num_gcode_until_next_filament_change = 50
decrements.So this explains the behavior. Patch is simply to change the above line to:
if "m600" in lineLower or "fsensor_update" in lineLower
Patch is simply: