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.

trigging with tag
#1
Hello, 
I've 50 rooms at a hotel. 
I made a script for one room. How do I trigger my script with a tag 'guest present' instead,  and then get the name of the triggede room and write to its current VAV? I want one script instead of 50.
  
Card switch 'XS2_425_C_D' indicates guest present,and got the tag 'guest present' (together with 50 other rooms). VAV should then go to a common set value '4/2/0'. VAV's name is similar to card switch 'VAV_2_425_SP'. 
In the group 'VAV_2_425_REG' I have object from the regulator. This regulator will take over if it's greater than the set value(max comparator) and if guest is not present.

so far:

switch = grp.getvalue('XS2_425_C_D')
Comp_max_input1 = grp.getvalue('VAV_2_425_REG')
Comp_max_input2 = grp.getvalue('4/2/0')
Comp_max_output = 'VAV_2_425_SP'
if switch == true then
require('custom.fbeditor20.Math_advanced')
functions_Math_advanced_json_fbe_max_com_input_1 = Comp_max_input1
functions_Math_advanced_json_fbe_max_com_input_2 = Comp_max_input2
functions_Math_advanced_json_fbe_max_com_input_3 = nil
functions_Math_advanced_json_fbe_max_com_input_4 = nil
functions_Math_advanced_json_fbe_max_com_input_5 = nil
functions_Math_advanced_json_fbe_max_com_input_6 = nil
functions_Math_advanced_json_fbe_max_com_input_7 = nil
functions_Math_advanced_json_fbe_max_com_input_8 = nil
out = fbe_max_com(functions_Math_advanced_json_fbe_max_com_input_1, functions_Math_advanced_json_fbe_max_com_input_2, functions_Math_advanced_json_fbe_max_com_input_3, functions_Math_advanced_json_fbe_max_com_input_4, functions_Math_advanced_json_fbe_max_com_input_5, functions_Math_advanced_json_fbe_max_com_input_6, functions_Math_advanced_json_fbe_max_com_input_7, functions_Math_advanced_json_fbe_max_com_input_8, 'fb__Comparator__fbe_max_com__id')
grp.write(Comp_max_output, out)

  else
grp.write(Comp_max_output, Comp_max_input1)
end


This one works, but only for room 2_425.

best regards Vidar
Reply


Messages In This Thread
trigging with tag - by vidar.karlsen@gk.no - 15.02.2021, 09:29
RE: trigging with tag - by Daniel - 15.02.2021, 10:44

Forum Jump: