09.10.2020, 21:33
(This post was last modified: 09.10.2020, 21:35 by Erwin van der Zwart.)
Try this as event based on the TAG "cancello":
Code:
if event.getvalue() == true then
previouspid = storage.get('PID:' .. _SCRIPTNAME)
storage.set('PID:' .. _SCRIPTNAME, os.getpid())
if previouspid then
os.kill(previouspid, signal.SIGKILL)
end
night = grp.getvalue('32/1/6')
if night == true then
grp.checkwrite('0/0/84', true)
os.sleep(600)
grp.checkwrite('0/0/84', false)
end
storage.delete('PID:' .. _SCRIPTNAME)
end