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.

For loops
#4
Check that you don't have other scripts that can cause an extra write or that the script itself does not change a group address that is mapped to the same tag.

A better approach is to split the script into several parts so only relevant code is run when a certain value changes. And check event.dst to determine which thermostat should be checked.

As for caching something like this can be used instead of grp.getvalue():
Code:
local values = {}

function getvalue(addr)
  if values[ addr ] == nil then
    values[ addr ] = grp.getvalue(addr)
  end

  return values[ addr ]
end
Reply


Messages In This Thread
For loops - by os2099 - 08.08.2023, 12:27
RE: For loops - by admin - 08.08.2023, 12:38
RE: For loops - by os2099 - 08.08.2023, 13:56
RE: For loops - by admin - 09.08.2023, 12:35

Forum Jump: