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.

Event Scripting
#1
Hello,
I am using event script to control auto/manual function for heating system.

If the users set manual, it will turn the auto after the entered time. But I have two question;

1- How can I stop the timer if user set the auto before the entered time expires?
2- How can I retrigger the delay time if the user set auto before the entered time expires and then set manual with new time? 

Thanks.

The event script is;

Code:
--auto/manual status
value = event.getvalue()
--duration of manual in minute
duration = grp.getvalue('33/1/53')
second = duration * 60
if value == false then
  os.sleep(second)
    grp.write('33/1/55', true)
end 
Reply
#2
In 2023 fw you have Execution mode for event scripts, Select Last instance only then every new trigger of the script will kiill all old ones.
------------------------------
Ctrl+F5
Reply
#3
Hello Daniel,

Thanks for reply.

The fw is 20211215 and is it possible to do that with script?
Reply
#4
I think yes, just check in event script settings.
------------------------------
Ctrl+F5
Reply
#5
Hi Daniel,
There is just "execute on group read" check box on script settings.
Reply
#6
Just below this should be Execution mode:
Seems not in this fw yet
------------------------------
Ctrl+F5
Reply
#7
Hi Daniel,
Is it possible to adding some code to script to solve this?
Reply
#8
Yes but it is much simpler to just upgrade fw.
This script has PID kill
https://forum.logicmachine.net/showthrea...5#pid18555
------------------------------
Ctrl+F5
Reply
#9
Thanks, but it is too complex for me.
Reply
#10
Then install 2023 firmware.
Reply


Forum Jump: