18.07.2024, 05:16
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
Thanks
array of group addresses
|
18.07.2024, 05:16
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
18.07.2024, 05:45
Assign a common tag to the required objects then use this script:
Code: 123456789 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
endA 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. |
« Next Oldest | Next Newest »
|