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.

Problems with Script Contact Window - Protection Mode
#1
Good morning:
  I made a script so that when a window of a room is opened, the thermostat goes into protection mode.
Once the summer is over, when the heating is switched on and the system is in heating mode the thermostat is put in protection mode even when all the windows are closed, I have no remote connection to the installation but I imagine that the problem is that since LM does not perform the Change from cooling mode to heating mode, any suggestions? 


 
The script is as follows
local ModoCalefaccion = grp.getvalue ("0/1/0")
local ModoTermostato = "6/7/1"

local tagname = 'ContatosVentanacocinasaloncomedor'


if ModoCalefaccion then

  for _, obj in ipairs(grp.tag(tagname)) do  --lee todos los objetos si se cumple la condicion (ventana abierta) pone el termostato en modo proteccion
                                              --si una vez leidos todos no se ha cumplido la condicion escribe en el modo false

                if obj.value then              --Al menos una ventana esta abierta

      grp.checkwrite(ModoTermostato ,true)

      return

    end

  end

                grp.checkwrite(ModoTermostato,false) -- Todas las ventanas estan cerrada

  end

Reply


Messages In This Thread
Problems with Script Contact Window - Protection Mode - by josemabera - 21.10.2019, 05:15

Forum Jump: