23.09.2018, 13:05
(This post was last modified: 23.09.2018, 18:54 by Erwin van der Zwart.)
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,
Erwin
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:
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