diff --git a/Egalware/html/tablet.html b/Egalware/html/tablet.html
new file mode 100644
index 0000000..bdf7ed7
--- /dev/null
+++ b/Egalware/html/tablet.html
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+ Caricamento Dashboard...
+
+
+
diff --git a/Egalware/items/egalware.items b/Egalware/items/egalware.items
index ca6bb65..71c0c5d 100644
--- a/Egalware/items/egalware.items
+++ b/Egalware/items/egalware.items
@@ -5,8 +5,8 @@ String Stagione {channel="astro:sun:local:season#name"}
/*---------------------- Elementi group logici ----------------------*/
Group:Switch:OR(ON, OFF) CL_Switch "Clima Attivi [(%d)]"
Group:Switch:OR(ON, OFF) VMC_Switch "VMC Attive [(%d)]"
-// Group:Switch:OR(ON, OFF) Light_PresetSwitch "Preset Luci"
-Group:Number:AVG CL_Mode "Modalità Clima [%.1f]"
+//Group:Number:AVG CL_Mode "Modalità Clima [%.1f]"
+Group:Number:AVG CL_Mode "Modalità Prevalente [MAP(clima_modo.map):%.0f]"
Group:Number:AVG CL_Temp "Temp. Rilevata [%.1f °C]"
Group:Number:AVG CL_Set "Temp. Impostata [%.1f °C]"
Group:Number:AVG CL_Fan "Fan Speed"
@@ -33,56 +33,59 @@ Switch Light_PresetSwitch "Preset Luci"
/*----------------------------------------------------------------------------*/
/*---------------------- Elementi Clima, Daikin via MODBUS ----------------------*/
+Group gClimaTrigger "Gruppo Climatizzatori"
+Group gClimaSw1 "Gruppo Climatizzatori"
+Group gClimaSw2 "Gruppo Climatizzatori"
+Group gClimaSw3 "Gruppo Climatizzatori"
Switch CL_ModoEstivo "Modalità Estiva (freddo)"
-Number GU120_CL "Clima Ufficio 120"
+// Number GU120_CL "Clima Ufficio 120"
Number CL_GrpScale "Scala Temporale Clima"
Number VMC_GrpScale "Scala Temporale VMC"
-Switch Heating_GU120_CL_C1_Switch "Ingresso" (CL_Switch) {channel="modbus:data:6cb6a78ae4:002f17d3e2:switch"}
+Switch Heating_GU120_CL_C1_Switch "Ingresso" (gClimaTrigger, CL_Switch, gClimaSw1) {channel="modbus:data:6cb6a78ae4:002f17d3e2:switch"}
Number Heating_GU120_CL_C1_Temp "°C Ingresso [%.1f °C]" (gClimaTrigger, CL_Temp) {channel="modbus:data:7f20af572c:a9e7069c7c:number"}
Number Heating_GU120_CL_C1_Set "Set Ingresso [%.1f °C]" (gClimaTrigger, CL_Set) {channel="modbus:data:6cb6a78ae4:d016b44d6d:number"}
-Number Heating_GU120_CL_C1_Fan "Fan Ingresso" (CL_Fan) {channel="modbus:data:6cb6a78ae4:b6325f2892:number"}
-Number Heating_GU120_CL_C1_Mode "Modo Ingresso [%s]" (CL_Mode) {channel="modbus:data:6cb6a78ae4:e6e67dfb58:number"}
-Switch Heating_GU120_CL_C2_Switch "Corridoio" (CL_Switch) {channel="modbus:data:25ff4e4854:abc8fe8acf:switch"}
+Number Heating_GU120_CL_C1_Fan "Fan Ingresso" (gClimaTrigger, CL_Fan) {channel="modbus:data:6cb6a78ae4:b6325f2892:number"}
+Number Heating_GU120_CL_C1_Mode "Modo Ingresso [MAP(clima_modo.map):%s]" (gClimaTrigger, CL_Mode) {channel="modbus:data:6cb6a78ae4:e6e67dfb58:number"}
+Switch Heating_GU120_CL_C2_Switch "Corridoio" (gClimaTrigger, CL_Switch, gClimaSw1) {channel="modbus:data:25ff4e4854:abc8fe8acf:switch"}
Number Heating_GU120_CL_C2_Temp "°C Corridoio [%.1f °C]" (gClimaTrigger, CL_Temp) {channel="modbus:data:25ff4e4854:9c21d13904:number"}
Number Heating_GU120_CL_C2_Set "Set Corridoio [%.1f °C]" (gClimaTrigger, CL_Set) {channel="modbus:data:25ff4e4854:4125b665e1:number"}
-Number Heating_GU120_CL_C2_Fan "Fan Corridoio" (CL_Fan) {channel="modbus:data:25ff4e4854:37b7126b15:number"}
-Number Heating_GU120_CL_C2_Mode "Modo Corridoio [%s]" (CL_Mode) {channel="modbus:data:25ff4e4854:b382599920:number"}
-Switch Heating_GU120_CL_C3_Switch "Finestra" (CL_Switch) {channel="modbus:data:1d94db5831:a206ccc2d1:switch"}
+Number Heating_GU120_CL_C2_Fan "Fan Corridoio" (gClimaTrigger, CL_Fan) {channel="modbus:data:25ff4e4854:37b7126b15:number"}
+Number Heating_GU120_CL_C2_Mode "Modo Corridoio [MAP(clima_modo.map):%s]" (gClimaTrigger, CL_Mode) {channel="modbus:data:25ff4e4854:b382599920:number"}
+Switch Heating_GU120_CL_C3_Switch "Finestra" (gClimaTrigger, CL_Switch, gClimaSw1) {channel="modbus:data:1d94db5831:a206ccc2d1:switch"}
Number Heating_GU120_CL_C3_Temp "°C Finestra [%.1f °C]" (gClimaTrigger, CL_Temp) {channel="modbus:data:2a1822eb32:db7ce645ec:number"}
Number Heating_GU120_CL_C3_Set "Set Finestra [%.1f °C]" (gClimaTrigger, CL_Set) {channel="modbus:data:1d94db5831:1877b2eeac:number"}
-Number Heating_GU120_CL_C3_Fan "Fan Finestra" (CL_Fan) {channel="modbus:data:1d94db5831:31ea819e70:number"}
-Number Heating_GU120_CL_C3_Mode "Modo Finestra [%s]" (CL_Mode) {channel="modbus:data:1d94db5831:b9fdad4dbd:number"}
-Switch Heating_GU120_CL_C4_Switch "Uff Samuele" (CL_Switch) {channel="modbus:data:9c572c8b0d:aaad41b599:switch"}
+Number Heating_GU120_CL_C3_Fan "Fan Finestra" (gClimaTrigger, CL_Fan) {channel="modbus:data:1d94db5831:31ea819e70:number"}
+Number Heating_GU120_CL_C3_Mode "Modo Finestra [MAP(clima_modo.map):%s]" (gClimaTrigger, CL_Mode) {channel="modbus:data:1d94db5831:b9fdad4dbd:number"}
+Switch Heating_GU120_CL_C4_Switch "Uff Samuele" (gClimaTrigger, CL_Switch, gClimaSw3) {channel="modbus:data:9c572c8b0d:aaad41b599:switch"}
Number Heating_GU120_CL_C4_Temp "°C Uff Sam [%.1f °C]" (gClimaTrigger, CL_Temp) {channel="modbus:data:102f2a9339:a684203978:number"}
Number Heating_GU120_CL_C4_Set "Set Uff Sam [%.1f °C]" (gClimaTrigger, CL_Set) {channel="modbus:data:9c572c8b0d:4de0ad7a18:number"}
-Number Heating_GU120_CL_C4_Fan "Fan Uff Sam" (CL_Fan) {channel="modbus:data:9c572c8b0d:4aea01c2ba:number"}
-Number Heating_GU120_CL_C4_Mode "Modo Uff Sam [%s]" (CL_Mode) {channel="modbus:data:9c572c8b0d:076c837dc5:number"}
-Switch Heating_GU120_CL_C5_Switch "Uff Emm" (CL_Switch) {channel="modbus:data:b84a9d28c9:2c0b2764b3:switch"}
+Number Heating_GU120_CL_C4_Fan "Fan Uff Sam" (gClimaTrigger, CL_Fan) {channel="modbus:data:9c572c8b0d:4aea01c2ba:number"}
+Number Heating_GU120_CL_C4_Mode "Modo Uff Sam [MAP(clima_modo.map):%s]" (gClimaTrigger, CL_Mode) {channel="modbus:data:9c572c8b0d:076c837dc5:number"}
+Switch Heating_GU120_CL_C5_Switch "Uff Emm" (gClimaTrigger, CL_Switch, gClimaSw3) {channel="modbus:data:b84a9d28c9:2c0b2764b3:switch"}
Number Heating_GU120_CL_C5_Temp "°C Uff Emm [%.1f °C]" (gClimaTrigger, CL_Temp) {channel="modbus:data:54111f6432:92f68904d5:number"}
Number Heating_GU120_CL_C5_Set "Set Uff Emm [%.1f °C]" (gClimaTrigger, CL_Set) {channel="modbus:data:f6b8c93dfe:5e0ba61106:number"}
-Number Heating_GU120_CL_C5_Fan "Fan Uff Emm" (CL_Fan) {channel="modbus:data:f6b8c93dfe:0bbc6da4ba:number"}
-Number Heating_GU120_CL_C5_Mode "Modo Uff Emm [%s]" (CL_Mode) {channel="modbus:data:f6b8c93dfe:8cf048aed5:number"}
-Switch Heating_GU100_CL_C6_Switch "Desk" (CL_Switch) {channel="modbus:data:32c34522e3:592d883bcc:switch"}
+Number Heating_GU120_CL_C5_Fan "Fan Uff Emm" (gClimaTrigger, CL_Fan) {channel="modbus:data:f6b8c93dfe:0bbc6da4ba:number"}
+Number Heating_GU120_CL_C5_Mode "Modo Uff Emm [MAP(clima_modo.map):%s]" (gClimaTrigger, CL_Mode) {channel="modbus:data:f6b8c93dfe:8cf048aed5:number"}
+Switch Heating_GU100_CL_C6_Switch "Desk" (gClimaTrigger, CL_Switch, gClimaSw2) {channel="modbus:data:32c34522e3:592d883bcc:switch"}
Number Heating_GU100_CL_C6_Temp "°C Desk [%.1f °C]" (gClimaTrigger, CL_Temp) {channel="modbus:data:6dfb31b2d0:a9eda37f18:number"}
Number Heating_GU100_CL_C6_Set "Set Desk [%.1f °C]" (gClimaTrigger, CL_Set) {channel="modbus:data:32c34522e3:73c82709f7:number"}
-Number Heating_GU100_CL_C6_Fan "Fan Desk" (CL_Fan) {channel="modbus:data:32c34522e3:1d32219a9b:number"}
-Number Heating_GU100_CL_C6_Mode "Modo Desk [%s]" (CL_Mode) {channel="modbus:data:32c34522e3:5550465d50:number"}
-Switch Heating_GU100_CL_C7_Switch "OpenSpace" (CL_Switch) {channel="modbus:data:7b0ff8678f:852651bdfb:switch"}
+Number Heating_GU100_CL_C6_Fan "Fan Desk" (gClimaTrigger, CL_Fan) {channel="modbus:data:32c34522e3:1d32219a9b:number"}
+Number Heating_GU100_CL_C6_Mode "Modo Desk [MAP(clima_modo.map):%s]" (gClimaTrigger, CL_Mode) {channel="modbus:data:32c34522e3:5550465d50:number"}
+Switch Heating_GU100_CL_C7_Switch "OpenSpace" (gClimaTrigger, CL_Switch, gClimaSw2) {channel="modbus:data:7b0ff8678f:852651bdfb:switch"}
Number Heating_GU100_CL_C7_Temp "°C OpenSpace [%.1f °C]" (gClimaTrigger, CL_Temp) {channel="modbus:data:15a14761b1:043e67945d:number"}
Number Heating_GU100_CL_C7_Set "Set OpenSpace [%.1f °C]" (gClimaTrigger, CL_Set) {channel="modbus:data:7b0ff8678f:a7c13dd57d:number"}
-Number Heating_GU100_CL_C7_Fan "Fan OpenSpace" (CL_Fan) {channel="modbus:data:7b0ff8678f:c2ab3ee0e9:number"}
-Number Heating_GU100_CL_C7_Mode "Modo OpenSpace [%s]" (CL_Mode) {channel="modbus:data:7b0ff8678f:4386a86c96:number"}
-Switch Heating_GU100_CL_C8_Switch "Uff Dario" (CL_Switch) {channel="modbus:data:dfd1d14bf1:d3ddf221cd:switch"}
+Number Heating_GU100_CL_C7_Fan "Fan OpenSpace" (gClimaTrigger, CL_Fan) {channel="modbus:data:7b0ff8678f:c2ab3ee0e9:number"}
+Number Heating_GU100_CL_C7_Mode "Modo OpenSpace [MAP(clima_modo.map):%s]" (gClimaTrigger, CL_Mode) {channel="modbus:data:7b0ff8678f:4386a86c96:number"}
+Switch Heating_GU100_CL_C8_Switch "Uff Dario" (gClimaTrigger, CL_Switch, gClimaSw3) {channel="modbus:data:dfd1d14bf1:d3ddf221cd:switch"}
Number Heating_GU100_CL_C8_Temp "°C Uff Dario [%.1f °C]" (gClimaTrigger, CL_Temp) {channel="modbus:data:4da0c6beba:766d9bf2b9:number"}
Number Heating_GU100_CL_C8_Set "Set Uff Dario [%.1f °C]" (gClimaTrigger, CL_Set) {channel="modbus:data:dfd1d14bf1:ef7f18589e:number"}
-Number Heating_GU100_CL_C8_Fan "Fan Uff Dario" (CL_Fan) {channel="modbus:data:dfd1d14bf1:93736ca830:number"}
-Number Heating_GU100_CL_C8_Mode "Modo Uff Dario [%s]" (CL_Mode) {channel="modbus:data:dfd1d14bf1:ab16eaba84:number"}
-Switch Heating_GU100_CL_C9_Switch "Sala Riun" (CL_Switch) {channel="modbus:data:629bd10994:b0f7f4184d:switch"}
+Number Heating_GU100_CL_C8_Fan "Fan Uff Dario" (gClimaTrigger, CL_Fan) {channel="modbus:data:dfd1d14bf1:93736ca830:number"}
+Number Heating_GU100_CL_C8_Mode "Modo Uff Dario [MAP(clima_modo.map):%s]" (gClimaTrigger, CL_Mode) {channel="modbus:data:dfd1d14bf1:ab16eaba84:number"}
+Switch Heating_GU100_CL_C9_Switch "Sala Riun" (gClimaTrigger, CL_Switch, gClimaSw2) {channel="modbus:data:629bd10994:b0f7f4184d:switch"}
Number Heating_GU100_CL_C9_Temp "°C Sala Riun [%.1f °C]" (gClimaTrigger, CL_Temp) {channel="modbus:data:2b1793ab97:b861d34fff:number"}
Number Heating_GU100_CL_C9_Set "Set Riunioni [%.1f °C]" (gClimaTrigger, CL_Set) {channel="modbus:data:629bd10994:d304255f1e:number"}
-Number Heating_GU100_CL_C9_Fan "Fan Riunioni" (CL_Fan) {channel="modbus:data:629bd10994:8be791e11a:number"}
-Number Heating_GU100_CL_C9_Mode "Modo Riunioni [%s]" (CL_Mode) {channel="modbus:data:629bd10994:7f619bd5fa:number"}
-
+Number Heating_GU100_CL_C9_Fan "Fan Riunioni" (gClimaTrigger, CL_Fan) {channel="modbus:data:629bd10994:8be791e11a:number"}
+Number Heating_GU100_CL_C9_Mode "Modo Riunioni [MAP(clima_modo.map):%s]" (gClimaTrigger, CL_Mode) {channel="modbus:data:629bd10994:7f619bd5fa:number"}
/*----------------------------------------------------------------------------*/
@@ -127,6 +130,7 @@ Number Fn_ProdFVTotProd "Prod. Totale"
// variabili calcolate/derivate
Number Fn_FullLoadPos "(A) ↓ Impiego (B+C) [%.0f W]" (gEN)
Number Fn_PrelReteDay "↓ Consumo gg [%.2f kWh]" (gEN)
+Number Fn_PrelReteYesterday "↓ Consumo gg [%.2f kWh]" (gEN)
// variabili accessorie
Number Fn_PrelReteNet "Prelievo grid istantaneo NETTO (>0)" (gEN)
@@ -165,6 +169,10 @@ Number ShellyPowerValBagno120 "Potenza Bagno 120 [%1.f W]"
Number ShellyPowerValAll "Carico Totale Shelly [%.1f W]"
Number:Energy ShellyEnergyBagno100 "Consumo Bagno 100 [%1.f Wh]"
Number:Energy ShellyEnergyBagno120 "Consumo Bagno 120 [%1.f Wh]"
+Number ShellyCaffe_Day_KWh "Consumo Caffè Giorno [%.2f kWh]"
+Number CiabattaAPC_Day_KWh "Consumo APC Giorno [%.2f kWh]"
+Number ShellyBagno120_Day_KWh "Consumo Bagno 120 Giorno [%.2f kWh]"
+Number ShellyBagno100_Day_KWh "Consumo Bagno 100 Giorno [%.2f kWh]"
/*----------------------------------------------------------------------------*/
diff --git a/Egalware/persistence/old/rrd4j.persist b/Egalware/persistence/old/rrd4j.persist
new file mode 100644
index 0000000..e2c957b
--- /dev/null
+++ b/Egalware/persistence/old/rrd4j.persist
@@ -0,0 +1,26 @@
+// persistence strategies have a name and a definition and are referred to in the "Items" section
+Strategies {
+ // for rrd charts, we need a cron strategy
+ everyMinute : "0 * * * * ?"
+ everyHour : "0 0 * * * ?"
+ everyDay : "0 0 0 * * ?"
+ default = everyChange
+}
+
+Items {
+ // //* strategy = everyMinute, restoreOnStartup
+ // *OnOff, *SetPoint, *Temperatura, *Velocit* : strategy = everyChange, restoreOnStartup
+
+ // // let's only store temperature values in rrd
+ // Heating*,gEN*,Temperature*, *Temperatura, Weather_Chart*, Ufficio*, *Server, Esterno* : strategy = everyMinute, restoreOnStartup
+
+ // // Fotovoltaico!
+ // gEN_RTime : strategy = everyMinute, restoreOnStartup
+ // gEN_Day : strategy = everyHour, restoreOnStartup
+ // gEN_YearProd : strategy = everyDay, restoreOnStartup
+
+ // persist items on every change and every minute
+ *: strategy = everyChange, everyMinute, restoreOnStartup
+}
+
+// vim: syntax=Xtend
\ No newline at end of file
diff --git a/Egalware/persistence/rrd4j.persist b/Egalware/persistence/rrd4j.persist
index e2c957b..a80ad91 100644
--- a/Egalware/persistence/rrd4j.persist
+++ b/Egalware/persistence/rrd4j.persist
@@ -1,26 +1,14 @@
// persistence strategies have a name and a definition and are referred to in the "Items" section
+
+
Strategies {
- // for rrd charts, we need a cron strategy
everyMinute : "0 * * * * ?"
everyHour : "0 0 * * * ?"
everyDay : "0 0 0 * * ?"
- default = everyChange
}
Items {
- // //* strategy = everyMinute, restoreOnStartup
- // *OnOff, *SetPoint, *Temperatura, *Velocit* : strategy = everyChange, restoreOnStartup
-
- // // let's only store temperature values in rrd
- // Heating*,gEN*,Temperature*, *Temperatura, Weather_Chart*, Ufficio*, *Server, Esterno* : strategy = everyMinute, restoreOnStartup
-
- // // Fotovoltaico!
- // gEN_RTime : strategy = everyMinute, restoreOnStartup
- // gEN_Day : strategy = everyHour, restoreOnStartup
- // gEN_YearProd : strategy = everyDay, restoreOnStartup
-
- // persist items on every change and every minute
*: strategy = everyChange, everyMinute, restoreOnStartup
}
-// vim: syntax=Xtend
\ No newline at end of file
+// vim: syntax=Xtend
diff --git a/Egalware/rules/egalware.rules b/Egalware/rules/egalware.rules
index 61ede8c..e58235a 100644
--- a/Egalware/rules/egalware.rules
+++ b/Egalware/rules/egalware.rules
@@ -1,11 +1,20 @@
import java.util.Random
import org.openhab.core.model.script.ScriptServiceUtil
+import java.util.HashMap
-var Timer timer = null
+// init oggetti
val Random random = new Random()
+var Timer timer = null
// variabile x cicli alternati (VMC, scaldasalviette bagni...)
-var boolean cicloA = true
+var Boolean cicloA = true
+
+// Ultima temperatura significativa per ogni stanza
+var HashMap lastTemp = new HashMap()
+// Ultimo timestamp di elaborazione per ogni stanza
+var HashMap lastTime = new HashMap()
+// Intervallo minimo tra due elaborazioni (in millisecondi)
+val long MIN_INTERVAL = 2 * 1000 // 2 secondi
var Number powerOnTemp
var Number powerOnTempLow
@@ -22,17 +31,17 @@ var Number range
/**********************************************************************
* Rules x calcoli valori ENERGIA
**********************************************************************/
- rule "Impostazione parametri estate/inverno"
+rule "Impostazione parametri estate/inverno"
when
System started or
Item CL_ModoEstivo changed
then
if (CL_ModoEstivo.state == ON) {
// ESTATE
- powerOnTemp = 24
- powerOnTempLow = 22
- minTemp = 21
- maxTemp = 26
+ powerOnTemp = 27
+ powerOnTempLow = 26
+ minTemp = 22
+ maxTemp = 27
limPrelievoReteMax = 6000
limPrelievoReteMin = 4000
oraVmcOn = 6
@@ -44,15 +53,15 @@ then
} else {
// INVERNO
- powerOnTemp = 23
- powerOnTempLow = 21
- minTemp = 19
- maxTemp = 24
- limPrelievoReteMax = 7500
- limPrelievoReteMin = 4000
+ powerOnTemp = 22
+ powerOnTempLow = 20
+ minTemp = 18
+ maxTemp = 23
+ limPrelievoReteMax = 7000
+ limPrelievoReteMin = 3000
oraVmcOn = 7
oraVmcOff = 19
- offsetVal = 0.1
+ offsetVal = 0.4
range = 0.2
logInfo("CONFIG", "Modalità INVERNALE attiva")
@@ -66,46 +75,58 @@ end
**********************************************************************/
rule "Fix Fronius FullLoad"
when
- Item Fn_FullLoadNeg changed
+ Item Fn_FullLoadNeg changed
then
- if (Fn_FullLoadNeg.state instanceof Number) {
- //logInfo("Fronius.rules", "Start fix Amb prelievo")
- var Number posValue = ((Fn_FullLoadNeg.state as Number) * -1)
- //logInfo("Fronius.rules", "PosValue: {} W", posValue)
- Fn_FullLoadPos.postUpdate(posValue)
- } else {
- Fn_FullLoadPos.postUpdate(Undefined) // or UNDEF on OH2
- }
+ val raw = Fn_FullLoadNeg.state
+
+ // Caso non numerico → reset
+ if (!(raw instanceof Number)) {
+ if (Fn_FullLoadPos.state != UNDEF)
+ Fn_FullLoadPos.postUpdate(UNDEF)
+ return
+ }
+
+ val Number newValue = -(raw as Number)
+ val oldValue = Fn_FullLoadPos.state as Number
+
+ // Evita update inutili
+ if (oldValue == null || oldValue != newValue)
+ Fn_FullLoadPos.postUpdate(newValue)
end
rule "Prelievo Rete Quotidiano (IN - FV)"
when
- Item Fn_PrelRete changed
- //Time cron "0 * * * * *"
+ Time cron "0 * * * * ?" // ogni 15 secondi
then
- //logInfo("Fn_PrelReteDay.rules", "Inizio proc")
- // inizio creando variabile derivata del SOLO valore prelevato
- if(Fn_PrelRete.state >= 0) {
- Fn_PrelReteNet.postUpdate(Fn_PrelRete.state as Number)
- }
- else {
- Fn_PrelReteNet.postUpdate(0)
- }
- //logInfo("Fn_PrelReteDay.rules", "Fn_PrelReteNet: {}", Fn_PrelReteNet.state)
- // calcolo parametri delle ore cumulate giornaliere, del valore medio giornaliero
- var inizio = now.withHour(0).withMinute(0).withSecond(0)
- var double dayTime = (now.getMinute() as Number) / 60 + now.getHour()
- //logInfo("Fn_PrelReteDay.rules", "inizio: {}, dayTime: {}", inizio, dayTime)
+ // 1) Calcolo Fn_PrelReteNet (solo valori >= 0)
+ val Number rete = Fn_PrelRete.state as Number
+ Fn_PrelReteNet.postUpdate(if (rete >= 0) rete else 0)
- //var Number dayAVG = Fn_PrelRete.averageSince(inizio)
- var Number dayAVG_net = Fn_PrelReteNet.averageSince(inizio)
- //logInfo("Fn_PrelReteDay.rules", "dayAVG: {} | dayAVG_net: {}", dayAVG, dayAVG_net)
-
- // to-do: usare ALTRA media...
- //var double kWh = mediaGiorn * dayTime / 1000
- var double kWh = dayAVG_net * dayTime / 1000
- //logWarn("Fn_PrelReteDay.rules", "kWh: {}", kWh)
- Fn_PrelReteDay.postUpdate(kWh)
+ // 2) Inizio giornata
+ val inizio = now.withHour(0).withMinute(0).withSecond(0)
+
+ // 3) Somma dei valori (Watt-minuto)
+ val Number somma = Fn_PrelReteNet.sumSince(inizio)
+
+ // 4) Conversione in kWh
+ // somma = somma dei valori campionati ogni minuto
+ // kWh = somma / (60 * 1000)
+ val double kWh = somma.doubleValue / 60000.0
+
+ // Protezione aggiuntiva per valori assurdi
+ if (kWh >= 0 && kWh < 240) {
+ Fn_PrelReteDay.postUpdate(kWh)
+ }
+
+ // 5) Aggiornamento item
+ Fn_PrelReteDay.postUpdate(kWh)
+end
+
+rule "Salva Consumo Ieri"
+when
+ Time cron "59 59 23 * * ?" // 23:59:59 ogni giorno
+then
+ Fn_PrelReteYesterday.postUpdate(Fn_PrelReteDay.state)
end
rule "Carico totale Shelly"
@@ -126,286 +147,340 @@ then
var Number spAll = nCaffe + nApc + nB100 + nB120
// Log di debug per verificare i valori
- logInfo("ShellyPower.rules", "Somma: {} + {} + {} + {} = {} W", nCaffe, nApc, nB100, nB120, spAll)
+ logInfo("ShellyPower.rules", "Shelly | Carico rilevato: {} + {} + {} + {} = {} W", nCaffe, nApc, nB100, nB120, spAll)
ShellyPowerValAll.postUpdate(spAll)
end
+rule "Calcolo Consumi Giornalieri Delta - Safe Version"
+when
+ Time cron "0 0/5 * * * ?" // Ogni 5 minuti
+then
+ // Impostiamo l'inizio della giornata (mezzanotte)
+ val inizioGiorno = now.withHour(0).withMinute(0).withSecond(0).withNano(0)
+
+ // 1. Shelly Caffè
+ val deltaCaffe = ShellyCaffe_Total_Energy_Consumption.deltaSince(inizioGiorno) as Number
+ if (deltaCaffe !== null && deltaCaffe >= 0) {
+ ShellyCaffe_Day_KWh.postUpdate(deltaCaffe)
+ } else if (deltaCaffe !== null && deltaCaffe < 0) {
+ logWarn("consumi", "Rilevato reset contatore Shelly Caffè (delta: " + deltaCaffe + "). Valore ignorato.")
+ }
+
+ // 2. Ciabatta APC
+ val deltaApc = CiabattaAPC_Total_Energy_Consumption.deltaSince(inizioGiorno) as Number
+ if (deltaApc !== null && deltaApc >= 0) {
+ CiabattaAPC_Day_KWh.postUpdate(deltaApc)
+ } else if (deltaApc !== null && deltaApc < 0) {
+ logWarn("consumi", "Rilevato reset contatore Ciabatta APC (delta: " + deltaApc + "). Valore ignorato.")
+ }
+
+ // 3. Shelly Bagno 120
+ val deltaB120 = ShellyEnergyBagno120.deltaSince(inizioGiorno) as Number
+ if (deltaB120 !== null && deltaB120 >= 0) {
+ ShellyBagno120_Day_KWh.postUpdate(deltaB120)
+ } else if (deltaB120 !== null && deltaB120 < 0) {
+ logWarn("consumi", "Rilevato reset contatore Bagno 120 (delta: " + deltaB120 + "). Valore ignorato.")
+ }
+
+ // 4. Shelly Bagno 100
+ val deltaB100 = ShellyEnergyBagno100.deltaSince(inizioGiorno) as Number
+ if (deltaB100 !== null && deltaB100 >= 0) {
+ ShellyBagno100_Day_KWh.postUpdate(deltaB100)
+ } else if (deltaB100 !== null && deltaB100 < 0) {
+ logWarn("consumi", "Rilevato reset contatore Bagno 100 (delta: " + deltaB100 + "). Valore ignorato.")
+ }
+end
+
+
/**********************************************************************
* Rules x automazione CLIMA ALWAYS
**********************************************************************/
-
-rule "Accensione mattino 7.00 Uff Samuele"
+rule "Gestione Priorità Accensione Clima"
when
- Time cron "0 0 7 * * MON-SAT"
+ Time cron "0 0/5 7-13 * * MON-SAT" // Controlla ogni 5 minuti dalle 7 alle 10
then
- Heating_GU120_CL_C4_Switch.sendCommand(ON)
- // imposto temperature
- Heating_GU120_CL_C4_Set.sendCommand(powerOnTempLow)
+ // uso media prelievo min/max
+ val Number SOGLIA_CRITICA = (limPrelievoReteMax + limPrelievoReteMin) / 2
+ // prendo il massimo degli ultimi 5 minuti
+ val maxItem = Fn_PrelRete.maximumSince(now.minusMinutes(5))
+ val consumoAttuale = (maxItem.state as Number).intValue
+ val hour = now.getHour
+ val minute = now.getMinute
+ val currentTime = hour + (minute / 60.0)
+
+ logInfo("clima.power", "Controllo energetico mattutino. Consumo attuale: {}W", consumoAttuale)
+
+ // Se siamo già sopra soglia, non accendere nulla di nuovo, anzi esci
+ if (consumoAttuale > SOGLIA_CRITICA) {
+ logWarn("clima.power", "Soglia superata! Accensione posticipata.")
+ return
+ }
+
+ // --- LOGICA DI ACCENSIONE SEQUENZIALE PER ORARIO E PRIORITÀ ---
+ // Verifichiamo se è l'ora di accendere ogni zona e se è ancora spenta
+
+ // 1. Uff Samuele (7.00) - Priorità 1
+ if (currentTime >= 7.0 && Heating_GU120_CL_C4_Switch.state == OFF) {
+ logInfo("clima.power", "Accensione Samuele (Target Energetico OK)")
+ Heating_GU120_CL_C4_Switch.sendCommand(ON)
+ Heating_GU120_CL_C4_Set.sendCommand(powerOnTempLow)
+ return // Accendiamo uno alla volta per ogni ciclo (ogni 5 min) per non creare picchi
+ }
+
+ // 2. Corridoio (7.20)
+ if (currentTime >= 7.33 && Heating_GU120_CL_C2_Switch.state == OFF) {
+ logInfo("clima.power", "Accensione Corridoio (Target Energetico OK)")
+ Heating_GU120_CL_C2_Switch.sendCommand(ON)
+ Heating_GU120_CL_C2_Set.sendCommand(powerOnTemp)
+ return
+ }
+
+ // 3. Uff Dario (7.40) - Priorità 2
+ if (currentTime >= 7.66 && Heating_GU100_CL_C8_Switch.state == OFF) {
+ logInfo("clima.power", "Accensione Dario (Target Energetico OK)")
+ Heating_GU100_CL_C8_Switch.sendCommand(ON)
+ Heating_GU100_CL_C8_Set.sendCommand(powerOnTempLow)
+ return
+ }
+
+ // 4. OpenSpace (8.00) - Molto energivoro
+ if (currentTime >= 8.0 && Heating_GU100_CL_C7_Switch.state == OFF) {
+ logInfo("clima.power", "Accensione Area OpenSpace (Target Energetico OK)")
+ Heating_GU100_CL_C7_Switch.sendCommand(ON)
+ Heating_GU100_CL_C7_Set.sendCommand(powerOnTemp)
+ return
+ }
+
+ // 5. Desk (8.20)
+ if (currentTime >= 8.33 && Heating_GU100_CL_C6_Switch.state == OFF) {
+ logInfo("clima.power", "Accensione Area Desk (Target Energetico OK)")
+ Heating_GU100_CL_C6_Switch.sendCommand(ON)
+ Heating_GU100_CL_C6_Set.sendCommand(powerOnTemp)
+ return
+ }
+
+ // 6. Finestra (8.40)
+ if (currentTime >= 8.66 && Heating_GU120_CL_C3_Switch.state == OFF) {
+ logInfo("clima.power", "Accensione Area Finestra (Target Energetico OK)")
+ Heating_GU120_CL_C3_Switch.sendCommand(ON)
+ Heating_GU120_CL_C3_Set.sendCommand(powerOnTemp)
+ return
+ }
+
+ // 7. Area Caffè (9.00)
+ if (currentTime >= 9.00 && Heating_GU120_CL_C1_Switch.state == OFF) {
+ logInfo("clima.power", "Accensione Area Caffè (Target Energetico OK)")
+ Heating_GU120_CL_C1_Switch.sendCommand(ON)
+ Heating_GU120_CL_C1_Set.sendCommand(powerOnTemp)
+ return
+ }
+
+ // 8. Uff Emmanuele (9.20)
+ if (currentTime >= 9.33 && Heating_GU120_CL_C5_Switch.state == OFF) {
+ logInfo("clima.power", "Accensione Uff Emmanuele (Target Energetico OK)")
+ Heating_GU120_CL_C5_Switch.sendCommand(ON)
+ Heating_GU120_CL_C5_Set.sendCommand(powerOnTempLow)
+ return
+ }
+
+ // 9. Sala Riunioni (9.40)
+ if (currentTime >= 9.66 && Heating_GU100_CL_C9_Switch.state == OFF) {
+ logInfo("clima.power", "Accensione Sala Riunioni (Target Energetico OK)")
+ Heating_GU100_CL_C9_Switch.sendCommand(ON)
+ Heating_GU100_CL_C9_Set.sendCommand(powerOnTempLow)
+ return
+ }
+
end
-rule "Accensione mattino 7.05 Uff Dario"
+rule "Ri-Accensione Sequenziale"
when
- Time cron "0 5 7 * * MON-SAT"
+ Time cron "0 0/5 14-18 * * MON-FRI"
then
- Heating_GU100_CL_C8_Switch.sendCommand(ON)
- // imposto temperature
- Heating_GU100_CL_C8_Set.sendCommand(powerOnTempLow)
-end
-
-rule "Accensione mattino 7.30 Corridoio"
-when
- Time cron "0 30 7 * * MON-SAT"
-then
- Heating_GU120_CL_C2_Switch.sendCommand(ON)
- // imposto temperature
- Heating_GU120_CL_C2_Set.sendCommand(powerOnTemp)
-end
-
-rule "Accensione mattino 7.45 OpenSpace"
-when
- Time cron "0 45 7 * * MON-SAT"
-then
- Heating_GU100_CL_C7_Switch.sendCommand(ON)
- // imposto temperature
- Heating_GU100_CL_C7_Set.sendCommand(powerOnTemp)
-end
-
-rule "Accensione mattino 8.00 finestra"
-when
- Time cron "0 0 8 * * MON-SAT"
-then
- Heating_GU120_CL_C3_Switch.sendCommand(ON)
- // imposto temperature
- Heating_GU120_CL_C3_Set.sendCommand(powerOnTemp)
-end
-
-rule "Accensione mattino 8.20 Desk"
-when
- Time cron "0 20 8 * * MON-SAT"
-then
- Heating_GU100_CL_C6_Switch.sendCommand(ON)
- // imposto temperature
- Heating_GU100_CL_C6_Set.sendCommand(powerOnTemp)
-end
-
-rule "Accensione mattino 8.40 area caffè"
-when
- Time cron "0 40 8 * * MON-SAT"
-then
- Heating_GU120_CL_C1_Switch.sendCommand(ON)
- // imposto temperature
- Heating_GU120_CL_C1_Set.sendCommand(powerOnTemp)
+ CL_Switch.members.forEach[ clima, i |
+ createTimer(now.plusSeconds(i * 10), [ | // Accende uno ogni 10 secondi
+ if(clima.state == OFF)
+ {
+ clima.sendCommand(ON)
+ logInfo("clima.state", "Ri-Accensione periodica clima spento | {}", clima)
+ }
+ ])
+ ]
end
-rule "Accensione mattino 9.00 ufficio Emmanuele"
+rule "Accensione 1/3 impianti OGNI domenica 9.00-9.45"
when
- Time cron "0 0 9 * * MON-SAT"
+ Time cron "0 0/15 9 * * SUN"
then
- Heating_GU120_CL_C5_Switch.sendCommand(ON)
- // imposto temperature
- Heating_GU120_CL_C5_Set.sendCommand(powerOnTempLow)
-end
-
-rule "Accensione mattino 9.30 Sala Riunioni"
-when
- Time cron "0 30 9 * * MON-SAT"
-then
- Heating_GU100_CL_C9_Switch.sendCommand(ON)
- // imposto temperature
- Heating_GU100_CL_C9_Set.sendCommand(powerOnTempLow)
-end
-
-// rule ri-accensione ogni 30 min di ogni impianto in orario lavoro...
-rule "Ri-Accensione ogni 30min"
-when
- Time cron "0 15/10 9-19 * * MON-SAT"
-then
- Heating_GU120_CL_C1_Switch.sendCommand(ON)
- Heating_GU120_CL_C2_Switch.sendCommand(ON)
- Heating_GU120_CL_C3_Switch.sendCommand(ON)
- Heating_GU120_CL_C4_Switch.sendCommand(ON)
- Heating_GU120_CL_C5_Switch.sendCommand(ON)
- Heating_GU100_CL_C6_Switch.sendCommand(ON)
- Heating_GU100_CL_C7_Switch.sendCommand(ON)
- Heating_GU100_CL_C8_Switch.sendCommand(ON)
- Heating_GU100_CL_C9_Switch.sendCommand(ON)
-end
-
-rule "Accensione 1/3 impianti OGNI mattino 9.00"
-when
- Time cron "0 0 9 * * ?"
-then
- Heating_GU120_CL_C1_Switch.sendCommand(ON)
- Heating_GU120_CL_C4_Switch.sendCommand(ON)
- Heating_GU100_CL_C7_Switch.sendCommand(ON)
+ gClimaSw3.members.forEach[ clima, i |
+ createTimer(now.plusSeconds(i * 180), [ | // accende ogni 3 minuti
+ if(clima.state == OFF)
+ {
+ clima.sendCommand(ON)
+ logInfo("clima.state", "Accensione serale clima | {}", clima)
+ }
+ ])
+ ]
end
-rule "Accensione 1/3 impianti OGNI mattino 9.20"
+rule "Accensione 1/3 impianti OGNI domenica 9.30-9.45"
when
- Time cron "0 20 9 * * ?"
+ Time cron "0 30/15 9 * * SUN"
then
- Heating_GU120_CL_C2_Switch.sendCommand(ON)
- Heating_GU120_CL_C5_Switch.sendCommand(ON)
- Heating_GU100_CL_C8_Switch.sendCommand(ON)
+ gClimaSw2.members.forEach[ clima, i |
+ createTimer(now.plusSeconds(i * 180), [ | // accende ogni 3 minuti
+ if(clima.state == OFF)
+ {
+ clima.sendCommand(ON)
+ logInfo("clima.state", "Accensione serale clima | {}", clima)
+ }
+ ])
+ ]
end
-rule "Accensione 1/3 impianti OGNI mattino 9.40"
+rule "Accensione 1/3 impianti OGNI domenica 10.30-10.50"
when
- Time cron "0 40 9 * * ?"
+ Time cron "0 30/10 10 * * SUN"
then
- Heating_GU120_CL_C3_Switch.sendCommand(ON)
- Heating_GU100_CL_C6_Switch.sendCommand(ON)
- Heating_GU100_CL_C9_Switch.sendCommand(ON)
+ CL_Switch.members.forEach[ clima, i |
+ createTimer(now.plusSeconds(i * 180), [ | // accende ogni 3 minuti
+ if(clima.state == OFF)
+ {
+ clima.sendCommand(ON)
+ logInfo("clima.state", "Accensione serale clima | {}", clima)
+ }
+ ])
+ ]
end
-rule "Spegnimento Clima OGNI sera 19:30"
+rule "Spegnimento Clima gr1 OGNI sera 19:15 - 19:45"
when
- Time cron "0 30 19 * * ?"
+ Time cron "0 15/15 19 * * ?"
then
- Heating_GU120_CL_C1_Switch.sendCommand(OFF)
- Heating_GU120_CL_C2_Switch.sendCommand(OFF)
- Heating_GU120_CL_C3_Switch.sendCommand(OFF)
-// Heating_GU120_CL_C4_Switch.sendCommand(OFF)
-// Heating_GU120_CL_C5_Switch.sendCommand(OFF)
- Heating_GU100_CL_C6_Switch.sendCommand(OFF)
- Heating_GU100_CL_C7_Switch.sendCommand(OFF)
-// Heating_GU100_CL_C8_Switch.sendCommand(OFF)
- Heating_GU100_CL_C9_Switch.sendCommand(OFF)
+ gClimaSw1.members.forEach[ clima, i |
+ createTimer(now.plusSeconds(i * 60), [ | // spegne uno ogni 60 secondi
+ if(clima.state == ON)
+ {
+ clima.sendCommand(OFF)
+ logInfo("clima.state", "Spegnimento serale clima | {}", clima)
+ }
+ ])
+ ]
end
-rule "Spegnimento Clima OGNI sera 20:00"
+rule "Spegnimento Clima gr2 OGNI sera 19:30 - 19:50"
when
- Time cron "0 0 20 * * ?"
-then
- Heating_GU120_CL_C1_Switch.sendCommand(OFF)
- Heating_GU120_CL_C2_Switch.sendCommand(OFF)
- Heating_GU120_CL_C3_Switch.sendCommand(OFF)
- Heating_GU120_CL_C4_Switch.sendCommand(OFF)
- Heating_GU120_CL_C5_Switch.sendCommand(OFF)
- Heating_GU100_CL_C6_Switch.sendCommand(OFF)
- Heating_GU100_CL_C7_Switch.sendCommand(OFF)
- Heating_GU100_CL_C8_Switch.sendCommand(OFF)
- Heating_GU100_CL_C9_Switch.sendCommand(OFF)
+ Time cron "0 30/10 19 * * ?"
+then
+ gClimaSw2.members.forEach[ clima, i |
+ createTimer(now.plusSeconds(i * 5), [ | // spegne uno ogni 10 secondi
+ if(clima.state == ON)
+ {
+ clima.sendCommand(OFF)
+ logInfo("clima.state", "Spegnimento serale clima | {}", clima)
+ }
+ ])
+ ]
end
-// rule "Spegnimento Clima OGNI sera 20:30"
-// when
-// Time cron "0 30 20 * * ?"
-// then
-// Heating_GU120_CL_C1_Switch.sendCommand(OFF)
-// Heating_GU120_CL_C2_Switch.sendCommand(OFF)
-// Heating_GU120_CL_C3_Switch.sendCommand(OFF)
-// Heating_GU120_CL_C4_Switch.sendCommand(OFF)
-// Heating_GU120_CL_C5_Switch.sendCommand(OFF)
-// Heating_GU100_CL_C6_Switch.sendCommand(OFF)
-// Heating_GU100_CL_C7_Switch.sendCommand(OFF)
-// Heating_GU100_CL_C8_Switch.sendCommand(OFF)
-// Heating_GU100_CL_C9_Switch.sendCommand(OFF)
-// end
-
-rule "Spegnimento Clima OGNI sera 21:00"
+rule "Verifica e Spegnimento Clima OGNI sera 20:00 - 21:45"
when
- Time cron "0 0 21 * * ?"
+ Time cron "0 0/15 20-21 * * ?"
then
- Heating_GU120_CL_C1_Switch.sendCommand(OFF)
- Heating_GU120_CL_C2_Switch.sendCommand(OFF)
- Heating_GU120_CL_C3_Switch.sendCommand(OFF)
- Heating_GU120_CL_C4_Switch.sendCommand(OFF)
- Heating_GU120_CL_C5_Switch.sendCommand(OFF)
- Heating_GU100_CL_C6_Switch.sendCommand(OFF)
- Heating_GU100_CL_C7_Switch.sendCommand(OFF)
- Heating_GU100_CL_C8_Switch.sendCommand(OFF)
- Heating_GU100_CL_C9_Switch.sendCommand(OFF)
+ CL_Switch.members.forEach[ clima, i |
+ createTimer(now.plusSeconds(i * 5), [ | // spegne uno ogni 10 secondi
+ if(clima.state == ON)
+ {
+ clima.sendCommand(OFF)
+ logInfo("clima.state", "Spegnimento serale clima | {}", clima)
+ }
+ ])
+ ]
end
+
/**********************************************************************/
/**********************************************************************
- * Rules x automazione aria VMC
+ * Rules x automazione aria VMC con Bilanciamento Consumi
**********************************************************************/
-rule "Gestione VMC unificata giorno/notte con ping-pong"
+rule "Gestione VMC unificata giorno/notte con bilanciamento carichi"
when
- Time cron "0 0/10 * * * ?" // ogni 10 minuti
+ Time cron "30 0/2 * * * ?" // ogni 2 minuti
then
- val hour = (MyDateTimeItem.state as DateTimeType).zonedDateTime.hour
- val consumo = (Fn_PrelRete.state as Number).intValue
+ val dayOfWeek = now.getDayOfWeek.getValue
+ val hour = now.getHour
val isSummer = (CL_ModoEstivo.state == ON)
+
+ // --- 1. LOGICA DI SPEGNIMENTO TEMPORALE ---
+ var Boolean isTempoDiFunzionamento = true
+ if (dayOfWeek == 7) { isTempoDiFunzionamento = false }
+ else if (dayOfWeek == 6 && hour >= 14) { isTempoDiFunzionamento = false }
+ else if (hour < oraVmcOn || hour >= oraVmcOff) { isTempoDiFunzionamento = false }
- // ---------------------------
- // 1) FASCIA NOTTURNA (es 20 → 6)
- // ---------------------------
- if(hour < oraVmcOn || hour > oraVmcOff) {
- logInfo("VMC.Check", "NOTTE: spegnimento totale forzato")
-
- SonoffServizi01_VorticeVCM.sendCommand(OFF)
- SonoffServizi02_VorticeVCM.sendCommand(OFF)
- ShellySwitchBagno100.sendCommand(OFF)
- ShellySwitchBagno120.sendCommand(OFF)
-
- return
- }
-
- // ---------------------------
- // 2) FASCIA DIURNA (es 7 → 19)
- // ---------------------------
-
- // --- Soglia massima ---
- if(consumo > limPrelievoReteMax) {
- logInfo("VMC.Check", "DIURNO: soglia MAX superata → OFF + OFF | consumo={}", consumo)
-
- SonoffServizi01_VorticeVCM.sendCommand(OFF)
- SonoffServizi02_VorticeVCM.sendCommand(OFF)
- ShellySwitchBagno100.sendCommand(OFF)
- ShellySwitchBagno120.sendCommand(OFF)
-
- return
- }
-
- // --- Soglia minima: PING-PONG ---
- if(consumo > limPrelievoReteMin) {
-
- if(cicloA) {
- logInfo("VMC.Check", "DIURNO: soglia MIN → ciclo A (VMC1 + Bagno100) | consumo={}", consumo)
-
- SonoffServizi01_VorticeVCM.sendCommand(ON)
+ if (!isTempoDiFunzionamento) {
+ if (SonoffServizi01_VorticeVCM.state == ON || SonoffServizi02_VorticeVCM.state == ON) {
+ logInfo("VMC.Check", "OFF totale per fascia oraria/festiva")
+ SonoffServizi01_VorticeVCM.sendCommand(OFF)
SonoffServizi02_VorticeVCM.sendCommand(OFF)
+ ShellySwitchBagno100.sendCommand(OFF)
+ ShellySwitchBagno120.sendCommand(OFF)
+ }
+ return
+ }
+
+ // --- 2. ACQUISIZIONE DATI ---
+ val maxItem = Fn_PrelRete.maximumSince(now.minusMinutes(4))
+ val consumo = (maxItem.state as Number).intValue
+
+ // Recupero consumi giornalieri (gestendo eventuali NULL)
+ val cons100 = if(ShellyBagno100_Day_KWh.state instanceof Number) (ShellyBagno100_Day_KWh.state as Number).floatValue else 0.0
+ val cons120 = if(ShellyBagno120_Day_KWh.state instanceof Number) (ShellyBagno120_Day_KWh.state as Number).floatValue else 0.0
+
+ // --- 3. SOGLIA MASSIMA (Protezione) ---
+ if(consumo > limPrelievoReteMax) {
+ logInfo("VMC.Check", "DIURNO: soglia MAX superata ({}) → Tutto OFF", consumo)
+ SonoffServizi01_VorticeVCM.sendCommand(OFF)
+ SonoffServizi02_VorticeVCM.sendCommand(OFF)
+ ShellySwitchBagno100.sendCommand(OFF)
+ ShellySwitchBagno120.sendCommand(OFF)
+ return
+ }
+
+ // --- 4. SOGLIA MEDIA: BILANCIAMENTO DINAMICO ---
+ if(consumo > limPrelievoReteMin) {
+ // Chi ha consumato meno oggi?
+ if(cons100 <= cons120) {
+ logInfo("VMC.Check", "BILANCIAMENTO: Favorisco Bagno100 (Consumi: 100={}kWh, 120={}kWh) | Rete={}", cons100, cons120, consumo)
+
+ SonoffServizi02_VorticeVCM.sendCommand(ON)
+ SonoffServizi01_VorticeVCM.sendCommand(OFF)
if(!isSummer) {
ShellySwitchBagno100.sendCommand(ON)
ShellySwitchBagno120.sendCommand(OFF)
- } else {
- ShellySwitchBagno100.sendCommand(OFF)
- ShellySwitchBagno120.sendCommand(OFF)
}
-
} else {
- logInfo("VMC.Check", "DIURNO: soglia MIN → ciclo B (VMC2 + Bagno120) | consumo={}", consumo)
-
- SonoffServizi01_VorticeVCM.sendCommand(OFF)
- SonoffServizi02_VorticeVCM.sendCommand(ON)
+ logInfo("VMC.Check", "BILANCIAMENTO: Favorisco Bagno120 (Consumi: 100={}kWh, 120={}kWh) | Rete={}", cons100, cons120, consumo)
+
+ SonoffServizi02_VorticeVCM.sendCommand(OFF)
+ SonoffServizi01_VorticeVCM.sendCommand(ON)
if(!isSummer) {
ShellySwitchBagno100.sendCommand(OFF)
ShellySwitchBagno120.sendCommand(ON)
- } else {
- ShellySwitchBagno100.sendCommand(OFF)
- ShellySwitchBagno120.sendCommand(OFF)
}
}
-
- // alterna ciclo
- cicloA = !cicloA
return
}
- // --- Consumo basso ---
- logInfo("VMC.Check", "DIURNO: tutto OK → ON + ON | consumo={}", consumo)
-
+ // --- 5. CONSUMO BASSO: TUTTO ACCESO ---
+ logInfo("VMC.Check", "DIURNO: Carico basso ({}) → Tutto ON", consumo)
SonoffServizi01_VorticeVCM.sendCommand(ON)
SonoffServizi02_VorticeVCM.sendCommand(ON)
@@ -417,6 +492,7 @@ then
ShellySwitchBagno120.sendCommand(OFF)
}
end
+
/**********************************************************************/
@@ -427,81 +503,123 @@ rule "Fine tuning climatizzatori dinamico"
when
Member of gClimaTrigger changed
then
- // 1. Identificazione
- val triggerName = triggeringItem.name
- // Ricava la base, es: Heating_GU120_CL_C1
- val baseName = triggerName.substring(0, triggerName.lastIndexOf("_"))
+ val long nowMs = now.toInstant.toEpochMilli
+ val itemName = triggeringItem.name
+ val newVal = triggeringItem.state
+
+ logInfo("clima.rule", "{} | Start processing | valore: {}", itemName, newVal)
+
+ // --- 1) Validazione stato numerico ---
+ if (!(newVal instanceof Number))
+ {
+ logInfo("clima.rule", "{}: NewVal non è un numero! {}", itemName, newVal)
+ return
+ }
+
+ // --- 2) Filtro temporale (Debounce) SELETTIVO ---
+ // Applichiamo il debounce SOLO se l'item finisce con _Temp
+ if (itemName.endsWith("_Temp")) {
+ val lastT = lastTime.get(itemName)
+ if (lastT !== null && (nowMs - lastT) < MIN_INTERVAL) {
+ // Processing interrotto solo per sensori troppo logorroici
+ logInfo("clima.rule", "{}: Debounce temporale attivo | val: {}", itemName, newVal)
+ return
+ }
+ lastTime.put(itemName, nowMs)
+ }
+ // Se non è un _Temp (quindi è un Set, Mode o Fan), bypassiamo il debounce
+ // e aggiorniamo comunque il timestamp per coerenza
+ else {
+ lastTime.put(itemName, nowMs)
+ }
+
+ // --- 3) Identificazione stanza ---
+ val baseName = itemName.substring(0, itemName.lastIndexOf("_"))
- // 2. Recupero Item correlati
val itemSet = ScriptServiceUtil.getItemRegistry.getItem(baseName + "_Set")
val itemTemp = ScriptServiceUtil.getItemRegistry.getItem(baseName + "_Temp")
val itemMode = ScriptServiceUtil.getItemRegistry.getItem(baseName + "_Mode")
+ val itemFan = ScriptServiceUtil.getItemRegistry.getItem(baseName + "_Fan")
- // 3. Controllo sicurezza (evitiamo errori se un item è appena nato o non inizializzato)
if (itemSet.state == NULL || itemTemp.state == NULL || itemMode.state == NULL) {
- logWarn("clima.rule", "Uno degli Item per {} è NULL. Esco.", baseName)
- return;
+ logInfo("clima.rule", "{}: Processing interrotto x valori null | itemSet.state {} | itemTemp.state {} | itemMode.state {}", baseName, itemSet.state, itemTemp.state, itemMode.state)
+ return
}
- // 4. Variabili locali
- var target = itemSet.state as Number
- val ambient = itemTemp.state as Number
- val currMode = itemMode.state as Number
-
- // // Costanti (Assicurati che siano definite globalmente o mettile qui)
- // val minTemp = 17
- // val maxTemp = 28
- // val offsetVal = 0.5 // Esempio
- // val range = 0.2 // Esempio
+ // --- 4) Lettura valori ---
+ var Number target = itemSet.state as Number
+ val Number ambient = itemTemp.state as Number
+ val Number currMode = itemMode.state as Number
- // 5. Logica di Business
- // Limito target se fuori range
- if(target < minTemp) {
+ // --- 5) Limiti target (Sanificazione) ---
+ if (target < minTemp) {
+ logInfo("clima.rule", "{}: Fix temp | minTemp {}, Target: {})", baseName, minTemp, target)
target = minTemp
itemSet.sendCommand(target)
- } else if(target > maxTemp) {
+ } else if (target > maxTemp) {
+ logInfo("clima.rule", "{}: Fix temp | maxTemp {}, Target: {})", baseName, maxTemp, target)
target = maxTemp
itemSet.sendCommand(target)
}
+ // --- 6) Logica Hysteresis ---
var Number turnOnTemp = 0
var Number turnOffTemp = 0
if (CL_ModoEstivo.state == ON) {
+ // --- ESTATE (Raffrescamento) ---
turnOnTemp = target + offsetVal
turnOffTemp = target + offsetVal - range
-
+
if (ambient >= turnOnTemp) {
- if(currMode != 3) {
- logInfo("clima.rule", "{}: Attivazione Raffrescamento (Amb: {}, Target: {})", baseName, ambient, target)
+ if (currMode != 3) {
+ logInfo("clima.rule", "{}: Attivazione Raffrescamento (Amb: {}, Target: {}) | Fan: 3", baseName, ambient, target)
itemMode.sendCommand(3)
+ // itemFan.sendCommand(2)
+ itemFan.sendCommand(1)
+ }
+ else{
+ logDebug("clima.rule", "{}: Nessun intervento: (Amb: {}, Target: {}) | ambient >= turnOnTemp", baseName, ambient, target)
}
} else if (ambient <= turnOffTemp) {
- if(currMode != 2) {
- logInfo("clima.rule", "{}: Raggiunto target estate (Amb: {}, Target: {})", baseName, ambient, target)
+ if (currMode != 2) {
+ logInfo("clima.rule", "{}: Target raggiunto -> Standby (Amb: {}, Target: {}) | Fan: 1", baseName, ambient, target)
itemMode.sendCommand(2)
+ itemFan.sendCommand(1)
}
+ else{
+ logDebug("clima.rule", "{}: Nessun intervento: (Amb: {}, Target: {}) | ambient <= turnOffTemp", baseName, ambient, target)
+ }
+
}
} else {
+ // --- INVERNO (Riscaldamento) ---
turnOnTemp = target - offsetVal
turnOffTemp = target - offsetVal + range
-
+
if (ambient <= turnOnTemp) {
- if(currMode != 1) {
- logInfo("clima.rule", "{}: Attivazione Riscaldamento (Amb: {}, Target: {})", baseName, ambient, target)
+ if (currMode != 1) {
+ logInfo("clima.rule", "{}: Attivazione Riscaldamento (Amb: {}, Target: {}) | Fan: 3", baseName, ambient, target)
itemMode.sendCommand(1)
+ itemFan.sendCommand(2)
+ }
+ else{
+ logDebug("clima.rule", "{}: Nessun intervento: (Amb: {}, Target: {} | ambient <= turnOnTemp)", baseName, ambient, target)
}
} else if (ambient >= turnOffTemp) {
- if(currMode != 2) {
- logInfo("clima.rule", "{}: Raggiunto target inverno (Amb: {}, Target: {})", baseName, ambient, target)
+ if (currMode != 2) {
+ logInfo("clima.rule", "{}: Target raggiunto -> Standby (Amb: {}, Target: {}) | Fan: 1", baseName, ambient, target)
itemMode.sendCommand(2)
+ itemFan.sendCommand(1)
+ }
+ else{
+ logDebug("clima.rule", "{}: Nessun intervento: (Amb: {}, Target: {} | ambient >= turnOffTemp)", baseName, ambient, target)
}
}
}
end
-
/**********************************************************************
* Rules x automazione LUCERNARI
**********************************************************************/
@@ -543,214 +661,27 @@ when
then
// impulso ON
SonoffLuci03_Switch1.sendCommand(ON) // U100 Ingresso
+ Thread::sleep(20)
SonoffLuci03_Switch3.sendCommand(ON) // U100 Fila B
+ Thread::sleep(20)
SonoffLuci01_Switch1.sendCommand(ON) // U120 Ingresso
+ Thread::sleep(20)
SonoffLuci01_Switch2.sendCommand(ON) // U120 Muro
+ Thread::sleep(20)
SonoffLuci02_Switch3.sendCommand(ON) // Ufficio Sam
- // impulso OFF dopo 500 ms
+ // impulso OFF dopo 400 ms
createTimer(now.plusMillis(600), [|
SonoffLuci03_Switch1.sendCommand(OFF) // U100 Ingresso
+ Thread::sleep(20)
SonoffLuci03_Switch3.sendCommand(OFF) // U100 Fila B
+ Thread::sleep(20)
SonoffLuci01_Switch1.sendCommand(OFF) // U120 Ingresso
+ Thread::sleep(20)
SonoffLuci01_Switch2.sendCommand(OFF) // U120 Muro
+ Thread::sleep(20)
SonoffLuci02_Switch3.sendCommand(OFF)
])
end
-// rule "Preset luci ufficio"
-// when
-// Item Light_PresetSwitch received command
-// then
-// val luci = newArrayList(
-// SonoffLuci03_Switch1,
-// SonoffLuci03_Switch3,
-// SonoffLuci01_Switch1,
-// SonoffLuci01_Switch2,
-// SonoffLuci02_Switch3,
-// )
-
-// // impulso ON
-// luci.forEach[ l | l.sendCommand(ON) ]
-
-// // impulso OFF dopo 300 ms
-// createTimer(now.plusMillis(300), [|
-// luci.forEach[ l | l.sendCommand(OFF) ]
-// ])
-// end
-
-// rule "Preset luci ufficio"
-// when
-// Item Light_PresetSwitch received command
-// then
-// val luci = newArrayList(
-// SonoffLuci02_Switch3,
-// SonoffLuci02_Switch4
-// )
-
-// // impulso ON
-// luci.forEach[ l | l.sendCommand(ON) ]
-
-// // impulso OFF dopo 300 ms
-// createTimer(now.plusMillis(300), [|
-// luci.forEach[ l | l.sendCommand(OFF) ]
-// ])
-// end
-
-
-// /**
-// * This is a demo rule which simulates a real dimmer by reacting to increase/decrease commands
-// * and posting an updated state on the bus
-// */
-// rule "Dimmed Light"
-// when
-// Item DimmedLight received command
-// then
-// if ((receivedCommand == INCREASE) || (receivedCommand == DECREASE)) {
-// var Number percent = 0
-// if (DimmedLight.state instanceof DecimalType) percent = DimmedLight.state as DecimalType
-
-// if (receivedCommand == INCREASE) percent = percent + 5
-// if (receivedCommand == DECREASE) percent = percent - 5
-
-// if (percent < 0) percent = 0
-// if (percent > 100) percent = 100
-// postUpdate(DimmedLight, percent);
-// }
-// end
-
-// rule "Timer Demo"
-// when
-// Item Light_GF_Corridor_Ceiling received command
-// then
-// if (receivedCommand == ON) {
-// if (timer === null) {
-// // first ON command, so create a timer to turn the light off again
-// timer = createTimer(now.plusSeconds(10)) [|
-// sendCommand(Light_GF_Corridor_Ceiling, OFF)
-// ]
-// } else {
-// // subsequent ON command, so reschedule the existing timer
-// timer.reschedule(now.plusSeconds(10))
-// }
-// } else if (receivedCommand == OFF) {
-// // remove any previously scheduled timer
-// if (timer !== null) {
-// timer.cancel
-// timer = null
-// }
-// }
-// end
-
-/**
- * The following rules help initializing the demo items with some helpful states.
- */
-// rule "Initialize light states"
-// when
-// System started
-// then
-// Lights?.members.forEach(light|
-// postUpdate(light, if (Math::random > 0.7) ON else OFF)
-// )
-// end
-
-// rule "Initialize heating states"
-// when
-// System started
-// then
-// Heating?.members.forEach(heating|
-// postUpdate(heating, if (Math::random > 0.8) ON else OFF)
-// )
-// postUpdate(Temperature_Setpoint, 22)
-// end
-
-// rule "Initialize contact states"
-// when
-// System started
-// then
-// Windows?.members.forEach(window|
-// postUpdate(window, if (Math::random > 0.5) OPEN else CLOSED)
-// )
-// end
-
-// rule "Initialize Location"
-// when
-// System started
-// then
-// DemoLocation.postUpdate(new PointType("52.5200066,13.4049540"))
-// end
-
-// rule "Set random room temperatures"
-// when
-// System started or
-// Time cron "0 0/5 * * * ?"
-// then
-// Temperature?.members.forEach(temperature|
-// postUpdate(temperature, 20.0 + (25.0 - (Math::random * 50.0).intValue) / 10.0)
-// )
-// end
-
-// rule "Set daily max and min temperature"
-// when
-// Item Weather_Temperature changed or
-// Time cron "0 0 0 * * ?" or
-// System started
-// then
-// val max = Weather_Temperature.maximumSince(now.withTimeAtStartOfDay)
-// val min = Weather_Temperature.minimumSince(now.withTimeAtStartOfDay)
-// if (max !== null && min !== null) {
-// postUpdate(Weather_Temp_Max, max.state)
-// postUpdate(Weather_Temp_Min, min.state)
-// }
-// end
-
-// // Creates an item that stores the last update time of this item
-// rule "Records last weather update time"
-// when
-// Item Weather_Temperature received update
-// then
-// postUpdate(Weather_LastUpdate, new DateTimeType())
-// end
-
-// rule "Set random wifi variations"
-// when
-// System started or
-// Time cron "/20 * * * * ?"
-// then
-// postUpdate(Wifi_Level, (Math::random * 4.0).intValue)
-// end
-
-// rule "Set random image URLs"
-// when
-// Time cron "/10 * * * * ?"
-// then
-// val url = urlList.get(random.nextInt(urlList.length))
-// val res = resList.get(random.nextInt(resList.length))
-
-// postUpdate(ImageURL, url + "/" + res)
-// end
-
-// rule "Volume"
-// when
-// Item Volume received command
-// then
-// if (receivedCommand instanceof PercentType) {
-// setMasterVolume(receivedCommand)
-// } else {
-// if (receivedCommand == INCREASE) increaseMasterVolume(20)
-// if (receivedCommand == DECREASE) decreaseMasterVolume(20)
-// }
-// end
-
-// rule "Select Radio Station"
-// when
-// Item Radio_Station received command
-// then
-// switch(receivedCommand) {
-// case 0 : playStream(null)
-// case 1 : playStream("http://metafiles.gl-systemhaus.de/hr/hr3_2.m3u")
-// case 2 : playStream("http://mp3-live.swr3.de/swr3_m.m3u")
-// }
-// end
-
// vim: syntax=Xtend
diff --git a/Egalware/services/addons.cfg b/Egalware/services/addons.cfg
index f89d9c8..79b11f1 100644
--- a/Egalware/services/addons.cfg
+++ b/Egalware/services/addons.cfg
@@ -44,3 +44,8 @@
# A comma-separated list of voice services to install (e.g. "voice = googletts,marytts")
#voice =
+
+binding = ipcamera, netatmo, ipp, daikin, ntp, homeassistant, matter, dirigera, fronius, network, openweathermap, shelly, astro, modbus, mqtt, unifi
+persistence = rrd4j, mapdb
+transformation = regex, jsonpath, map
+ui = basic, habpanel
diff --git a/Egalware/services/runtime.cfg b/Egalware/services/runtime.cfg
index 05033f5..5f2e7de 100644
--- a/Egalware/services/runtime.cfg
+++ b/Egalware/services/runtime.cfg
@@ -155,6 +155,7 @@
#
#org.openhab.network:useIPv6=true
+
################################## EPHEMERIS ###################################
# This parameter defines the default list of usual non workable days for the Ephemeris service.
@@ -179,6 +180,7 @@
#
#org.openhab.ephemeris:city=
+
################################# MISCELLANOUS #################################
# The karaf sshHost parameter configures the bind address for the ssh login to karaf.
@@ -289,6 +291,7 @@
#
#org.openhab.inbox:autoApprove=false
+
################################## WEBCLIENT ###################################
# For installations on higher end systems with many cores, increasing number of webclient threads
@@ -299,8 +302,19 @@
# org.openhab.webclient:minThreadsCustom = 20
# org.openhab.webclient:maxThreadsCustom = 40
+
######################### ITEM CHANNEL LINK REGISTRY ###########################
# If enabled, the ItemChannelLink Registry will always try to apply any tags from the first linked Channel of the respective Item
#
#org.openhab.ItemChannelLinkRegistry:useTags=false
+
+
+################################ RULE ENGINE ###################################
+
+# Disabled-rules cleanup (one-shot on startup)
+# Removes entries from the disabled-rules store that no longer match any existing rule UID.
+# Runs once on start up or when this config is modified, delayed by the configured number of minutes.
+# Value: integer minutes. Set to 0 to disable. Default: 30.
+#
+#org.openhab.ruleengine:disabledRules.cleanupDelayMinutes=30
\ No newline at end of file
diff --git a/Egalware/sitemaps/egalware.sitemap b/Egalware/sitemaps/egalware.sitemap
index 06b8a9f..c2a95e4 100644
--- a/Egalware/sitemaps/egalware.sitemap
+++ b/Egalware/sitemaps/egalware.sitemap
@@ -113,7 +113,7 @@ sitemap egalware label="EgalWare"
// Clima setup manuale
// Inverno
// minValue=[19] maxValue=[25]
- // minValue=19 maxValue=25
+ // minValue=22 maxValue=25
// Estate
// minValue=[22] maxValue=[27]
// minValue=22 maxValue=27
@@ -134,18 +134,10 @@ sitemap egalware label="EgalWare"
}
Text label="Andamento Grafico" icon="material:timeline"
{
- Switch item=CL_GrpScale label="Periodo" mappings=[0="1h",1="4h",2="12h",3="24h",4="3g",5="7g",6="1M",7="1Y"]
- Frame label="Temperature Rilevate"
- {
- Chart item=CL_Temp legend=true visibility=[CL_GrpScale==0] period=h refresh=1000
- Chart item=CL_Temp legend=true visibility=[CL_GrpScale==1] period=4h refresh=4000
- Chart item=CL_Temp legend=true visibility=[CL_GrpScale==2] period=12h refresh=6000
- Chart item=CL_Temp legend=true visibility=[CL_GrpScale==3,CL_GrpScale=="Uninitialized"] period=D refresh=10000
- Chart item=CL_Temp legend=true visibility=[CL_GrpScale==4] period=3D refresh=20000
- Chart item=CL_Temp legend=true visibility=[CL_GrpScale==5] period=W refresh=30000
- Chart item=CL_Temp legend=true visibility=[CL_GrpScale==6] period=M refresh=60000
- Chart item=CL_Temp legend=true visibility=[CL_GrpScale==7] period=Y refresh=60000
+ Frame label="Analisi Interattiva" {
+ Webview url="/page/clima_chart_all" height=16
}
+ Switch item=CL_GrpScale label="Periodo" mappings=[0="1h",1="4h",2="12h",3="24h",4="3g",5="7g",6="1M",7="1Y"]
Frame label="Unità Attive"
{
Chart item=CL_Switch legend=true visibility=[CL_GrpScale==0] period=h refresh=2000
@@ -168,17 +160,6 @@ sitemap egalware label="EgalWare"
Chart item=CL_Mode legend=true visibility=[CL_GrpScale==6] period=M refresh=60000
Chart item=CL_Mode legend=true visibility=[CL_GrpScale==7] period=Y refresh=60000
}
- Frame label="Temp Impostata"
- {
- Chart item=CL_Set legend=true visibility=[CL_GrpScale==0] period=h refresh=2000
- Chart item=CL_Set legend=true visibility=[CL_GrpScale==1] period=4h refresh=4000
- Chart item=CL_Set legend=true visibility=[CL_GrpScale==2] period=12h refresh=6000
- Chart item=CL_Set legend=true visibility=[CL_GrpScale==3,CL_GrpScale=="Uninitialized"] period=D refresh=10000
- Chart item=CL_Set legend=true visibility=[CL_GrpScale==4] period=3D refresh=20000
- Chart item=CL_Set legend=true visibility=[CL_GrpScale==5] period=W refresh=30000
- Chart item=CL_Set legend=true visibility=[CL_GrpScale==6] period=M refresh=60000
- Chart item=CL_Set legend=true visibility=[CL_GrpScale==7] period=Y refresh=60000
- }
Frame label="Velocita"
{
Chart item=CL_Fan legend=true visibility=[CL_GrpScale==0] period=h refresh=2000
@@ -194,15 +175,15 @@ sitemap egalware label="EgalWare"
Group item=CL_Temp label="Temperatura (Media)" icon="material:thermostat"
Group item=CL_Set label="Set Temperature" icon="material:thermostat_auto"
{
- Setpoint item=Heating_GU120_CL_C1_Set minValue=19 maxValue=25 step=1 label="Set Ingresso"
- Setpoint item=Heating_GU120_CL_C2_Set minValue=19 maxValue=25 step=1 label="Set Corridoio"
- Setpoint item=Heating_GU120_CL_C3_Set minValue=19 maxValue=25 step=1 label="Set Finestra"
- Setpoint item=Heating_GU120_CL_C4_Set minValue=19 maxValue=25 step=1 label="Set Uff Samuele"
- Setpoint item=Heating_GU120_CL_C5_Set minValue=19 maxValue=25 step=1 label="Set Uff EmmanueleUff"
- Setpoint item=Heating_GU100_CL_C6_Set minValue=19 maxValue=25 step=1 label="Set Desk"
- Setpoint item=Heating_GU100_CL_C7_Set minValue=19 maxValue=25 step=1 label="Set OpenSpace"
- Setpoint item=Heating_GU100_CL_C8_Set minValue=19 maxValue=25 step=1 label="Set Uff Dario"
- Setpoint item=Heating_GU100_CL_C9_Set minValue=19 maxValue=25 step=1 label="Set Sala Riunioni"
+ Setpoint item=Heating_GU120_CL_C1_Set minValue=22 maxValue=27 step=1 label="Set Ingresso"
+ Setpoint item=Heating_GU120_CL_C2_Set minValue=22 maxValue=27 step=1 label="Set Corridoio"
+ Setpoint item=Heating_GU120_CL_C3_Set minValue=22 maxValue=27 step=1 label="Set Finestra"
+ Setpoint item=Heating_GU120_CL_C4_Set minValue=22 maxValue=27 step=1 label="Set Uff Samuele"
+ Setpoint item=Heating_GU120_CL_C5_Set minValue=22 maxValue=27 step=1 label="Set Uff EmmanueleUff"
+ Setpoint item=Heating_GU100_CL_C6_Set minValue=22 maxValue=27 step=1 label="Set Desk"
+ Setpoint item=Heating_GU100_CL_C7_Set minValue=22 maxValue=27 step=1 label="Set OpenSpace"
+ Setpoint item=Heating_GU100_CL_C8_Set minValue=22 maxValue=27 step=1 label="Set Uff Dario"
+ Setpoint item=Heating_GU100_CL_C9_Set minValue=22 maxValue=27 step=1 label="Set Sala Riunioni"
}
Group item=CL_Mode icon="material:ac_unit"
{
@@ -238,39 +219,11 @@ sitemap egalware label="EgalWare"
Switch item=Heating_GU120_CL_C1_Switch
Text item=Heating_GU120_CL_C1_Temp icon="material:timeline"
{
- Switch item=CL_GrpScale label="Periodo" icon="material:timeline" mappings=[0="1h",1="4h",2="12h", 3="24h", 4="7g", 5="1M", 6="1Y"]
- Frame label="Temperatura"
- {
- Chart item=Heating_GU120_CL_C1_Temp legend=true visibility=[CL_GrpScale==0] period=h refresh=2000
- Chart item=Heating_GU120_CL_C1_Temp legend=true visibility=[CL_GrpScale==1] period=4h refresh=5000
- Chart item=Heating_GU120_CL_C1_Temp legend=true visibility=[CL_GrpScale==2,CL_GrpScale=="Uninitialized"] period=12h refresh=10000
- Chart item=Heating_GU120_CL_C1_Temp legend=true visibility=[CL_GrpScale==3] period=D refresh=60000
- Chart item=Heating_GU120_CL_C1_Temp legend=true visibility=[CL_GrpScale==4] period=W refresh=60000
- Chart item=Heating_GU120_CL_C1_Temp legend=true visibility=[CL_GrpScale==5] period=M refresh=60000
- Chart item=Heating_GU120_CL_C1_Temp legend=true visibility=[CL_GrpScale==6] period=Y refresh=60000
- }
- Frame label="Modo"
- {
- Chart item=Heating_GU120_CL_C1_Mode legend=true visibility=[CL_GrpScale==0] period=h refresh=2000
- Chart item=Heating_GU120_CL_C1_Mode legend=true visibility=[CL_GrpScale==1] period=4h refresh=5000
- Chart item=Heating_GU120_CL_C1_Mode legend=true visibility=[CL_GrpScale==2,CL_GrpScale=="Uninitialized"] period=12h refresh=10000
- Chart item=Heating_GU120_CL_C1_Mode legend=true visibility=[CL_GrpScale==3] period=D refresh=60000
- Chart item=Heating_GU120_CL_C1_Mode legend=true visibility=[CL_GrpScale==4] period=W refresh=60000
- Chart item=Heating_GU120_CL_C1_Mode legend=true visibility=[CL_GrpScale==5] period=M refresh=60000
- Chart item=Heating_GU120_CL_C1_Mode legend=true visibility=[CL_GrpScale==6] period=Y refresh=60000
- }
- Frame label="Fan Speed"
- {
- Chart item=Heating_GU120_CL_C1_Fan legend=true visibility=[CL_GrpScale==0] period=h refresh=2000
- Chart item=Heating_GU120_CL_C1_Fan legend=true visibility=[CL_GrpScale==1] period=4h refresh=5000
- Chart item=Heating_GU120_CL_C1_Fan legend=true visibility=[CL_GrpScale==2,CL_GrpScale=="Uninitialized"] period=12h refresh=10000
- Chart item=Heating_GU120_CL_C1_Fan legend=true visibility=[CL_GrpScale==3] period=D refresh=60000
- Chart item=Heating_GU120_CL_C1_Fan legend=true visibility=[CL_GrpScale==4] period=W refresh=60000
- Chart item=Heating_GU120_CL_C1_Fan legend=true visibility=[CL_GrpScale==5] period=M refresh=60000
- Chart item=Heating_GU120_CL_C1_Fan legend=true visibility=[CL_GrpScale==6] period=Y refresh=60000
+ Frame label="Analisi Interattiva" {
+ Webview url="/page/clima_chart_c1" height=16
}
}
- Setpoint item=Heating_GU120_CL_C1_Set minValue=19 maxValue=23 step=1 label="Imp. Ingresso"
+ Setpoint item=Heating_GU120_CL_C1_Set minValue=22 maxValue=27 step=1 label="Imp. Ingresso"
Setpoint item=Heating_GU120_CL_C1_Mode minValue=1 maxValue=4 step=1
Setpoint item=Heating_GU120_CL_C1_Fan minValue=1 maxValue=3 step=1
}
@@ -279,39 +232,11 @@ sitemap egalware label="EgalWare"
Switch item=Heating_GU120_CL_C2_Switch
Text item=Heating_GU120_CL_C2_Temp icon="material:timeline"
{
- Switch item=CL_GrpScale label="Periodo" icon="material:timeline" mappings=[0="1h",1="4h",2="12h", 3="24h", 4="7g", 5="1M", 6="1Y"]
- Frame label="Temperatura"
- {
- Chart item=Heating_GU120_CL_C2_Temp legend=true visibility=[CL_GrpScale==0] period=h refresh=2000
- Chart item=Heating_GU120_CL_C2_Temp legend=true visibility=[CL_GrpScale==1] period=4h refresh=5000
- Chart item=Heating_GU120_CL_C2_Temp legend=true visibility=[CL_GrpScale==2,CL_GrpScale=="Uninitialized"] period=12h refresh=10000
- Chart item=Heating_GU120_CL_C2_Temp legend=true visibility=[CL_GrpScale==3] period=D refresh=60000
- Chart item=Heating_GU120_CL_C2_Temp legend=true visibility=[CL_GrpScale==4] period=W refresh=60000
- Chart item=Heating_GU120_CL_C2_Temp legend=true visibility=[CL_GrpScale==5] period=M refresh=60000
- Chart item=Heating_GU120_CL_C2_Temp legend=true visibility=[CL_GrpScale==6] period=Y refresh=60000
- }
- Frame label="Modo"
- {
- Chart item=Heating_GU120_CL_C2_Mode legend=true visibility=[CL_GrpScale==0] period=h refresh=2000
- Chart item=Heating_GU120_CL_C2_Mode legend=true visibility=[CL_GrpScale==1] period=4h refresh=5000
- Chart item=Heating_GU120_CL_C2_Mode legend=true visibility=[CL_GrpScale==2,CL_GrpScale=="Uninitialized"] period=12h refresh=10000
- Chart item=Heating_GU120_CL_C2_Mode legend=true visibility=[CL_GrpScale==3] period=D refresh=60000
- Chart item=Heating_GU120_CL_C2_Mode legend=true visibility=[CL_GrpScale==4] period=W refresh=60000
- Chart item=Heating_GU120_CL_C2_Mode legend=true visibility=[CL_GrpScale==5] period=M refresh=60000
- Chart item=Heating_GU120_CL_C2_Mode legend=true visibility=[CL_GrpScale==6] period=Y refresh=60000
- }
- Frame label="Fan Speed"
- {
- Chart item=Heating_GU120_CL_C2_Fan legend=true visibility=[CL_GrpScale==0] period=h refresh=2000
- Chart item=Heating_GU120_CL_C2_Fan legend=true visibility=[CL_GrpScale==1] period=4h refresh=5000
- Chart item=Heating_GU120_CL_C2_Fan legend=true visibility=[CL_GrpScale==2,CL_GrpScale=="Uninitialized"] period=12h refresh=10000
- Chart item=Heating_GU120_CL_C2_Fan legend=true visibility=[CL_GrpScale==3] period=D refresh=60000
- Chart item=Heating_GU120_CL_C2_Fan legend=true visibility=[CL_GrpScale==4] period=W refresh=60000
- Chart item=Heating_GU120_CL_C2_Fan legend=true visibility=[CL_GrpScale==5] period=M refresh=60000
- Chart item=Heating_GU120_CL_C2_Fan legend=true visibility=[CL_GrpScale==6] period=Y refresh=60000
+ Frame label="Analisi Interattiva" {
+ Webview url="/page/clima_chart_c2" height=16
}
}
- Setpoint item=Heating_GU120_CL_C2_Set minValue=19 maxValue=23 step=1 label="Imp. Corridoio"
+ Setpoint item=Heating_GU120_CL_C2_Set minValue=22 maxValue=27 step=1 label="Imp. Corridoio"
Setpoint item=Heating_GU120_CL_C2_Mode minValue=1 maxValue=4 step=1
Setpoint item=Heating_GU120_CL_C2_Fan minValue=1 maxValue=3 step=1
}
@@ -320,39 +245,11 @@ sitemap egalware label="EgalWare"
Switch item=Heating_GU120_CL_C3_Switch
Text item=Heating_GU120_CL_C3_Temp icon="material:timeline"
{
- Switch item=CL_GrpScale label="Periodo" icon="material:timeline" mappings=[0="1h",1="4h",2="12h", 3="24h", 4="7g", 5="1M", 6="1Y"]
- Frame label="Temperatura"
- {
- Chart item=Heating_GU120_CL_C3_Temp legend=true visibility=[CL_GrpScale==0] period=h refresh=2000
- Chart item=Heating_GU120_CL_C3_Temp legend=true visibility=[CL_GrpScale==1] period=4h refresh=5000
- Chart item=Heating_GU120_CL_C3_Temp legend=true visibility=[CL_GrpScale==2,CL_GrpScale=="Uninitialized"] period=12h refresh=10000
- Chart item=Heating_GU120_CL_C3_Temp legend=true visibility=[CL_GrpScale==3] period=D refresh=60000
- Chart item=Heating_GU120_CL_C3_Temp legend=true visibility=[CL_GrpScale==4] period=W refresh=60000
- Chart item=Heating_GU120_CL_C3_Temp legend=true visibility=[CL_GrpScale==5] period=M refresh=60000
- Chart item=Heating_GU120_CL_C3_Temp legend=true visibility=[CL_GrpScale==6] period=Y refresh=60000
- }
- Frame label="Modo"
- {
- Chart item=Heating_GU120_CL_C3_Mode legend=true visibility=[CL_GrpScale==0] period=h refresh=2000
- Chart item=Heating_GU120_CL_C3_Mode legend=true visibility=[CL_GrpScale==1] period=4h refresh=5000
- Chart item=Heating_GU120_CL_C3_Mode legend=true visibility=[CL_GrpScale==2,CL_GrpScale=="Uninitialized"] period=12h refresh=10000
- Chart item=Heating_GU120_CL_C3_Mode legend=true visibility=[CL_GrpScale==3] period=D refresh=60000
- Chart item=Heating_GU120_CL_C3_Mode legend=true visibility=[CL_GrpScale==4] period=W refresh=60000
- Chart item=Heating_GU120_CL_C3_Mode legend=true visibility=[CL_GrpScale==5] period=M refresh=60000
- Chart item=Heating_GU120_CL_C3_Mode legend=true visibility=[CL_GrpScale==6] period=Y refresh=60000
- }
- Frame label="Fan Speed"
- {
- Chart item=Heating_GU120_CL_C3_Fan legend=true visibility=[CL_GrpScale==0] period=h refresh=2000
- Chart item=Heating_GU120_CL_C3_Fan legend=true visibility=[CL_GrpScale==1] period=4h refresh=5000
- Chart item=Heating_GU120_CL_C3_Fan legend=true visibility=[CL_GrpScale==2,CL_GrpScale=="Uninitialized"] period=12h refresh=10000
- Chart item=Heating_GU120_CL_C3_Fan legend=true visibility=[CL_GrpScale==3] period=D refresh=60000
- Chart item=Heating_GU120_CL_C3_Fan legend=true visibility=[CL_GrpScale==4] period=W refresh=60000
- Chart item=Heating_GU120_CL_C3_Fan legend=true visibility=[CL_GrpScale==5] period=M refresh=60000
- Chart item=Heating_GU120_CL_C3_Fan legend=true visibility=[CL_GrpScale==6] period=Y refresh=60000
+ Frame label="Analisi Interattiva" {
+ Webview url="/page/clima_chart_c3" height=16
}
}
- Setpoint item=Heating_GU120_CL_C3_Set minValue=19 maxValue=23 step=1 label="Imp. Finestra"
+ Setpoint item=Heating_GU120_CL_C3_Set minValue=22 maxValue=27 step=1 label="Imp. Finestra"
Setpoint item=Heating_GU120_CL_C3_Mode minValue=1 maxValue=4 step=1
Setpoint item=Heating_GU120_CL_C3_Fan minValue=1 maxValue=3 step=1
}
@@ -361,39 +258,11 @@ sitemap egalware label="EgalWare"
Switch item=Heating_GU120_CL_C4_Switch
Text item=Heating_GU120_CL_C4_Temp icon="material:timeline"
{
- Switch item=CL_GrpScale label="Periodo" icon="material:timeline" mappings=[0="1h",1="4h",2="12h", 3="24h", 4="7g", 5="1M", 6="1Y"]
- Frame label="Temperatura"
- {
- Chart item=Heating_GU120_CL_C4_Temp legend=true visibility=[CL_GrpScale==0] period=h refresh=2000
- Chart item=Heating_GU120_CL_C4_Temp legend=true visibility=[CL_GrpScale==1] period=4h refresh=5000
- Chart item=Heating_GU120_CL_C4_Temp legend=true visibility=[CL_GrpScale==2,CL_GrpScale=="Uninitialized"] period=12h refresh=10000
- Chart item=Heating_GU120_CL_C4_Temp legend=true visibility=[CL_GrpScale==3] period=D refresh=60000
- Chart item=Heating_GU120_CL_C4_Temp legend=true visibility=[CL_GrpScale==4] period=W refresh=60000
- Chart item=Heating_GU120_CL_C4_Temp legend=true visibility=[CL_GrpScale==5] period=M refresh=60000
- Chart item=Heating_GU120_CL_C4_Temp legend=true visibility=[CL_GrpScale==6] period=Y refresh=60000
- }
- Frame label="Modo"
- {
- Chart item=Heating_GU120_CL_C4_Mode legend=true visibility=[CL_GrpScale==0] period=h refresh=2000
- Chart item=Heating_GU120_CL_C4_Mode legend=true visibility=[CL_GrpScale==1] period=4h refresh=5000
- Chart item=Heating_GU120_CL_C4_Mode legend=true visibility=[CL_GrpScale==2,CL_GrpScale=="Uninitialized"] period=12h refresh=10000
- Chart item=Heating_GU120_CL_C4_Mode legend=true visibility=[CL_GrpScale==3] period=D refresh=60000
- Chart item=Heating_GU120_CL_C4_Mode legend=true visibility=[CL_GrpScale==4] period=W refresh=60000
- Chart item=Heating_GU120_CL_C4_Mode legend=true visibility=[CL_GrpScale==5] period=M refresh=60000
- Chart item=Heating_GU120_CL_C4_Mode legend=true visibility=[CL_GrpScale==6] period=Y refresh=60000
- }
- Frame label="Fan Speed"
- {
- Chart item=Heating_GU120_CL_C4_Fan legend=true visibility=[CL_GrpScale==0] period=h refresh=2000
- Chart item=Heating_GU120_CL_C4_Fan legend=true visibility=[CL_GrpScale==1] period=4h refresh=5000
- Chart item=Heating_GU120_CL_C4_Fan legend=true visibility=[CL_GrpScale==2,CL_GrpScale=="Uninitialized"] period=12h refresh=10000
- Chart item=Heating_GU120_CL_C4_Fan legend=true visibility=[CL_GrpScale==3] period=D refresh=60000
- Chart item=Heating_GU120_CL_C4_Fan legend=true visibility=[CL_GrpScale==4] period=W refresh=60000
- Chart item=Heating_GU120_CL_C4_Fan legend=true visibility=[CL_GrpScale==5] period=M refresh=60000
- Chart item=Heating_GU120_CL_C4_Fan legend=true visibility=[CL_GrpScale==6] period=Y refresh=60000
+ Frame label="Analisi Interattiva" {
+ Webview url="/page/clima_chart_c4" height=16
}
}
- Setpoint item=Heating_GU120_CL_C4_Set minValue=19 maxValue=23 step=1 label="Imp. Ufficio Samuele"
+ Setpoint item=Heating_GU120_CL_C4_Set minValue=22 maxValue=27 step=1 label="Imp. Ufficio Samuele"
Setpoint item=Heating_GU120_CL_C4_Mode minValue=1 maxValue=4 step=1
Setpoint item=Heating_GU120_CL_C4_Fan minValue=1 maxValue=3 step=1
}
@@ -402,39 +271,11 @@ sitemap egalware label="EgalWare"
Switch item=Heating_GU120_CL_C5_Switch
Text item=Heating_GU120_CL_C5_Temp icon="material:timeline"
{
- Switch item=CL_GrpScale label="Periodo" icon="material:timeline" mappings=[0="1h",1="4h",2="12h", 3="24h", 4="7g", 5="1M", 6="1Y"]
- Frame label="Temperatura"
- {
- Chart item=Heating_GU120_CL_C5_Temp legend=true visibility=[CL_GrpScale==0] period=h refresh=2000
- Chart item=Heating_GU120_CL_C5_Temp legend=true visibility=[CL_GrpScale==1] period=4h refresh=5000
- Chart item=Heating_GU120_CL_C5_Temp legend=true visibility=[CL_GrpScale==2,CL_GrpScale=="Uninitialized"] period=12h refresh=10000
- Chart item=Heating_GU120_CL_C5_Temp legend=true visibility=[CL_GrpScale==3] period=D refresh=60000
- Chart item=Heating_GU120_CL_C5_Temp legend=true visibility=[CL_GrpScale==4] period=W refresh=60000
- Chart item=Heating_GU120_CL_C5_Temp legend=true visibility=[CL_GrpScale==5] period=M refresh=60000
- Chart item=Heating_GU120_CL_C5_Temp legend=true visibility=[CL_GrpScale==6] period=Y refresh=60000
- }
- Frame label="Modo"
- {
- Chart item=Heating_GU120_CL_C5_Mode legend=true visibility=[CL_GrpScale==0] period=h refresh=2000
- Chart item=Heating_GU120_CL_C5_Mode legend=true visibility=[CL_GrpScale==1] period=4h refresh=5000
- Chart item=Heating_GU120_CL_C5_Mode legend=true visibility=[CL_GrpScale==2,CL_GrpScale=="Uninitialized"] period=12h refresh=10000
- Chart item=Heating_GU120_CL_C5_Mode legend=true visibility=[CL_GrpScale==3] period=D refresh=60000
- Chart item=Heating_GU120_CL_C5_Mode legend=true visibility=[CL_GrpScale==4] period=W refresh=60000
- Chart item=Heating_GU120_CL_C5_Mode legend=true visibility=[CL_GrpScale==5] period=M refresh=60000
- Chart item=Heating_GU120_CL_C5_Mode legend=true visibility=[CL_GrpScale==6] period=Y refresh=60000
- }
- Frame label="Fan Speed"
- {
- Chart item=Heating_GU120_CL_C5_Fan legend=true visibility=[CL_GrpScale==0] period=h refresh=2000
- Chart item=Heating_GU120_CL_C5_Fan legend=true visibility=[CL_GrpScale==1] period=4h refresh=5000
- Chart item=Heating_GU120_CL_C5_Fan legend=true visibility=[CL_GrpScale==2,CL_GrpScale=="Uninitialized"] period=12h refresh=10000
- Chart item=Heating_GU120_CL_C5_Fan legend=true visibility=[CL_GrpScale==3] period=D refresh=60000
- Chart item=Heating_GU120_CL_C5_Fan legend=true visibility=[CL_GrpScale==4] period=W refresh=60000
- Chart item=Heating_GU120_CL_C5_Fan legend=true visibility=[CL_GrpScale==5] period=M refresh=60000
- Chart item=Heating_GU120_CL_C5_Fan legend=true visibility=[CL_GrpScale==6] period=Y refresh=60000
+ Frame label="Analisi Interattiva" {
+ Webview url="/page/clima_chart_c5" height=16
}
}
- Setpoint item=Heating_GU120_CL_C5_Set minValue=19 maxValue=23 step=1 label="Imp. Uff Emmanuele"
+ Setpoint item=Heating_GU120_CL_C5_Set minValue=22 maxValue=27 step=1 label="Imp. Uff Emmanuele"
Setpoint item=Heating_GU120_CL_C5_Mode minValue=1 maxValue=4 step=1
Setpoint item=Heating_GU120_CL_C5_Fan minValue=1 maxValue=3 step=1
}
@@ -443,39 +284,11 @@ sitemap egalware label="EgalWare"
Switch item=Heating_GU100_CL_C6_Switch
Text item=Heating_GU100_CL_C6_Temp icon="material:timeline"
{
- Switch item=CL_GrpScale label="Periodo" icon="material:timeline" mappings=[0="1h",1="4h",2="12h", 3="24h", 4="7g", 5="1M", 6="1Y"]
- Frame label="Temperatura"
- {
- Chart item=Heating_GU100_CL_C6_Temp legend=true visibility=[CL_GrpScale==0] period=h refresh=2000
- Chart item=Heating_GU100_CL_C6_Temp legend=true visibility=[CL_GrpScale==1] period=4h refresh=5000
- Chart item=Heating_GU100_CL_C6_Temp legend=true visibility=[CL_GrpScale==2,CL_GrpScale=="Uninitialized"] period=12h refresh=10000
- Chart item=Heating_GU100_CL_C6_Temp legend=true visibility=[CL_GrpScale==3] period=D refresh=60000
- Chart item=Heating_GU100_CL_C6_Temp legend=true visibility=[CL_GrpScale==4] period=W refresh=60000
- Chart item=Heating_GU100_CL_C6_Temp legend=true visibility=[CL_GrpScale==5] period=M refresh=60000
- Chart item=Heating_GU100_CL_C6_Temp legend=true visibility=[CL_GrpScale==6] period=Y refresh=60000
- }
- Frame label="Modo"
- {
- Chart item=Heating_GU100_CL_C6_Mode legend=true visibility=[CL_GrpScale==0] period=h refresh=2000
- Chart item=Heating_GU100_CL_C6_Mode legend=true visibility=[CL_GrpScale==1] period=4h refresh=5000
- Chart item=Heating_GU100_CL_C6_Mode legend=true visibility=[CL_GrpScale==2,CL_GrpScale=="Uninitialized"] period=12h refresh=10000
- Chart item=Heating_GU100_CL_C6_Mode legend=true visibility=[CL_GrpScale==3] period=D refresh=60000
- Chart item=Heating_GU100_CL_C6_Mode legend=true visibility=[CL_GrpScale==4] period=W refresh=60000
- Chart item=Heating_GU100_CL_C6_Mode legend=true visibility=[CL_GrpScale==5] period=M refresh=60000
- Chart item=Heating_GU100_CL_C6_Mode legend=true visibility=[CL_GrpScale==6] period=Y refresh=60000
- }
- Frame label="Fan Speed"
- {
- Chart item=Heating_GU100_CL_C6_Fan legend=true visibility=[CL_GrpScale==0] period=h refresh=2000
- Chart item=Heating_GU100_CL_C6_Fan legend=true visibility=[CL_GrpScale==1] period=4h refresh=5000
- Chart item=Heating_GU100_CL_C6_Fan legend=true visibility=[CL_GrpScale==2,CL_GrpScale=="Uninitialized"] period=12h refresh=10000
- Chart item=Heating_GU100_CL_C6_Fan legend=true visibility=[CL_GrpScale==3] period=D refresh=60000
- Chart item=Heating_GU100_CL_C6_Fan legend=true visibility=[CL_GrpScale==4] period=W refresh=60000
- Chart item=Heating_GU100_CL_C6_Fan legend=true visibility=[CL_GrpScale==5] period=M refresh=60000
- Chart item=Heating_GU100_CL_C6_Fan legend=true visibility=[CL_GrpScale==6] period=Y refresh=60000
+ Frame label="Analisi Interattiva" {
+ Webview url="/page/clima_chart_c6" height=16
}
}
- Setpoint item=Heating_GU100_CL_C6_Set minValue=19 maxValue=23 step=1
+ Setpoint item=Heating_GU100_CL_C6_Set minValue=22 maxValue=27 step=1
Setpoint item=Heating_GU100_CL_C6_Mode minValue=1 maxValue=4 step=1
Setpoint item=Heating_GU100_CL_C6_Fan minValue=1 maxValue=3 step=1
}
@@ -484,39 +297,11 @@ sitemap egalware label="EgalWare"
Switch item=Heating_GU100_CL_C7_Switch
Text item=Heating_GU100_CL_C7_Temp icon="material:timeline"
{
- Switch item=CL_GrpScale label="Periodo" icon="material:timeline" mappings=[0="1h",1="4h",2="12h", 3="24h", 4="7g", 5="1M", 6="1Y"]
- Frame label="Temperatura"
- {
- Chart item=Heating_GU100_CL_C7_Temp legend=true visibility=[CL_GrpScale==0] period=h refresh=2000
- Chart item=Heating_GU100_CL_C7_Temp legend=true visibility=[CL_GrpScale==1] period=4h refresh=5000
- Chart item=Heating_GU100_CL_C7_Temp legend=true visibility=[CL_GrpScale==2,CL_GrpScale=="Uninitialized"] period=12h refresh=10000
- Chart item=Heating_GU100_CL_C7_Temp legend=true visibility=[CL_GrpScale==3] period=D refresh=60000
- Chart item=Heating_GU100_CL_C7_Temp legend=true visibility=[CL_GrpScale==4] period=W refresh=60000
- Chart item=Heating_GU100_CL_C7_Temp legend=true visibility=[CL_GrpScale==5] period=M refresh=60000
- Chart item=Heating_GU100_CL_C7_Temp legend=true visibility=[CL_GrpScale==6] period=Y refresh=60000
- }
- Frame label="Modo"
- {
- Chart item=Heating_GU100_CL_C7_Mode legend=true visibility=[CL_GrpScale==0] period=h refresh=2000
- Chart item=Heating_GU100_CL_C7_Mode legend=true visibility=[CL_GrpScale==1] period=4h refresh=5000
- Chart item=Heating_GU100_CL_C7_Mode legend=true visibility=[CL_GrpScale==2,CL_GrpScale=="Uninitialized"] period=12h refresh=10000
- Chart item=Heating_GU100_CL_C7_Mode legend=true visibility=[CL_GrpScale==3] period=D refresh=60000
- Chart item=Heating_GU100_CL_C7_Mode legend=true visibility=[CL_GrpScale==4] period=W refresh=60000
- Chart item=Heating_GU100_CL_C7_Mode legend=true visibility=[CL_GrpScale==5] period=M refresh=60000
- Chart item=Heating_GU100_CL_C7_Mode legend=true visibility=[CL_GrpScale==6] period=Y refresh=60000
- }
- Frame label="Fan Speed"
- {
- Chart item=Heating_GU100_CL_C7_Fan legend=true visibility=[CL_GrpScale==0] period=h refresh=2000
- Chart item=Heating_GU100_CL_C7_Fan legend=true visibility=[CL_GrpScale==1] period=4h refresh=5000
- Chart item=Heating_GU100_CL_C7_Fan legend=true visibility=[CL_GrpScale==2,CL_GrpScale=="Uninitialized"] period=12h refresh=10000
- Chart item=Heating_GU100_CL_C7_Fan legend=true visibility=[CL_GrpScale==3] period=D refresh=60000
- Chart item=Heating_GU100_CL_C7_Fan legend=true visibility=[CL_GrpScale==4] period=W refresh=60000
- Chart item=Heating_GU100_CL_C7_Fan legend=true visibility=[CL_GrpScale==5] period=M refresh=60000
- Chart item=Heating_GU100_CL_C7_Fan legend=true visibility=[CL_GrpScale==6] period=Y refresh=60000
+ Frame label="Analisi Interattiva" {
+ Webview url="/page/clima_chart_c7" height=16
}
}
- Setpoint item=Heating_GU100_CL_C7_Set minValue=19 maxValue=23 step=1
+ Setpoint item=Heating_GU100_CL_C7_Set minValue=22 maxValue=27 step=1
Setpoint item=Heating_GU100_CL_C7_Mode minValue=1 maxValue=4 step=1
Setpoint item=Heating_GU100_CL_C7_Fan minValue=1 maxValue=3 step=1
}
@@ -525,39 +310,11 @@ sitemap egalware label="EgalWare"
Switch item=Heating_GU100_CL_C8_Switch
Text item=Heating_GU100_CL_C8_Temp icon="material:timeline"
{
- Switch item=CL_GrpScale label="Periodo" icon="material:timeline" mappings=[0="1h",1="4h",2="12h", 3="24h", 4="7g", 5="1M", 6="1Y"]
- Frame label="Temperatura"
- {
- Chart item=Heating_GU100_CL_C8_Temp legend=true visibility=[CL_GrpScale==0] period=h refresh=2000
- Chart item=Heating_GU100_CL_C8_Temp legend=true visibility=[CL_GrpScale==1] period=4h refresh=5000
- Chart item=Heating_GU100_CL_C8_Temp legend=true visibility=[CL_GrpScale==2,CL_GrpScale=="Uninitialized"] period=12h refresh=10000
- Chart item=Heating_GU100_CL_C8_Temp legend=true visibility=[CL_GrpScale==3] period=D refresh=60000
- Chart item=Heating_GU100_CL_C8_Temp legend=true visibility=[CL_GrpScale==4] period=W refresh=60000
- Chart item=Heating_GU100_CL_C8_Temp legend=true visibility=[CL_GrpScale==5] period=M refresh=60000
- Chart item=Heating_GU100_CL_C8_Temp legend=true visibility=[CL_GrpScale==6] period=Y refresh=60000
- }
- Frame label="Modo"
- {
- Chart item=Heating_GU100_CL_C8_Mode legend=true visibility=[CL_GrpScale==0] period=h refresh=2000
- Chart item=Heating_GU100_CL_C8_Mode legend=true visibility=[CL_GrpScale==1] period=4h refresh=5000
- Chart item=Heating_GU100_CL_C8_Mode legend=true visibility=[CL_GrpScale==2,CL_GrpScale=="Uninitialized"] period=12h refresh=10000
- Chart item=Heating_GU100_CL_C8_Mode legend=true visibility=[CL_GrpScale==3] period=D refresh=60000
- Chart item=Heating_GU100_CL_C8_Mode legend=true visibility=[CL_GrpScale==4] period=W refresh=60000
- Chart item=Heating_GU100_CL_C8_Mode legend=true visibility=[CL_GrpScale==5] period=M refresh=60000
- Chart item=Heating_GU100_CL_C8_Mode legend=true visibility=[CL_GrpScale==6] period=Y refresh=60000
- }
- Frame label="Fan Speed"
- {
- Chart item=Heating_GU100_CL_C8_Fan legend=true visibility=[CL_GrpScale==0] period=h refresh=2000
- Chart item=Heating_GU100_CL_C8_Fan legend=true visibility=[CL_GrpScale==1] period=4h refresh=5000
- Chart item=Heating_GU100_CL_C8_Fan legend=true visibility=[CL_GrpScale==2,CL_GrpScale=="Uninitialized"] period=12h refresh=10000
- Chart item=Heating_GU100_CL_C8_Fan legend=true visibility=[CL_GrpScale==3] period=D refresh=60000
- Chart item=Heating_GU100_CL_C8_Fan legend=true visibility=[CL_GrpScale==4] period=W refresh=60000
- Chart item=Heating_GU100_CL_C8_Fan legend=true visibility=[CL_GrpScale==5] period=M refresh=60000
- Chart item=Heating_GU100_CL_C8_Fan legend=true visibility=[CL_GrpScale==6] period=Y refresh=60000
+ Frame label="Analisi Interattiva" {
+ Webview url="/page/clima_chart_c8" height=16
}
}
- Setpoint item=Heating_GU100_CL_C8_Set minValue=19 maxValue=23 step=1
+ Setpoint item=Heating_GU100_CL_C8_Set minValue=22 maxValue=27 step=1
Setpoint item=Heating_GU100_CL_C8_Mode minValue=1 maxValue=4 step=1
Setpoint item=Heating_GU100_CL_C8_Fan minValue=1 maxValue=3 step=1
}
@@ -566,44 +323,69 @@ sitemap egalware label="EgalWare"
Switch item=Heating_GU100_CL_C9_Switch
Text item=Heating_GU100_CL_C9_Temp icon="material:timeline"
{
- Switch item=CL_GrpScale label="Periodo" icon="material:timeline" mappings=[0="1h",1="4h",2="12h", 3="24h", 4="7g", 5="1M", 6="1Y"]
- Frame label="Temperatura"
- {
- Chart item=Heating_GU100_CL_C9_Temp legend=true visibility=[CL_GrpScale==0] period=h refresh=2000
- Chart item=Heating_GU100_CL_C9_Temp legend=true visibility=[CL_GrpScale==1] period=4h refresh=5000
- Chart item=Heating_GU100_CL_C9_Temp legend=true visibility=[CL_GrpScale==2,CL_GrpScale=="Uninitialized"] period=12h refresh=10000
- Chart item=Heating_GU100_CL_C9_Temp legend=true visibility=[CL_GrpScale==3] period=D refresh=60000
- Chart item=Heating_GU100_CL_C9_Temp legend=true visibility=[CL_GrpScale==4] period=W refresh=60000
- Chart item=Heating_GU100_CL_C9_Temp legend=true visibility=[CL_GrpScale==5] period=M refresh=60000
- Chart item=Heating_GU100_CL_C9_Temp legend=true visibility=[CL_GrpScale==6] period=Y refresh=60000
- }
- Frame label="Modo"
- {
- Chart item=Heating_GU100_CL_C9_Mode legend=true visibility=[CL_GrpScale==0] period=h refresh=2000
- Chart item=Heating_GU100_CL_C9_Mode legend=true visibility=[CL_GrpScale==1] period=4h refresh=5000
- Chart item=Heating_GU100_CL_C9_Mode legend=true visibility=[CL_GrpScale==2,CL_GrpScale=="Uninitialized"] period=12h refresh=10000
- Chart item=Heating_GU100_CL_C9_Mode legend=true visibility=[CL_GrpScale==3] period=D refresh=60000
- Chart item=Heating_GU100_CL_C9_Mode legend=true visibility=[CL_GrpScale==4] period=W refresh=60000
- Chart item=Heating_GU100_CL_C9_Mode legend=true visibility=[CL_GrpScale==5] period=M refresh=60000
- Chart item=Heating_GU100_CL_C9_Mode legend=true visibility=[CL_GrpScale==6] period=Y refresh=60000
- }
- Frame label="Fan Speed"
- {
- Chart item=Heating_GU100_CL_C9_Fan legend=true visibility=[CL_GrpScale==0] period=h refresh=2000
- Chart item=Heating_GU100_CL_C9_Fan legend=true visibility=[CL_GrpScale==1] period=4h refresh=5000
- Chart item=Heating_GU100_CL_C9_Fan legend=true visibility=[CL_GrpScale==2,CL_GrpScale=="Uninitialized"] period=12h refresh=10000
- Chart item=Heating_GU100_CL_C9_Fan legend=true visibility=[CL_GrpScale==3] period=D refresh=60000
- Chart item=Heating_GU100_CL_C9_Fan legend=true visibility=[CL_GrpScale==4] period=W refresh=60000
- Chart item=Heating_GU100_CL_C9_Fan legend=true visibility=[CL_GrpScale==5] period=M refresh=60000
- Chart item=Heating_GU100_CL_C9_Fan legend=true visibility=[CL_GrpScale==6] period=Y refresh=60000
+ Frame label="Analisi Interattiva" {
+ Webview url="/page/clima_chart_c9" height=16
}
}
- Setpoint item=Heating_GU100_CL_C9_Set minValue=19 maxValue=23 step=1
+ Setpoint item=Heating_GU100_CL_C9_Set minValue=22 maxValue=27 step=1
Setpoint item=Heating_GU100_CL_C9_Mode minValue=1 maxValue=4 step=1
Setpoint item=Heating_GU100_CL_C9_Fan minValue=1 maxValue=3 step=1
}
}
}
+ Text label="Ikea Air" icon="material:thermostat"
+ {
+ Text label="Desk Ingresso" icon="material:thermostat"
+ item=Temperatura_Desk_Ingresso_Temperatura_interna
+ valuecolor=[>25="red", <=25="blue"]
+ label="Desk Ingresso [%.1f %unit%]" {
+ // Se clicchi, vedi i dettagli completi
+ Text item=Temperatura_Desk_Ingresso_Temperatura_interna
+ Text item=Temperatura_Desk_Ingresso_Umidita_Atmosferica
+ }
+ Text label="Bagno Uomini" icon="material:thermostat"
+ item=Temperatura_bagno_uomini_Temperatura_interna
+ valuecolor=[>25="red", <=25="blue"]
+ label="Bagno Uomini [%.1f %unit%]" {
+ // Se clicchi, vedi i dettagli completi
+ Text item=Temperatura_bagno_uomini_Temperatura_interna
+ Text item=Temperatura_bagno_uomini_Umidita_Atmosferica
+ }
+ Text label="Bagno Donne" icon="material:thermostat"
+ item=Temperatura_Bagno_Donne_Temperatura_interna
+ valuecolor=[>25="red", <=25="blue"]
+ label="Bagno Donne [%.1f %unit%]" {
+ // Se clicchi, vedi i dettagli completi
+ Text item=Temperatura_Bagno_Donne_Temperatura_interna
+ Text item=Temperatura_Bagno_Donne_Umidita_Atmosferica
+ }
+ Text label="Area Caffè" icon="material:thermostat"
+ item=Temperatura_area_Caffe_Temperatura_interna
+ valuecolor=[>25="red", <=25="blue"]
+ label="Area Caffè [%.1f %unit%]" {
+ // Se clicchi, vedi i dettagli completi
+ Text item=Temperatura_area_Caffe_Temperatura_interna
+ Text item=Temperatura_area_Caffe_Umidita_Atmosferica
+ }
+ Text label="Sala Server" icon="material:thermostat"
+ item=Temperatura_Sala_Server_Temperatura_interna
+ valuecolor=[>25="red", <=25="blue"]
+ label="Sala Server [%.1f %unit%]" {
+ // Se clicchi, vedi i dettagli completi
+ Text item=Temperatura_Sala_Server_Temperatura_interna
+ Text item=Temperatura_Sala_Server_Umidita_Atmosferica
+ }
+ // Text item=Temperatura_Desk_Ingresso_Temperatura_interna label="Temperatura Desk Ingresso [%.1f %unit%]"
+ // Text item=Temperatura_Desk_Ingresso_Umidita_Atmosferica label="Umidità Desk Ingresso [%.0f %unit%]"
+ // Text item=Temperatura_bagno_uomini_Temperatura_interna label="Temperatura Bagno Uomini [%.1f %unit%]"
+ // Text item=Temperatura_bagno_uomini_Umidita_Atmosferica label="Umidità Bagno Uomini [%.0f %unit%]"
+ // Text item=Temperatura_Bagno_Donne_Temperatura_interna label="Temperatura Area Caffé [%.1f %unit%]"
+ // Text item=Temperatura_Bagno_Donne_Umidita_Atmosferica label="Umidità Area Caffé [%.0f %unit%]"
+ // Text item=Temperatura_area_Caffe_Temperatura_interna label="Temperatura Bagno Donne [%.1f %unit%]"
+ // Text item=Temperatura_area_Caffe_Umidita_Atmosferica label="Umidità Bagno Donne [%.0f %unit%]"
+ // Text item=Temperatura_Sala_Server_Temperatura_interna label="Temperatura Sala Server [%.1f %unit%]"
+ // Text item=Temperatura_Sala_Server_Umidita_Atmosferica label="Umidità Sala Server [%.0f %unit%]"
+ }
Text label="Luci Openspace" icon="material:lightbulb"
// Group item=Luci label="Luci Openspace" icon="material:lightbulb"
{
@@ -725,6 +507,17 @@ sitemap egalware label="EgalWare"
Chart item=ShellyEnergyBagno120 visibility=[FronLP==6] legend=true period=W refresh=60000
Chart item=ShellyEnergyBagno120 visibility=[FronLP==7] legend=true period=2W refresh=60000
}
+ Frame label="Accensione Scaldasalviette"
+ {
+ Switch item=FronLP label="Periodo" icon="line" mappings=[0="1h", 1="4h", 2="12h", 3="24h", 4="2g", 5="3g", 6="7g", 7="2w"]
+ Chart item=ShellySwitchBagno120 legend=true visibility=[FronLP==0,FronLP=="Uninitialized"] period=h refresh=1000
+ Chart item=ShellySwitchBagno120 legend=true visibility=[FronLP==1] period=8h refresh=4000
+ Chart item=ShellySwitchBagno120 legend=true visibility=[FronLP==2] period=D refresh=6000
+ Chart item=ShellySwitchBagno120 legend=true visibility=[FronLP==3] period=3D refresh=10000
+ Chart item=ShellySwitchBagno120 legend=true visibility=[FronLP==4] period=W refresh=60000
+ Chart item=ShellySwitchBagno120 legend=true visibility=[FronLP==5] period=Y refresh=60000
+ Chart item=ShellySwitchBagno120 legend=true visibility=[FronLP==6] period=M refresh=60000
+ }
}
Switch item=ShellySwitchBagno100 label="Shelly Bagno Uomini" icon="material:power"
Text item=ShellyPowerValBagno100 label="Bagno Uomini Realtime [%.1f W]" icon="oh:poweroutlet"
@@ -753,6 +546,17 @@ sitemap egalware label="EgalWare"
Chart item=ShellyEnergyBagno100 visibility=[FronLP==6] legend=true period=W refresh=60000
Chart item=ShellyEnergyBagno100 visibility=[FronLP==7] legend=true period=2W refresh=60000
}
+ Frame label="Accensione Scaldasalviette"
+ {
+ Switch item=FronLP label="Periodo" icon="line" mappings=[0="1h", 1="4h", 2="12h", 3="24h", 4="2g", 5="3g", 6="7g", 7="2w"]
+ Chart item=ShellySwitchBagno100 legend=true visibility=[FronLP==0,FronLP=="Uninitialized"] period=h refresh=1000
+ Chart item=ShellySwitchBagno100 legend=true visibility=[FronLP==1] period=8h refresh=4000
+ Chart item=ShellySwitchBagno100 legend=true visibility=[FronLP==2] period=D refresh=6000
+ Chart item=ShellySwitchBagno100 legend=true visibility=[FronLP==3] period=3D refresh=10000
+ Chart item=ShellySwitchBagno100 legend=true visibility=[FronLP==4] period=W refresh=60000
+ Chart item=ShellySwitchBagno100 legend=true visibility=[FronLP==5] period=Y refresh=60000
+ Chart item=ShellySwitchBagno100 legend=true visibility=[FronLP==6] period=M refresh=60000
+ }
}
}
Frame label="Ventilazione"
@@ -806,6 +610,18 @@ sitemap egalware label="EgalWare"
{
Switch item=SonoffServizi01_SwichLuceServer label="Luce Sala Server" icon="material:lightbulb"
}
+ }
+ Text label="Kiosk" icon="screen" {
+ Frame label="Stato Tablet Kiosk 01 (Huawei T7)" {
+ Text item=Kiosk_Tablet_Huawei_T7_Livello_Batteria label="Batteria Tablet [%d %%]" icon="battery"
+ Text item=Tablet_01_Battery_Status label="Stato Carica [%s]" icon="energy"
+
+ // "Input" permette la modifica del testo da BasicUI/Sitemap
+ Input item=Kiosk_Tablet_Huawei_T7_URL_Corrente label="Url corrente" icon="link"
+ // Pulsante che invia una stringa vuota "" per resettare/riavviare WallPanel
+ // Switch item=Kiosk_Tablet_Huawei_T7_URL_Corrente label="Reset Kiosk" icon="reload" mappings=[""="Riavvia App"]
+ Switch item=Kiosk_Tablet_Huawei_T7_URL_Corrente label="Reset Kiosk" icon="error" labelcolor=["red"] valuecolor=["red"] mappings=[""="Riavvia App"]
+ }
}
}
Frame label="Network"
diff --git a/Egalware/sounds/doorbell.mp3 b/Egalware/sounds/doorbell.mp3
index 7a8a5a3..038eb29 100644
Binary files a/Egalware/sounds/doorbell.mp3 and b/Egalware/sounds/doorbell.mp3 differ
diff --git a/Egalware/transform/clima_modo.map b/Egalware/transform/clima_modo.map
new file mode 100644
index 0000000..9b9bb4d
--- /dev/null
+++ b/Egalware/transform/clima_modo.map
@@ -0,0 +1,6 @@
+1=Caldo
+2=Ventilazione
+3=Freddo
+4=Auto
+NULL=Sconosciuto
+-=Sconosciuto
\ No newline at end of file
diff --git a/Egalware/transform/divide100.js b/Egalware/transform/divide100.js
index dcb2587..882b334 100644
--- a/Egalware/transform/divide100.js
+++ b/Egalware/transform/divide100.js
@@ -1,8 +1,12 @@
// Wrap everything in a function (no global variable pollution)
// variable "input" contains data passed by openHAB
-(function(inputData) {
- // on read: the polled number as string
- // on write: openHAB command as string
- var DIVIDE_BY = 100;
- return parseFloat(inputData) / DIVIDE_BY;
-})(input)
\ No newline at end of file
+
+(function (i) {
+ return (parseFloat(i) / 100).toString();
+})(input);
+// (function(inputData) {
+// // on read: the polled number as string
+// // on write: openHAB command as string
+// var DIVIDE_BY = 100;
+// return parseFloat(inputData) / DIVIDE_BY;
+// })(input)
\ No newline at end of file