Logic Machine Forum
Help me creat feedbacks - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Visualization (https://forum.logicmachine.net/forumdisplay.php?fid=9)
+--- Thread: Help me creat feedbacks (/showthread.php?tid=3770)



Help me creat feedbacks - Bitto1998 - 23.12.2021

Hello, I have a problem with Logic Machine 5 Lite. The devices I have in my KNX bus system are very old and do not have group addresses for feedbacks. As a result, the objects I create do not have feedbacks. This means that the status of a luminaire or other switch object is not updated, so I do not have in my management the actual condition of the house. If I am in a remote area I can not know what the real condition of my house is. Is there a way to create virtual feedbacks?


RE: Help me creat feedbacks - Daniel - 23.12.2021

You should do it in ETS and configure your knx devices to send feedback. After that you can import it to LM.


RE: Help me creat feedbacks - admin - 24.12.2021

You can make simple status mapping via a single script. Add feedback tag to all control objects and map an event script to this tag.
Fill mapping table as needed. Table key (1/1/1, 1/1/3 etc) is the control address, key value is either a single status object address or a table containing multiple addresses.
Code:
mapping = {
  ['1/1/1'] = { '1/1/2', '1/1/9' },  
  ['1/1/3'] = '1/1/4',
  ['1/1/5'] = '1/1/6',
}

status = mapping[ event.dst ]
if type(status) == 'string' then
  status = { status }
end

if type(status) == 'table' then
  value = event.getvalue()
  
  for _, addr in ipairs(status) do
    grp.checkupdate(addr, value)    
  end
end

You will need additional scripts for more complex situations like setting light value to 0% should set binary status to Off.