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 Error. HELP
#3
Code:
--dichiarazione delle variabili locali

gRichiestaDeumidificazione    = ("7/0/10")
gStatoDeumidificazione            = ("7/1/10")
gStagione                                        =    ("0/2/2") --gruppo stagione invertito: 1= raffrescamento / 0= riscaldamento
gSogliaZona1                                = ("7/3/10")
gSogliaZona2                                = ("7/3/12")
gSogliaZona3                                = ("")
gSogliaZona4                                = ("7/3/14")
gSogliaZona5                                = ("")
gSogliaZona6                                = ("")


-------------------------------non toccare più nulla sotto questa riga------------------------------------------


Zn1                = grp.getvalue(gSogliaZona1)
Zn2                = grp.getvalue(gSogliaZona2)
Zn3                = grp.getvalue(gSogliaZona3)
Zn4                = grp.getvalue(gSogliaZona4)
Zn5                = grp.getvalue(gSogliaZona5)
Zn6                = grp.getvalue(gSogliaZona6)
Stagione    = grp.getvalue(gStagione)


if (Zn1 or Zn2 or Zn3 or Zn4 or Zn5 or Zn6) and Stagione then
          grp.write(gRichiestaDeumidificazione, 1, nil, gStatoDeumidificazione)
else
            grp.write(gRichiestaDeumidificazione, 0, nil, gStatoDeumidificazione)

end
 
(29.07.2024, 09:12)Daniel Wrote: Set the third argument in grp.checkwrite to nil
 Hi Daniel,

thanks for your reply. I set the third argument as "nil" but it still doesn't work. 

The scope of the script is to verify if at least one "Zone" is "ON" AND if the "season" is "ON". In this case set the output on "True", otherwise if alla the zones are "OFF" or the "Season" is "OFF" set to "FALSE" the output.
Reply


Messages In This Thread
Script Error. HELP - by Tuwat47 - 29.07.2024, 08:30
RE: Script Error. HELP - by Daniel - 29.07.2024, 09:12
RE: Script Error. HELP - by Tuwat47 - 29.07.2024, 09:27
RE: Script Error. HELP - by Daniel - 29.07.2024, 09:50
RE: Script Error. HELP - by admin - 29.07.2024, 10:16

Forum Jump: