09.06.2019, 22:09
(This post was last modified: 09.06.2019, 22:10 by Erwin van der Zwart.)
Hi,
Here is a sample of a scheduler + twilight + overrule button logic so you can see how to build it.
The inputs 32/x/x are tagged and the script is event based attached to the same tag.
BR,
Erwin
Here is a sample of a scheduler + twilight + overrule button logic so you can see how to build it.
The inputs 32/x/x are tagged and the script is event based attached to the same tag.
Code:
klok = '32/1/1'
schemer = '32/1/2'
overbrug = '32/1/3'
uitgang = '1/0/52'
waarde_klok = grp.getvalue(klok)
waarde_schemer = grp.getvalue(schemer)
waarde_overbrug = grp.getvalue(overbrug)
waarde_uitgang = grp.getvalue(uitgang)
if waarde_overbrug == true then
if waarde_uitgang == false then
grp.write(uitgang, true)
end
else
if waarde_klok == true and waarde_schemer == true then
if waarde_uitgang == false then
grp.write(uitgang, true)
end
else
if waarde_uitgang == true then
grp.write(uitgang, false)
end
end
end
BR,
Erwin