Logic Machine Forum
roll down shutter when theres an alarm - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: roll down shutter when theres an alarm (/showthread.php?tid=5424)



roll down shutter when theres an alarm - h5345 - 20.05.2024

hi, im trying to use a script to roll down a shutter when theres an alarm

alarm1 = grp.getvalue('0/0/x')
-- i dont know if im getting the shutter position right by getting the value from "movement in manual mode" object, 1.008
shutterposition = grp.getvalue('0/0/y')
if alarm1 then
if not shutterposition then
grp.write('0/0/x/', true)
end
end

i did try the script out and it was working but they told me today its not working. if the shutters half open, should the script still work?
there was also another object for height feedback (5.001 0-100%) but it wasnt getting updated for one of the shutter so i tried using the other object and im guessing its not getting updated correctly
should i be using 'feedback for last direction' object in the if statement?

edit: nvm, they told me its working. the script runs every 2 minutes and they didnt wait that time. i should probably switch it to event based


RE: roll down shutter when theres an alarm - admin - 21.05.2024

Do you really need to check the current shutter position? The shutter controller should have end detection sensors so if it's already in down position then simply nothing will happen.


RE: roll down shutter when theres an alarm - h5345 - 21.05.2024

(21.05.2024, 07:28)admin Wrote: Do you really need to check the current shutter position? The shutter controller should have end detection sensors so if it's already in down position then simply nothing will happen.

for some reason i kept hearing the knx shutter modules relays changing their position


RE: roll down shutter when theres an alarm - h5345 - 22.05.2024

(21.05.2024, 07:28)admin Wrote: Do you really need to check the current shutter position? The shutter controller should have end detection sensors so if it's already in down position then simply nothing will happen.
is this the right way to make the comparison in the if stament

if x <= 99 then

where x is the height feedback for the shutter(5.001 data type 0-100%)?


RE: roll down shutter when theres an alarm - Daniel - 23.05.2024

Yes, post your full script if you want us to check it. You can use script helper, there is also Code shortcut(top right corner) if you not sure how some code should be typed.