OctoPrint-IFTTT
OctoPrint-IFTTT copied to clipboard
Insert a delay
Hey, cool project! Actually I control my printers with Philips Hue and Osram Smart+ 230V Plugs. I can easily shut the printer down after the print finishes, but I want to cooldown the nozzle before. Inserting a delay from IFTTTs side is pretty hard and has unnecessary steps involved, so how can I add a 5 minutes delay before sending the printer shutdown action over to IFTTT?
@terrorhai There is no way to do that from this plugin currently; in the past I have used this tutorial. I would recommend following that guide. While it is annoying, it’s the best way ATM, and adding a delay to this plugin would add a bit of complexity.
(a PR to add this feature would be welcomed)
@tjjfvi is it not possible to use time.sleep()
?
@greghesp I don’t exactly know how time.sleep
works, but I suspect I would have to use something different (more like JS’s setTimeout
), as all of the different triggers are processed in a loop.
can you not use add a G4 in the post-printing Gcode.
Hi @moltra, could you explain? I was here for exactly the same request (btw, @tjjfvi , thanks a lot for your plugin, this is a must have if you want to shutdown your printer when job is done), a delay looks easier, but if you can wait for the trigger, this is fine.
I have some doubts, because on my ender 3 even the default end sequence of Cura has no time to execute:
...
G1 X0 Y{machine_depth} ;Present print
...
This is never executed, the nozzle almost stays at its latest position; This is definitely too fast for me
@NicolasReyrolle I think @moltra was referring to adding a G4
wait command to the print end gcode, so the print wouldn’t actually finish until the time was over.
In Cura add a G4 S300
to your end script after the G1
command. This will pause the print for 5 Minutes. Have a look https://marlinfw.org/docs/gcode/G004.html for more details about the G4
command.
That's exactly what I've done. Works great
Hello, you can also use: M109 R40 ; waits until hotend temperature cools down to 40 degrees
That could be even better because you don't need to estimate any time. PrintDone event will occurr as soon as hotend reaches the target temp (R40).
can we have this feature please build in in the plugin? this would be awesome! +1 from me!