How to delay in Rules

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Cino2424
Normal user
Posts: 17
Joined: 30 Sep 2018, 16:35

How to delay in Rules

#1 Post by Cino2424 » 05 Jan 2021, 20:18

On shutdown do
gpio,5,0 //Prusa off
gpio,12,0 //Tronxy off
delay 15000
gpio,4,0 //rpi off
endon

This delay doesnt work. How can I change it, that I have a 15 sec delay?

Its for a bash script on RPI for Octopi.

TD-er
Core team member
Posts: 8752
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: How to delay in Rules

#2 Post by TD-er » 05 Jan 2021, 20:27

Don't use the delay command, but rather set a timer.
See "timerset" : https://espeasy.readthedocs.io/en/lates ... rSet#timer

Cino2424
Normal user
Posts: 17
Joined: 30 Sep 2018, 16:35

Re: How to delay in Rules

#3 Post by Cino2424 » 05 Jan 2021, 21:19

On shutdown do
gpio,5,0 //Prusa off
gpio,12,0 //Tronxy off
timerSet,1,15
endon

On Rules#Timer=1 do
gpio,4,0 //rpi off
endon

Will this work?

edit: it works, thanks

TD-er
Core team member
Posts: 8752
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: How to delay in Rules

#4 Post by TD-er » 05 Jan 2021, 21:53

You're welcome.

Just one final notice... when do you trigger this event?
After the prusa has cooled down?
Make sure to allow the Prusa's extruder to be cooled down below 50C or else you will end up with a clogged extruder some day.
It needs the fan to remain spinning to make sure the filament will not stick to parts that will not be heated in normal operation.

Cino2424
Normal user
Posts: 17
Joined: 30 Sep 2018, 16:35

Re: How to delay in Rules

#5 Post by Cino2424 » 05 Jan 2021, 22:06

I think Octoprint will set the moment to shutdown. I will look if there is such an option for cooldown.

Post Reply

Who is online

Users browsing this forum: No registered users and 132 guests