Posts: 27
Threads: 11
Joined: Mar 2023
Reputation:
0
If I have 700 1-bit GA, when they switch state I need it to happen 3 times, with 1 sec delay, what is the easiest way of doing this?
We have some KNX relays that is partially defective, and this is a quick workaround to get this working before the manufacture and the customer finds out if all the relays needs to be exchanged.
Best regards
Simon
Posts: 4814
Threads: 25
Joined: Aug 2017
Reputation:
217
Try this, Tag all your bit objects with a TAG and then create event based script triggered by your TAG.
As execution mode select Last instance and use this script
Code:
if event.sender ~= "se" then
value = event.getvalue()
os.sleep(1)
grp.write(event.dst, value)
os.sleep(1)
grp.write(event.dst, value)
os.sleep(1)
grp.write(event.dst, value)
end
------------------------------
Ctrl+F5
Posts: 4814
Threads: 25
Joined: Aug 2017
Reputation:
217
To use a global script on many objects you need some sort of repetitive relation between this group of objects, it can be by group address or by group name. In other word by knowing the input object (address or name) we need to create output object
What is the event object and what is the output.
------------------------------
Ctrl+F5
Posts: 4814
Threads: 25
Joined: Aug 2017
Reputation:
217
Are you trying to flick over the switch if status is different or the other way around?
------------------------------
Ctrl+F5
Posts: 32
Threads: 9
Joined: Oct 2023
Reputation:
1
In the case of:
- There is sent 1 to the switch.
- The feedback doesn't change from off to on
- I want to send 0 to the switch, then 1 to the switch, since that makes the feedback follow ( usually ).
Does that make sence?
Posts: 4814
Threads: 25
Joined: Aug 2017
Reputation:
217
do you want to write it to the bus or just update object in LM?
------------------------------
Ctrl+F5
Posts: 4814
Threads: 25
Joined: Aug 2017
Reputation:
217
Tag all your switch (T/S) objects but not the status FB and create event script triggered by your tag.
Execution mode - Fist instance only
Code:
if event.sender ~= "se" then
value = event.getvalue()
status, found = string.gsub(grp.alias(event.dst), 'T/S', 'FB')
if grp.find(status) then
if value ~= grp.getvalue(status) then
os.sleep(0.5)
grp.write(event.dst, not value)
os.sleep(0.5)
grp.write(event.dst, value)
end
else
alert('Group address '..status ..' does not exist' )
end
end
------------------------------
Ctrl+F5