OctoPrint-IFTTT icon indicating copy to clipboard operation
OctoPrint-IFTTT copied to clipboard

Insert a delay

Open terrorhai opened this issue 5 years ago • 10 comments

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 avatar Oct 06 '19 15:10 terrorhai

@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 avatar Oct 08 '19 13:10 tjjfvi

@tjjfvi is it not possible to use time.sleep()?

greghesp avatar Jan 05 '20 21:01 greghesp

@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.

tjjfvi avatar Jan 07 '20 14:01 tjjfvi

can you not use add a G4 in the post-printing Gcode.

moltra avatar Jan 16 '20 01:01 moltra

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 avatar Feb 12 '20 21:02 NicolasReyrolle

@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.

tjjfvi avatar Feb 13 '20 02:02 tjjfvi

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.

JustinByrne avatar Mar 07 '20 09:03 JustinByrne

That's exactly what I've done. Works great

greghesp avatar Mar 07 '20 09:03 greghesp

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).

MauroLXX avatar May 18 '20 13:05 MauroLXX

can we have this feature please build in in the plugin? this would be awesome! +1 from me!

sbaghdadi avatar Feb 24 '21 14:02 sbaghdadi