Update regole accensione (aggiunto temperatura poweron)

This commit is contained in:
Samuele Locatelli
2021-10-21 08:00:14 +02:00
parent 16e6928dab
commit 8b72eeedb8
+31 -16
View File
@@ -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"