13.05.2019, 06:17
Since your UP/DOWN object is 1 bit and you don't care about the value there's no need for comparison.
Another point is that event.getvalue() should be used instead of grp.getvalue(). Since the return value for 1 bit objects is true/false then comparison with 0/1 will not work.
You just need one line in your script attached to UP/DOWN object, change 1/1/2 to your LOCK object address:
Another point is that event.getvalue() should be used instead of grp.getvalue(). Since the return value for 1 bit objects is true/false then comparison with 0/1 will not work.
You just need one line in your script attached to UP/DOWN object, change 1/1/2 to your LOCK object address:
Code:
grp.write('1/1/2', true)