04.10.2018, 10:08
(23.09.2018, 13:05)Erwin van der Zwart Wrote: Hi,
event.getvalue() already knows it's current event.dst, so you don't need to pass a variable to the function.
This script below also kills a eventual parallel running script:
BR,Code:keep_on = grp.getvalue('32/1/4')
if keep_on == false then
value = event.getvalue()
if value == true then
tpid = storage.get('PID:' .. _SCRIPTNAME)
if tpid ~= nil then
os.kill(tpid, signal.SIGKILL)
end
pid = os.getpid()
storage.set('PID:' .. _SCRIPTNAME, pid)
os.sleep(600)
grp.write(event.dst, false)
storage.delete('PID:' .. _SCRIPTNAME)
end
end
Erwin
Hi Erwin,
just a clearify. This script above you mean to add in the same event base script created or we have to add another event base script?
Thanks.