This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Simple event-based script
#8
(25.02.2017, 08:09)Erwin van der Zwart Wrote: Hi,

os.sleep only stops the script where it is used, for event based scripts take into account that each event  creates a new script procedure, so if you use os.sleep in a event based script you might have multiple instances of this script running in parallel. We have a small script to kill the previous script with os.sleep to avoid this.

BR,

Erwin

Hi Erwin,


where can I find this small script?
 
I want to start a toilet ventilation.
After light goes on wait for 1 minute then turn on ventilation for 2 minutes.
 
It would be possible somebody else goes to the toilet in that time.
 
Or maybe better turn on ventilation when light goes out.



Thanks John.
Reply


Messages In This Thread
Simple event-based script - by Superjohn - 07.02.2017, 19:13
RE: Simple event-based script - by Superjohn - 08.02.2017, 06:03
RE: Simple event-based script - by Superjohn - 13.02.2017, 20:32
RE: Simple event-based script - by Superjohn - 24.02.2017, 19:44
RE: Simple event-based script - by mlaudren - 24.02.2017, 21:30
RE: Simple event-based script - by Superjohn - 20.01.2018, 07:36

Forum Jump: