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.

Script for Open Window - thermostat protection mode
#4
Hi,

Yes i know, Normally we don't create scripts on request (simply not possible to do that for everyone) and we give samples how to achieve something..

Here is the  script you need:
Code:
heating_mode = grp.getvalue('1/1/1')
protection_mode = '1/1/8'
if heating_mode == true then
  windows = grp.tag('Window')
  windowopen = false
  for _, window in ipairs(windows) do
    if window.value == true then
      windowopen = true
      break
    end
  end 
  if windowopen then
    grp.checkwrite(protection_mode, true)
  else
    grp.checkwrite(protection_mode, false)
  end
else
  grp.checkwrite(protection_mode, false)
end
Tag your objects /script like this:

   
   

You can do this the same for another floor with second script and different (unique) TAG's.

BR,

Erwin
Reply


Messages In This Thread
RE: Script for Open Window - thermostat protection mode - by Erwin van der Zwart - 10.06.2019, 08:48

Forum Jump: