12.04.2024, 09:21
Hi Everyone.
Question one:
This is a scheduled script (script name: Ligths_UP), is there at way to enable/disable it by the use of a grp.adress?
e.g:
if start == true then
script.enable(Ligths_UP)
else
script.disable(Ligths_UP)
Question Two:
When this script is started i can't stop i from running again.
It will only stop when value_end is reached.
Is there a way to stop it halfway?
value_sek = grp.getvalue('32/1/4')
value_end = grp.getvalue('32/1/3')
start = grp.getvalue('32/1/1')
-- UP
output = '32/1/2'
for i = grp.getvalue(output) + 1, value_end, 1 do
grp.write(output, i)
os.sleep(value_sek)
end
Best regards
Timmi Andersen
Denmark
Question one:
This is a scheduled script (script name: Ligths_UP), is there at way to enable/disable it by the use of a grp.adress?
e.g:
if start == true then
script.enable(Ligths_UP)
else
script.disable(Ligths_UP)
Question Two:
When this script is started i can't stop i from running again.
It will only stop when value_end is reached.
Is there a way to stop it halfway?
value_sek = grp.getvalue('32/1/4')
value_end = grp.getvalue('32/1/3')
start = grp.getvalue('32/1/1')
-- UP
output = '32/1/2'
for i = grp.getvalue(output) + 1, value_end, 1 do
grp.write(output, i)
os.sleep(value_sek)
end
Best regards
Timmi Andersen
Denmark