From 8b72eeedb86c39a9fce429a4adb13266015689ea Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 21 Oct 2021 08:00:14 +0200 Subject: [PATCH] Update regole accensione (aggiunto temperatura poweron) --- Egalware/rules/egalware.rules | 47 +++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 16 deletions(-) diff --git a/Egalware/rules/egalware.rules b/Egalware/rules/egalware.rules index e0a0e31..a72f318 100644 --- a/Egalware/rules/egalware.rules +++ b/Egalware/rules/egalware.rules @@ -6,6 +6,8 @@ val Random random = new Random() // val urlList = newArrayList("https://www.fillmurray.com", "https://www.fillmurray.com/g", // "https://www.placecage.com", "https://www.placecage.com/c", "https://www.placecage.com/g") +var powerOnTemp = 21 + /********************************************************************** * Rules x calcoli valori ENERGIA **********************************************************************/ @@ -61,6 +63,9 @@ when then Heating_GU120_CL_C4_Switch.sendCommand(ON) Heating_GU100_CL_C8_Switch.sendCommand(ON) + // imposto temperature + Heating_GU120_CL_C4_Set.sendC(powerOnTemp - 2) + Heating_GU100_CL_C8_Set.sendC(powerOnTemp - 2) end rule "Accensione mattino 7.45 ufficio Emmanuele / Sala Riunioni" @@ -69,6 +74,9 @@ when then Heating_GU120_CL_C5_Switch.sendCommand(ON) Heating_GU100_CL_C9_Switch.sendCommand(ON) + // imposto temperature + Heating_GU120_CL_C5_Set.sendCommand(powerOnTemp - 2) + Heating_GU100_CL_C9_Set.sendCommand(powerOnTemp - 2) end @@ -78,6 +86,9 @@ when then Heating_GU120_CL_C3_Switch.sendCommand(ON) Heating_GU100_CL_C7_Switch.sendCommand(ON) + // imposto temperature + Heating_GU120_CL_C3_Set.sendCommand(powerOnTemp) + Heating_GU100_CL_C7_Set.sendCommand(powerOnTemp) end rule "Accensione mattino 8.00 desk / ingresso / corridoio" @@ -87,6 +98,10 @@ then Heating_GU120_CL_C1_Switch.sendCommand(ON) Heating_GU120_CL_C2_Switch.sendCommand(ON) Heating_GU100_CL_C6_Switch.sendCommand(ON) + // imposto temperature + Heating_GU120_CL_C1_Set.sendCommand(powerOnTemp - 2) + Heating_GU120_CL_C2_Set.sendCommand(powerOnTemp) + Heating_GU100_CL_C6_Set.sendCommand(powerOnTemp) end // rule "Accensione Impianto OGNI mattino 8.15 Standard (NO ufficio e sala riunioni)" @@ -409,22 +424,22 @@ then } } } - else - { - turnOnTemp = target - offset - turnOffTemp = target - offset + range - if (ambient <= turnOnTemp) { - if(currMode != 1) - { - Heating_GU120_CL_C3_Mode.sendCommand(1) - } - } else if (ambient >= turnOffTemp) { - if(currMode != 2) - { - Heating_GU120_CL_C3_Mode.sendCommand(2) - } - } - } + // else + // { + // turnOnTemp = target - offset + // turnOffTemp = target - offset + range + // if (ambient <= turnOnTemp) { + // if(currMode != 1) + // { + // Heating_GU120_CL_C3_Mode.sendCommand(1) + // } + // } else if (ambient >= turnOffTemp) { + // if(currMode != 2) + // { + // Heating_GU120_CL_C3_Mode.sendCommand(2) + // } + // } + // } end // rule "Test clima mode 3"