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.

Processing KNX Addresses
#21
Looks better but since I don't know what exactly this script should be doing I can't tell if it's fully correct or not.

Couple of things to consider:
1. Event value is not used / checked at all.

2. readAndSetTemperature is called in a loop so grp.getvalue inside is called 10 times where as it could be one. The code can be optimized like this, so readAndSetTemperature is not needed:
Code:
local outValue

if zeroValue == false or controlValue == true then
  outValue = 0
else
  outValue = grp.getvalue(group .. '/0/15')
end

for j = 17, 117, 10 do
  local addr = group .. '/4/' .. j
  grp.checkwrite(addr, outValue)
end
Reply


Messages In This Thread
Processing KNX Addresses - by AISystem - 10.05.2023, 07:13
RE: Processing KNX Addresses - by admin - 10.05.2023, 07:30
RE: Processing KNX Addresses - by AISystem - 10.05.2023, 08:24
RE: Processing KNX Addresses - by admin - 10.05.2023, 08:49
RE: Processing KNX Addresses - by AISystem - 10.05.2023, 11:50
RE: Processing KNX Addresses - by admin - 10.05.2023, 11:51
RE: Processing KNX Addresses - by AISystem - 10.05.2023, 12:05
RE: Processing KNX Addresses - by admin - 10.05.2023, 12:33
RE: Processing KNX Addresses - by AISystem - 10.05.2023, 14:21
RE: Processing KNX Addresses - by admin - 11.05.2023, 05:59
RE: Processing KNX Addresses - by AISystem - 11.05.2023, 07:28
RE: Processing KNX Addresses - by admin - 11.05.2023, 12:18
RE: Processing KNX Addresses - by AISystem - 22.05.2023, 11:29
RE: Processing KNX Addresses - by admin - 22.05.2023, 12:01
RE: Processing KNX Addresses - by AISystem - 25.05.2023, 07:14
RE: Processing KNX Addresses - by AISystem - 29.05.2023, 08:55
RE: Processing KNX Addresses - by admin - 29.05.2023, 09:41
RE: Processing KNX Addresses - by AISystem - 29.05.2023, 10:33
RE: Processing KNX Addresses - by admin - 29.05.2023, 10:58
RE: Processing KNX Addresses - by AISystem - 29.05.2023, 11:23
RE: Processing KNX Addresses - by admin - 29.05.2023, 11:48

Forum Jump: