From 402ed244071170f1e9efcce99e11f57f2b444e77 Mon Sep 17 00:00:00 2001 From: jp112sdl Date: Mon, 19 Dec 2022 17:30:32 +0100 Subject: [PATCH] show Humidity in HM-RF Groups and rename patch --- ...ngControl-HumidityBatteryValveState.patch} | 74 +++++++++++++------ .../www/rega/esp/controls/heating_control.fn | 22 ++++++ .../rega/esp/controls/heating_control.fn.orig | 0 .../occu/WebUI/www/webui/webui.js | 8 ++ .../occu/WebUI/www/webui/webui.js.orig | 0 5 files changed, 82 insertions(+), 22 deletions(-) rename buildroot-external/patches/occu/{0042-WebUI-HeatingControl-BatteryValveState.patch => 0042-WebUI-HeatingControl-HumidityBatteryValveState.patch} (64%) rename buildroot-external/patches/occu/{0042-WebUI-HeatingControl-BatteryValveState => 0042-WebUI-HeatingControl-HumidityBatteryValveState}/occu/WebUI/www/rega/esp/controls/heating_control.fn (87%) rename buildroot-external/patches/occu/{0042-WebUI-HeatingControl-BatteryValveState => 0042-WebUI-HeatingControl-HumidityBatteryValveState}/occu/WebUI/www/rega/esp/controls/heating_control.fn.orig (100%) rename buildroot-external/patches/occu/{0042-WebUI-HeatingControl-BatteryValveState => 0042-WebUI-HeatingControl-HumidityBatteryValveState}/occu/WebUI/www/webui/webui.js (99%) rename buildroot-external/patches/occu/{0042-WebUI-HeatingControl-BatteryValveState => 0042-WebUI-HeatingControl-HumidityBatteryValveState}/occu/WebUI/www/webui/webui.js.orig (100%) diff --git a/buildroot-external/patches/occu/0042-WebUI-HeatingControl-BatteryValveState.patch b/buildroot-external/patches/occu/0042-WebUI-HeatingControl-HumidityBatteryValveState.patch similarity index 64% rename from buildroot-external/patches/occu/0042-WebUI-HeatingControl-BatteryValveState.patch rename to buildroot-external/patches/occu/0042-WebUI-HeatingControl-HumidityBatteryValveState.patch index 45e9add008..3b941db2d7 100644 --- a/buildroot-external/patches/occu/0042-WebUI-HeatingControl-BatteryValveState.patch +++ b/buildroot-external/patches/occu/0042-WebUI-HeatingControl-HumidityBatteryValveState.patch @@ -1,11 +1,12 @@ --- occu/WebUI/www/rega/esp/controls/heating_control.fn.orig +++ occu/WebUI/www/rega/esp/controls/heating_control.fn -@@ -4,11 +4,17 @@ +@@ -4,11 +4,19 @@ real rMin = 4.5; real rMax = 30.5; string sUnit = "°C"; + string bUnit = "V"; + string vUnit = "%"; ++ string hUnit = "%"; integer iReadOnlyState = 0; object oControlMode = cObj.DPByControl("HEATING_CONTROL.CONTROL_MODE"); @@ -14,11 +15,12 @@ + + object oBatteryState = cObj.DPByHssDP("BATTERY_STATE"); + object oValveState = cObj.DPByHssDP("VALVE_STATE"); ++ object oHumidity = cObj.DPByHssDP("ACTUAL_HUMIDITY"); + object oModeAuto = cObj.DPByControl("HEATING_CONTROL.AUTO"); object oModeManu = cObj.DPByControl("HEATING_CONTROL.MANU"); object oModeBoost = cObj.DPByControl("HEATING_CONTROL.BOOST"); -@@ -28,12 +34,6 @@ +@@ -28,12 +36,6 @@ ! WriteLine(' '); @@ -31,7 +33,7 @@ if( oLevel ) { iLvlDpId = oLevel.ID(); -@@ -47,13 +47,14 @@ +@@ -47,13 +49,14 @@ ! rMax = oLevel.MetaData("MAX").ToFloat(); } string sReadOnly = ""; @@ -47,10 +49,23 @@ } WriteLine(""); -@@ -67,6 +68,34 @@ - !WriteLine("
${stringTableWeatherTemperature}
"); +@@ -68,6 +71,48 @@ WriteLine(""); WriteLine(""); + ++ if ( oHumidity ) ++ { ++ WriteLine(""); ++ WriteLine(""); ++ WriteLine(""); ++ WriteLine(""); ++ WriteLine(""); ++ WriteLine(""); ++ WriteLine(""); ++ WriteLine(""); ++ WriteLine(""); ++ WriteLine(""); ++ } + + if ( oBatteryState ) + { @@ -79,14 +94,21 @@ + WriteLine(""); + WriteLine(""); + } - ++ WriteLine(""); WriteLine(""); -@@ -179,6 +208,18 @@ + WriteLine(""); +@@ -179,6 +224,24 @@ WriteLine("opts.stTemp = "#oTemperature.Value()#";"); WriteLine("opts.stUnit = '"#sUnit#"';"); } + ++ if (oHumidity) ++ { ++ WriteLine("opts.stHum = "#oHumidity.Value()#";"); ++ WriteLine("opts.sthUnit = '"#hUnit#"';"); ++ } ++ + if (oBatteryState) + { + WriteLine("opts.stBat = "#oBatteryState.Value()#";"); @@ -101,7 +123,7 @@ WriteLine("its"#chnId#" = new iseThermostat_2ndGen("#chnId#", "#rState#", "#iLvlDpId#", "#rMin#", "#rMax#", " #system.GetVar("iReadOnlyState")#", "#system.GetVar('bSliderFlag')#", opts);"); WriteLine(""); -@@ -203,6 +244,8 @@ +@@ -203,6 +266,8 @@ string tUnit = "°C"; string hUnit = "%"; @@ -110,7 +132,7 @@ real rState = 0; object oTemperature = cObj.DPByControl("HEATING_CONTROL_HMIP.TEMPERATURE"); -@@ -210,6 +253,12 @@ +@@ -210,6 +275,12 @@ object oWindowState = cObj.DPByControl("HEATING_CONTROL_HMIP.WINDOW_STATE"); object oLevel = cObj.DPByControl("HEATING_CONTROL_HMIP.LEVEL"); @@ -123,7 +145,7 @@ object oActiveProfile = cObj.DPByControl("HEATING_CONTROL_HMIP.ACTIVE_PROFILE"); object oHumidity = cObj.DPByControl("HEATING_CONTROL_HMIP.HUMIDITY"); object oSetPointMode = cObj.DPByControl("HEATING_CONTROL_HMIP.SETPOINT_MODE"); -@@ -223,11 +272,6 @@ +@@ -223,11 +294,6 @@ string sReadOnly = ""; rState = oSetPoint.Value(); @@ -135,7 +157,7 @@ WriteLine(""); WriteLine(""); WriteLine(""); -@@ -262,13 +306,25 @@ +@@ -262,13 +328,25 @@ WriteLine("
"); WriteLine(""); @@ -144,8 +166,10 @@ - WriteLine(""); + if (oValveLevel) { + WriteLine(""); -+ WriteLine(""); -+ WriteLine(""); + WriteLine("
"); + WriteLine(""); +- WriteLine(""); +- WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine(""); @@ -157,16 +181,14 @@ + WriteLine(""); + if (oBatteryState) { + WriteLine(""); -@@ -416,6 +472,14 @@ +@@ -416,6 +494,14 @@ WriteLine("opts.humidityID = '"#oHumidity.ID()#"';"); WriteLine("opts.HUMIDITY = '"#oHumidity.Value()#"';"); } @@ -183,10 +205,13 @@ WriteLine("opts.WINDOW_STATE = '"#oWindowState.Value()#"';"); --- occu/WebUI/www/webui/webui.js.orig +++ occu/WebUI/www/webui/webui.js -@@ -25374,6 +25374,12 @@ +@@ -25374,6 +25374,15 @@ if (this.opts.stTemp) { this.showActualTemp(); } ++ if (this.opts.stHum) { ++ this.showActualHumidity(); ++ } + if (this.opts.stBat) { + this.showActualBat(); + } @@ -196,10 +221,15 @@ if (this.opts.idComfort && this.opts.idLowering) { this.showComfortEco(); } -@@ -25565,6 +25571,16 @@ +@@ -25565,6 +25574,21 @@ jQuery("#"+this.id +"tblShowTemp").show(); }, ++ showActualHumidity: function() { ++ jQuery("#"+this.id +"actHumidity").text(this.opts.stHum); ++ jQuery("#"+this.id +"tblShowHumidity").show(); ++ }, ++ + showActualBat: function() { + jQuery("#"+this.id +"actBatteryState").text(this.opts.stBat); + jQuery("#"+this.id +"tblShowBatteryState").show(); @@ -213,7 +243,7 @@ showHolidayEndTime: function() { var stopTime = this.getHolidayEndTime(); if (stopTime) { -@@ -25667,6 +25683,8 @@ +@@ -25667,6 +25691,8 @@ self.setSControl("ACTUAL_TEMPERATURE", self.ACTUAL_TEMPERATURE); self.setSControl("HUMIDITY", self.HUMIDITY); self.setSControl("WINDOW_STATE", self.WINDOW_STATE); @@ -222,7 +252,7 @@ self.setSlider(); self.initElements(); self.bindEvents(); -@@ -25681,6 +25699,8 @@ +@@ -25681,6 +25707,8 @@ this.BOOST_MODE = (this.checkBool(opts.BOOST_MODE, false) == "true") ? true : false; //this.FROST_PROTECTION = opts.FROST_PROTECTION; this.HUMIDITY = this.checkValue(opts.HUMIDITY, this.unknownState); diff --git a/buildroot-external/patches/occu/0042-WebUI-HeatingControl-BatteryValveState/occu/WebUI/www/rega/esp/controls/heating_control.fn b/buildroot-external/patches/occu/0042-WebUI-HeatingControl-HumidityBatteryValveState/occu/WebUI/www/rega/esp/controls/heating_control.fn similarity index 87% rename from buildroot-external/patches/occu/0042-WebUI-HeatingControl-BatteryValveState/occu/WebUI/www/rega/esp/controls/heating_control.fn rename to buildroot-external/patches/occu/0042-WebUI-HeatingControl-HumidityBatteryValveState/occu/WebUI/www/rega/esp/controls/heating_control.fn index 2308e05a98..c1e5f56a5a 100755 --- a/buildroot-external/patches/occu/0042-WebUI-HeatingControl-BatteryValveState/occu/WebUI/www/rega/esp/controls/heating_control.fn +++ b/buildroot-external/patches/occu/0042-WebUI-HeatingControl-HumidityBatteryValveState/occu/WebUI/www/rega/esp/controls/heating_control.fn @@ -6,6 +6,7 @@ function ::CreateHeatingControl() { string sUnit = "°C"; string bUnit = "V"; string vUnit = "%"; + string hUnit = "%"; integer iReadOnlyState = 0; object oControlMode = cObj.DPByControl("HEATING_CONTROL.CONTROL_MODE"); @@ -14,6 +15,7 @@ function ::CreateHeatingControl() { object oBatteryState = cObj.DPByHssDP("BATTERY_STATE"); object oValveState = cObj.DPByHssDP("VALVE_STATE"); + object oHumidity = cObj.DPByHssDP("ACTUAL_HUMIDITY"); object oModeAuto = cObj.DPByControl("HEATING_CONTROL.AUTO"); object oModeManu = cObj.DPByControl("HEATING_CONTROL.MANU"); @@ -68,6 +70,20 @@ function ::CreateHeatingControl() { !WriteLine("
${stringTableWeatherTemperature}
"); WriteLine(""); WriteLine(""); + + if ( oHumidity ) + { + WriteLine(""); + WriteLine(""); + WriteLine(""); + } if ( oBatteryState ) { @@ -209,6 +225,12 @@ function ::CreateHeatingControl() { WriteLine("opts.stUnit = '"#sUnit#"';"); } + if (oHumidity) + { + WriteLine("opts.stHum = "#oHumidity.Value()#";"); + WriteLine("opts.sthUnit = '"#hUnit#"';"); + } + if (oBatteryState) { WriteLine("opts.stBat = "#oBatteryState.Value()#";"); diff --git a/buildroot-external/patches/occu/0042-WebUI-HeatingControl-BatteryValveState/occu/WebUI/www/rega/esp/controls/heating_control.fn.orig b/buildroot-external/patches/occu/0042-WebUI-HeatingControl-HumidityBatteryValveState/occu/WebUI/www/rega/esp/controls/heating_control.fn.orig similarity index 100% rename from buildroot-external/patches/occu/0042-WebUI-HeatingControl-BatteryValveState/occu/WebUI/www/rega/esp/controls/heating_control.fn.orig rename to buildroot-external/patches/occu/0042-WebUI-HeatingControl-HumidityBatteryValveState/occu/WebUI/www/rega/esp/controls/heating_control.fn.orig diff --git a/buildroot-external/patches/occu/0042-WebUI-HeatingControl-BatteryValveState/occu/WebUI/www/webui/webui.js b/buildroot-external/patches/occu/0042-WebUI-HeatingControl-HumidityBatteryValveState/occu/WebUI/www/webui/webui.js similarity index 99% rename from buildroot-external/patches/occu/0042-WebUI-HeatingControl-BatteryValveState/occu/WebUI/www/webui/webui.js rename to buildroot-external/patches/occu/0042-WebUI-HeatingControl-HumidityBatteryValveState/occu/WebUI/www/webui/webui.js index b93217807d..ad254e6f97 100755 --- a/buildroot-external/patches/occu/0042-WebUI-HeatingControl-BatteryValveState/occu/WebUI/www/webui/webui.js +++ b/buildroot-external/patches/occu/0042-WebUI-HeatingControl-HumidityBatteryValveState/occu/WebUI/www/webui/webui.js @@ -25374,6 +25374,9 @@ iseThermostat_2ndGen = Class.create(iseThermostat, { if (this.opts.stTemp) { this.showActualTemp(); } + if (this.opts.stHum) { + this.showActualHumidity(); + } if (this.opts.stBat) { this.showActualBat(); } @@ -25571,6 +25574,11 @@ iseThermostat_2ndGen = Class.create(iseThermostat, { jQuery("#"+this.id +"tblShowTemp").show(); }, + showActualHumidity: function() { + jQuery("#"+this.id +"actHumidity").text(this.opts.stHum); + jQuery("#"+this.id +"tblShowHumidity").show(); + }, + showActualBat: function() { jQuery("#"+this.id +"actBatteryState").text(this.opts.stBat); jQuery("#"+this.id +"tblShowBatteryState").show(); diff --git a/buildroot-external/patches/occu/0042-WebUI-HeatingControl-BatteryValveState/occu/WebUI/www/webui/webui.js.orig b/buildroot-external/patches/occu/0042-WebUI-HeatingControl-HumidityBatteryValveState/occu/WebUI/www/webui/webui.js.orig similarity index 100% rename from buildroot-external/patches/occu/0042-WebUI-HeatingControl-BatteryValveState/occu/WebUI/www/webui/webui.js.orig rename to buildroot-external/patches/occu/0042-WebUI-HeatingControl-HumidityBatteryValveState/occu/WebUI/www/webui/webui.js.orig
${diagramValueTypeLEVEL}: "#level.ToString(0)#" %${stringTableHeatingLevel}"#vUnit#"
"); - WriteLine(""); - WriteLine(""); -- WriteLine(""); -- WriteLine(""); ++ WriteLine("
${diagramValueTypeLEVEL}: "#level.ToString(0)#" %
"); ++ WriteLine(""); + WriteLine(""); + WriteLine(""); WriteLine(""); WriteLine("
${stringTableClimateControlRTTransceiverBatteryState}"#bUnit#"
"); WriteLine("
"); + WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine("