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
#1
Hello, looking for 2 scripts using TAG.

How many rooms are in use based on a 1bit signal.

How many rooms have heating or cooling demands based on 1 byte signals.
Reply
#2
I use something like this to check alarms...
Resident script:

Code:
1234567891011121314151617181920
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


Forum Jump: