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.

How to control event based script
#1
I have a event based script, that turns off the toilet light after ten minutes. This is working very well, but I want to control the script so that if we have guests we can turn it on while the guests are here. The Gira tastsensor with three rows are somewhat difficult for everyone to read.

I have created a virtual object thet I can control with a mosaic widget. If I set it to off the script turns off the light after ten minutes. If I set it to on the lights stays on.

Problem is it is not working. Here is the script

value = event.getvalue(0/2/10)
keep_on = grp.getvalue(32/1/4)
if keep_on == false then
if value == true then
os.sleep(600)
grp.write('0/2/10', false)
end
end
Reply


Messages In This Thread
How to control event based script - by 02dag - 22.09.2018, 18:50

Forum Jump: