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.

Rooms status
#2
I use something like this to check alarms...
Resident script:

Code:
function check_count(tag, GA)
  count = 0
  data = grp.tag(tag)
  for i=1, #data, 1 do
    if string.sub(data[i].datatype, 1, 1) == '1' then --boolean
      if data[i].value == true then
          count = count +1
      end
    else
      if data[i].value >0 then
          count = count +1
      end
    end
  end
  grp.checkupdate(GA, count)
end

check_count('OCCUPIED','X/X/X')) --ADD TAG WHAT TO CHECK AND GROUP ADDRESS WHERE COUNT VALUE IS WRITTEN
check_count('HEATING','X/X/X'))
check_count('COOLING', 'X/X/X'))
Reply


Messages In This Thread
Rooms status - by Stuart2000 - 27.04.2024, 07:20
RE: Rooms status - by fleeceable - 27.04.2024, 12:05

Forum Jump: