This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

array of group addresses
#1
Hello. I have a task to write an array of identical values to a large number of group addresses (~200) ( like grp.write('1/*/*', value)). How can this be done using array commands?
Thanks
Reply
#2
Assign a common tag to the required objects then use this script:
Code:
value = 1
objects = grp.tag('my_tag_name')

for _, obj in ipairs(objects) do
  res = obj:checkwrite(value)
  if res then
    os.sleep(0.1)
  end
end

A better approach is to assign a common group address to all KNX devices because sending many telegrams at once can overflow the bus. The script above has a delay between each telegram to prevent this but it means that some devices will receive the value later.
Reply


Forum Jump: