diff --git a/build.sh b/build.sh index c5c8d46b..f862ae4f 100755 --- a/build.sh +++ b/build.sh @@ -4,8 +4,6 @@ ADDON_NAME=jp-hb-devices file=./patchsource/www/rega/esp/functions.fn diff -u --label=${file}.orig --label=${file} ${file}.orig ${file} > ./src/addon/patch/common/`basename ${file}`.patch -file=./patchsource/www/rega/esp/controls/rhs.fn -diff -u --label=${file}.orig --label=${file} ${file}.orig ${file} > ./src/addon/patch/common/`basename ${file}`.patch file=./patchsource/www/pda/eq3/controls/rhs.tcl diff -u --label=${file}.orig --label=${file} ${file}.orig ${file} > ./src/addon/patch/common/`basename ${file}`.patch file=./patchsource/www/webui/webui.js @@ -40,13 +38,14 @@ file=./patchsource/www/webui/js/lang/de/translate.lang.stringtable.js diff -u --label=${file}.orig --label=${file} ${file}.orig ${file} > ./src/addon/patch/common/`basename ${file}`.patch file=./patchsource/www/webui/js/lang/en/translate.lang.stringtable.js diff -u --label=${file}.orig --label=${file} ${file}.orig ${file} >> ./src/addon/patch/common/`basename ${file}`.patch - file=./patchsource/www/rega/pages/tabs/admin/views/programs.htm -diff -u --label=${file}.orig --label=${file} ${file}.orig ${file} > ./src/addon/patch/le_343/`basename ${file}`.patch -diff -u --label=${file}.orig --label=${file} ${file}.orig-3.45 ${file}-3.45 > ./src/addon/patch/ge_345/`basename ${file}`.patch +diff -u --label=${file}.orig --label=${file} ${file}.orig ${file} > ./src/addon/patch/common/`basename ${file}`.patch file=./patchsource/www/rega/esp/side.inc -diff -u --label=${file}.orig --label=${file} ${file}.orig ${file} > ./src/addon/patch/le_343/`basename ${file}`.patch -diff -u --label=${file}.orig --label=${file} ${file}.orig-3.45 ${file}-3.45 > ./src/addon/patch/ge_345/`basename ${file}`.patch +diff -u --label=${file}.orig --label=${file} ${file}.orig ${file} > ./src/addon/patch/common/`basename ${file}`.patch + +file=./patchsource/www/rega/esp/controls/rhs.fn +diff -u --label=${file}.orig --label=${file} ${file}.orig ${file} > ./src/addon/patch/le_363/`basename ${file}`.patch +diff -u --label=${file}.orig --label=${file} ${file}.orig-3.65 ${file}-3.65 > ./src/addon/patch/ge_365/`basename ${file}`.patch echo "Patch created." diff --git a/patchsource/www/rega/esp/controls/rhs.fn-3.65 b/patchsource/www/rega/esp/controls/rhs.fn-3.65 new file mode 100755 index 00000000..33b113be --- /dev/null +++ b/patchsource/www/rega/esp/controls/rhs.fn-3.65 @@ -0,0 +1,75 @@ +function ::CreateWndRotSensor() { + object objVoltage = cObj.DPByHssDP("OPERATING_VOLTAGE"); + + object ch = dom.GetObject(chnId); + + ! Locked + string locked = "${actionStatusControlLockedA}"; + + if (ch.Label() == "HmIP-MOD-WD-VK") { + ! Closed + locked = "${actionStatusControlLockedB}"; + } + + WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine("
"); + WriteLine("
"); + WriteLine(""); + WriteLine("
"); + WriteLine("
${actionStatusControlOpenA}
"); + WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine("
"); + WriteLine("
"); + WriteLine(""); + WriteLine("
"); + WriteLine("
${actionStatusControlTilted}
"); + WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine("
"); + WriteLine("
"); + WriteLine(""); + WriteLine("
"); + WriteLine("
"#locked#"
"); + WriteLine(""); + + if (objVoltage) { + WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine("
"); + WriteLine("
"); + WriteLine(""); + WriteLine("
"); + WriteLine("
Extra-Status
"); + WriteLine(""); + + WriteLine("
Betriebsspannung in V:"#objVoltage.Value().ToString(1)#"V
"); + } else { + WriteLine(""); + } + + object objState = cObj.DPByControl("RHS.STATE"); + WriteLine(""); + return; +} \ No newline at end of file diff --git a/patchsource/www/rega/esp/controls/rhs.fn.orig-3.65 b/patchsource/www/rega/esp/controls/rhs.fn.orig-3.65 new file mode 100755 index 00000000..86415e75 --- /dev/null +++ b/patchsource/www/rega/esp/controls/rhs.fn.orig-3.65 @@ -0,0 +1,56 @@ +function ::CreateWndRotSensor() { + + object ch = dom.GetObject(chnId); + + ! Locked + string locked = "${actionStatusControlLockedA}"; + + if (ch.Label() == "HmIP-MOD-WD-VK") { + ! Closed + locked = "${actionStatusControlLockedB}"; + } + + WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine("
"); + WriteLine("
"); + WriteLine(""); + WriteLine("
"); + WriteLine("
${actionStatusControlOpenA}
"); + WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine("
"); + WriteLine("
"); + WriteLine(""); + WriteLine("
"); + WriteLine("
${actionStatusControlTilted}
"); + WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine(""); + WriteLine("
"); + WriteLine("
"); + WriteLine(""); + WriteLine("
"); + WriteLine("
"#locked#"
"); + WriteLine(""); + + object objState = cObj.DPByControl("RHS.STATE"); + WriteLine(""); + WriteLine(""); + return; +} \ No newline at end of file diff --git a/patchsource/www/rega/esp/datapointconfigurator.fn b/patchsource/www/rega/esp/datapointconfigurator.fn index 05c35ac9..a52eb990 100755 --- a/patchsource/www/rega/esp/datapointconfigurator.fn +++ b/patchsource/www/rega/esp/datapointconfigurator.fn @@ -148,6 +148,9 @@ function ::dcCreate() var CN_WIN_SC_SENSOR = "WIN_SC_SENSOR."; var CN_WINDOW = "WINDOW."; + var CN_EVENT_INTERFACE = "EVENT_INTERFACE."; + var CN_NOT_ACTIVE = "CHANNEL_NOT_ACTIVE"; + var CN_RFID_BUTTON = "RFIDBTN."; var CN_IRRC_BUTTON = "IRRCBTN."; var CN_IBTN_BUTTON = "IBTN."; @@ -162,9 +165,6 @@ function ::dcCreate() var CN_PWRSC = "PWRSC."; var CN_CONDSC = "CONDSC."; - var CN_EVENT_INTERFACE = "EVENT_INTERFACE."; - var CN_NOT_ACTIVE = "CHANNEL_NOT_ACTIVE"; - var isInvisible = false; var isKnownControl = false; diff --git a/patchsource/www/rega/esp/side.inc b/patchsource/www/rega/esp/side.inc index 685859b1..cadaccca 100755 --- a/patchsource/www/rega/esp/side.inc +++ b/patchsource/www/rega/esp/side.inc @@ -1,5 +1,7 @@ <% + boolean showChannelParam = true; + integer iDP = oSD.DestinationDP(); integer iCH = oSD.DestinationChannel(); integer iP = oSD.DestinationParam(); @@ -8,24 +10,25 @@ integer iVP = oSD.DestinationValueParam(); integer iVPT = oSD.DestinationValueParamType(); - string hm_ouled16 = "HM-OU-LED16"; - string hm_oucfm = "HM-OU-CFM-Pl"; - string hm_oucfmTW = "HM-OU-CFM-TW"; - string hm_oucmpcb = "HM-OU-CM-PCB"; string hb_oump3led = "HB-OU-MP3-LED"; string hb_rc6led = "HB-RC-6-PBU-LED"; string hb_fxled = "HB-OU-RGBW-LED-FX"; - string hm_partyDialog = "HM-CC-RT-DN HM-TC-IT-WM-W-EU HM-CC-VG-1"; - string hm_statusDisplay = "HM-Dis-WM55"; - string hm_statusDisplayEPaper = "HM-Dis-EP-WM55"; string hb_statusDisplayEPaper = "HB-DIS-EP-42BW"; string hb_statusDisplayEPaperMains = "HB-DIS-EP-42BW-MAINS"; string hb_statusDisplayEPaper75 = "HB-DIS-EP-75BW"; string hb_statusDisplayEPaper75Mains = "HB-DIS-EP-75BW-MAINS"; + string hm_ouled16 = "HM-OU-LED16"; + string hm_oucfm = "HM-OU-CFM-Pl"; + string hm_oucfmTW = "HM-OU-CFM-TW"; + string hm_oucmpcb = "HM-OU-CM-PCB"; + string hm_partyDialog = "HM-CC-RT-DN HM-TC-IT-WM-W-EU HM-CC-VG-1"; + string hm_statusDisplay = "HM-Dis-WM55"; + string hm_statusDisplayEPaper = "HM-Dis-EP-WM55"; string hm_rgbw_controller = "HM-LC-RGBW-WM"; string hm_jalousieActor = "HM-LC-Ja1PBU"; - string heatingClimateControlTransceiver = "HEATING_CLIMATECONTROL_TRANSCEIVER"; + string hmip_wrcd = "HmIP-WRCD"; + string heatingClimateControlTransceiver = "HEATING_CLIMATECONTROL_TRANSCEIVER"; string s_vir_lg_rgb_dim = "VIR-LG-RGB-DIM"; string s_vir_lg_rgbw_dim = "VIR-LG-RGBW-DIM"; string s_vir_lg_white_dim = "VIR-LG-WHITE-DIM"; @@ -161,7 +164,7 @@ if( oCH.Label().Find(s_vir_lg_onoff) != -1 ) { isVirLG_ONOFF = true; } - Write( ' ' ); boolean bFound = false; integer iFirstID = ID_ERROR; string sDP; @@ -206,76 +209,82 @@ && (optionVal.Find(excludeColorList) == -1) && (optionVal.Find(excludeOntimeList) == -1) ) { + ! Some parameter shouldn´t be visible - this is the new way to hide certain parameters + Call("/esp/functions.fn::destinationIsParameterVisible()"); + if(showChannelParam == true) { - if( (oDP.ID() == iDP) && (iV == sVLKey) ) { sSelected = " selected"; } else { sSelected = ""; } - Write( '' ); } - Call("/esp/functions.fn::getSpecialTranslationPrgDest()"); - Write( sValue ); - Write( '' ); } - } - } } else { if( ((iDPvt == ivtBinary) && (iDPst != istAction)) || (isVirLG_ONOFF) ) { - string sValue = "not set"; - if( (oDP.ID() == iDP) && (iV == 1) ) { sSelected = " selected"; } else { sSelected = ""; } - Write( '' ); - if( (oDP.ID() == iDP) && (iV == 0) ) { sSelected = " selected"; } else { sSelected = ""; } - Write( '' ); + if( (oDP.ID() == iDP) && (iV == 0) ) { sSelected = " selected"; } else { sSelected = ""; } + Write( '' ); } - Write( sValue ); - Write( '' ); } else { @@ -286,29 +295,34 @@ && (oDP.HSSID().Find(excludeHmIPLevel2) == -1) && (oDP.HSSID().Find(excludeOutputSelectSize) == -1) && (oDP.HSSID().Find(excludeCombinedParameter) == -1) + || ((oCH.Label().Find(hmip_wrcd) != -1) && (oDP.HSSID().Find(excludeCombinedParameter) != -1)) ) { - Write( '' ); } - Write( sValue ); - Write( '' ); } } } @@ -454,25 +468,26 @@ ! Label() presents the type id of the channel, e.g. HM-OU-LED16 or HM-OU-CFM-Pl string chLabel = oCH.Label(); - integer ouled16 = chLabel.Find(hm_ouled16); - integer oucfm = chLabel.Find(hm_oucfm); - integer oucfmTW = chLabel.Find(hm_oucfmTW); - integer oucmpcb = chLabel.Find(hm_oucmpcb); integer oump3led = chLabel.Find(hb_oump3led); integer rc6led = chLabel.Find(hb_rc6led); integer fxled = chLabel.Find(hb_fxled); - integer partyDialogDevice = hm_partyDialog.Find(chLabel); - integer statusDisplayDevice = hm_statusDisplay.Find(chLabel); - integer statusDisplayEPaperDevice = hm_statusDisplayEPaper.Find(chLabel); integer statusHbDisplayEPaperDevice = hb_statusDisplayEPaper.Find(chLabel); integer statusHbDisplayEPaperDeviceMains = hb_statusDisplayEPaperMains.Find(chLabel); integer statusHbDisplayEPaperDevice75 = hb_statusDisplayEPaper75.Find(chLabel); integer statusHbDisplayEPaperDevice75Mains = hb_statusDisplayEPaper75Mains.Find(chLabel); + integer ouled16 = chLabel.Find(hm_ouled16); + integer oucfm = chLabel.Find(hm_oucfm); + integer oucfmTW = chLabel.Find(hm_oucfmTW); + integer oucmpcb = chLabel.Find(hm_oucmpcb); + integer partyDialogDevice = hm_partyDialog.Find(chLabel); + integer statusDisplayDevice = hm_statusDisplay.Find(chLabel); + integer statusDisplayEPaperDevice = hm_statusDisplayEPaper.Find(chLabel); integer rgbw_controller = chLabel.Find(hm_rgbw_controller); integer i_vir_lg_rgb_dim = chLabel.Find(s_vir_lg_rgb_dim); integer i_vir_lg_rgbw_dim = chLabel.Find(s_vir_lg_rgbw_dim); integer i_vir_lg_group = chLabel.Find(s_vir_lg_group); integer jalousieActor = chLabel.Find(hm_jalousieActor); + integer ePaperAcousticDisplay = chLabel.Find(hmip_wrcd); if ((statusDisplayDevice != -1) || (statusDisplayEPaperDevice != -1) @@ -480,6 +495,7 @@ || (statusHbDisplayEPaperDeviceMains != -1) || (statusHbDisplayEPaperDevice75 != -1) || (statusHbDisplayEPaperDevice75Mains != -1) + || (ePaperAcousticDisplay != -1) || (rgbw_controller != -1) || ((jalousieActor != - 1) && (oDP.HSSID().Find("LEVEL_COMBINED") != -1)) || (((i_vir_lg_rgb_dim != - 1) && (oDP.HSSID().Find("RGB") != -1)) || ((i_vir_lg_rgbw_dim != - 1) && (oDP.HSSID().Find("RGBW") != -1)) || (( i_vir_lg_group != - 1) && (oDP.HSSID().Find("RGBW") != -1))) @@ -500,6 +516,14 @@ Write( ' ' ); } + if (ePaperAcousticDisplay != -1) { + if(iV == "0") { + ! This is the default string for 'all values not used' + iV = "{DDBC=WHITE,DDTC=BLACK,DDI=0,DDA=CENTER,DDS=Zeile 1,DDID=1},{DDBC=WHITE,DDTC=BLACK,DDI=0,DDA=CENTER,DDS=Zeile 2,DDID=2},{DDBC=WHITE,DDTC=BLACK,DDI=0,DDA=CENTER,DDS=Zeile 3,DDID=3},{DDBC=WHITE,DDTC=BLACK,DDI=0,DDA=CENTER,DDS=Zeile 4,DDID=4},{DDBC=WHITE,DDTC=BLACK,DDI=0,DDA=CENTER,DDS=Zeile 5,DDID=5}"; + } + Write( ' ' ); + } + if ((statusHbDisplayEPaperDevice != -1) || (statusHbDisplayEPaperDeviceMains != -1)) { if(iV == "1") { ! This is the default string for 'all values not used' @@ -515,6 +539,7 @@ } Write( ' ' ); } + if (rgbw_controller != -1) { if (iV == "0") { @@ -559,19 +584,20 @@ } if((ouled16 == -1) - && (oucfm == -1) - && (oucfmTW == -1) - && (oucmpcb == -1) && (oump3led == -1) && (rc6led == -1) && (fxled == -1) - && (partyDialogDevice == -1) - && (statusDisplayDevice == -1) - && (statusDisplayEPaperDevice == -1) && (statusHbDisplayEPaperDevice == -1) && (statusHbDisplayEPaperDeviceMains == -1) && (statusHbDisplayEPaperDevice75 == -1) && (statusHbDisplayEPaperDevice75Mains == -1) + && (oucfm == -1) + && (oucfmTW == -1) + && (oucmpcb == -1) + && (partyDialogDevice == -1) + && (statusDisplayDevice == -1) + && (statusDisplayEPaperDevice == -1) + && (ePaperAcousticDisplay == -1) && (rgbw_controller == -1) && (jalousieActor == -1) && (i_vir_lg_rgb_dim == -1) @@ -588,13 +614,13 @@ } if(oump3led != -1) { Write( '' ); - } + } if(rc6led != -1) { Write( '' ); - } + } if(fxled != -1) { Write( '' ); - } + } if (partyDialogDevice != -1) { Write( '' ); } @@ -607,6 +633,9 @@ if ((statusHbDisplayEPaperDevice != -1) || (statusHbDisplayEPaperDeviceMains != -1)) { Write( '' ); } + if (ePaperAcousticDisplay != -1) { + Write( '' ); + } if (rgbw_controller != -1) { Write( '' ); } diff --git a/patchsource/www/rega/esp/side.inc-3.45 b/patchsource/www/rega/esp/side.inc-3.45 deleted file mode 100755 index cadaccca..00000000 --- a/patchsource/www/rega/esp/side.inc-3.45 +++ /dev/null @@ -1,793 +0,0 @@ -<% - - boolean showChannelParam = true; - - integer iDP = oSD.DestinationDP(); - integer iCH = oSD.DestinationChannel(); - integer iP = oSD.DestinationParam(); - integer iV = oSD.DestinationValue(); - integer iVT = oSD.DestinationValueType(); - integer iVP = oSD.DestinationValueParam(); - integer iVPT = oSD.DestinationValueParamType(); - - string hb_oump3led = "HB-OU-MP3-LED"; - string hb_rc6led = "HB-RC-6-PBU-LED"; - string hb_fxled = "HB-OU-RGBW-LED-FX"; - string hb_statusDisplayEPaper = "HB-DIS-EP-42BW"; - string hb_statusDisplayEPaperMains = "HB-DIS-EP-42BW-MAINS"; - string hb_statusDisplayEPaper75 = "HB-DIS-EP-75BW"; - string hb_statusDisplayEPaper75Mains = "HB-DIS-EP-75BW-MAINS"; - string hm_ouled16 = "HM-OU-LED16"; - string hm_oucfm = "HM-OU-CFM-Pl"; - string hm_oucfmTW = "HM-OU-CFM-TW"; - string hm_oucmpcb = "HM-OU-CM-PCB"; - string hm_partyDialog = "HM-CC-RT-DN HM-TC-IT-WM-W-EU HM-CC-VG-1"; - string hm_statusDisplay = "HM-Dis-WM55"; - string hm_statusDisplayEPaper = "HM-Dis-EP-WM55"; - string hm_rgbw_controller = "HM-LC-RGBW-WM"; - string hm_jalousieActor = "HM-LC-Ja1PBU"; - string hmip_wrcd = "HmIP-WRCD"; - - string heatingClimateControlTransceiver = "HEATING_CLIMATECONTROL_TRANSCEIVER"; - string s_vir_lg_rgb_dim = "VIR-LG-RGB-DIM"; - string s_vir_lg_rgbw_dim = "VIR-LG-RGBW-DIM"; - string s_vir_lg_white_dim = "VIR-LG-WHITE-DIM"; - string s_vir_lg_group = "VIR-LG-GROUP"; - string s_vir_lg_onoff = "VIR-LG-ONOFF"; - - string excludePARTY = "PARTY_"; - string includePARTY = "PARTY_MODE_SUBMIT"; - - string excludeSoundFileList = "SOUNDFILE_LIST_"; - string excludeColorList = "COLOR_LIST_"; - string excludeOntimeList = "ON_TIME_LIST_"; - string excludeOutputSelectSize = "OUTPUT_SELECT_SIZE"; - string excludeCombinedParameter = "COMBINED_PARAMETER"; - string excludeRepetitions = "REPETITIONS="; - - string excludeHmIPCDT = "CONTROL_DIFFERENTIAL_TEMPERATURE"; - string excludeHmIPResetMotion = "RESET_MOTION"; - string excludeHmIPSmokeDetCommandReservedAlarmOff = "SMOKE_DETECTOR_COMMAND=RESERVED_ALARM_OFF"; - - ! A wired blind actor (e. g. HmIPW-DRBL4) can act as a shutter or a blind. - ! When acting as a shutter the parameter slat position (LEVEL_2) shouldn't be visible - string excludeHmIPLevel2 = "xx"; - object oCH = dom.GetObject( iCH ); - if (oCH) { - if (oCH.HssType().Find("BLIND_VIRTUAL_RECEIVER") != -1) { - object oMode = dom.GetObject(oCH.Address()); - if (oMode.MetaData("channelMode") == "shutter") { - string excludeHmIPLevel2 = "LEVEL_2"; - } - } - } - - string sSelected = ""; - - Write( '' ); - - if( (iP == ivtObjectId) || ( iP == ivtSystemId ) ) - { - if( iP == ivtObjectId ) - { - object oCH = dom.GetObject( iCH ); - if( oCH ) - { - Write( ' '#oCH.Name()#' ' ); - } - else - { - !Write( ' ' ); - Write( ' ' ); - } - } - if( iP == ivtSystemId ) - { - object oDP = dom.GetObject( iDP ); - if( oDP ) - { - Write( ' '#oDP.Name()#' ' ); - } - else - { - Write( ' ' ); - } - } - } - if( (iP == ivtString) || (iP == "string") ) - { - if( (iVT == ivtString) || (iVT == "string") ) - { - string sScript = iV.Substr(0,60); - sScript = sScript#"..."; - Write( ' '#sScript#' ' ); - } - else - { - Write( ' ' ); - } - } - if( (iP==ivtString) || (iP==ivtObjectId) || (iP==ivtSystemId) ) - { - Write( '' ); - if( iVPT == ivtDelay ) - { - integer iHours = iVP.ToString().Substr(11,2).ToInteger(); - integer iMinutes = iVP.ToString().Substr(14,2).ToInteger(); - integer iSeconds = iVP.ToString().Substr(17,2).ToInteger(); - integer iVal = 0; - if( iSeconds > 0 ) { iVal = iSeconds + (iMinutes*60) + (iHours*3600); iMinutes = 0; iHours = 0; } - if( iMinutes > 0 ) { iVal = iMinutes + (iHours*60); iHours = 0; } - if( iHours > 0 ) { iVal = iHours; } - Write( ' ' ); - Write( '' ); - } - } - if( iP == ivtObjectId ) - { - object oCH = dom.GetObject( iCH ); - if( oCH ) - { - boolean isVirLG_ONOFF = false; - if( oCH.Label().Find(s_vir_lg_onoff) != -1 ) { - isVirLG_ONOFF = true; - } - Write( ' ' ); - if( (!bFound) && (iFirstID != ID_ERROR) ) - { - oSD.DestinationDP( iFirstID ); - oSD.DestinationValue( 1 ); - iDP = oSD.DestinationDP(); - iCH = oSD.DestinationChannel(); - iP = oSD.DestinationParam(); - iV = oSD.DestinationValue(); - iVT = oSD.DestinationValueType(); - iVP = oSD.DestinationValueParam(); - iVPT = oSD.DestinationValueParamType(); - } - - object oDP = dom.GetObject( iDP ); - if( oDP ) - { - if( oDP.Operations() & OPERATION_WRITE ) - { - !Write( "SD:["#oSD.ID()#"] " ); - !Write( "DP:["#oDP.ID()#"] " ); - - integer iDPvt = oDP.ValueType(); - integer iDPst = oDP.ValueSubType(); - - !Write( "VT:["#iDPvt#"] " ); - !Write( "ST:["#iDPst#"] " ); - - if( ((iVT == ivtInteger) && (iDPst == istEnum)) || (iVT == ivtBinary) ) - { - !Write( "i" ); - } - - if( (iVT == ivtInteger) || (iVT == ivtFloat) || (iVT == ivtScaling) || (iVT == ivtRelScaling) || (iVT == ivtBitMask) || (iVT == ivtWord) || (iVT == ivtDWord) ) - { - if ((!oDP.IsTypeOf(OT_VARDP)) && (!oDP.IsTypeOf(OT_ALARMDP)) && (oDP.HSSID().Find("WHITE") == 0)) { - ! e. g. OSRAM device - string sUnit = "K"; - real rMin = oDP.ValueMin(); - real rMax = oDP.ValueMax(); - - if( iV < rMin) - { - iV = rMin.ToInteger().ToString(); - } - - iV = iV.ToString(0); - Write( ''#sUnit#'' ); - Write( '' ); - } else { - - if( (iDPst != istEnum) && (! isVirLG_ONOFF) ) - { - Write( ' ${ruleDescrSetValueA} ' ); - - ! Label() presents the type id of the channel, e.g. HM-OU-LED16 or HM-OU-CFM-Pl - string chLabel = oCH.Label(); - - integer hmipWth = oCH.HssType().Find(heatingClimateControlTransceiver); - - if (hmipWth != -1) { - hmipWth = 1; - } - - string sUnit = oDP.ValueUnit().ToString(); - - real rMin = oDP.ValueMin(); - real rMax = oDP.ValueMax(); - - integer iPercentPos = sUnit.Find("%"); - - if( iPercentPos != -1 ) - { - iV = 100.0 * iV; - sUnit = sUnit.Substr(iPercentPos,1); - } - - if( iV.Type() == "real" ) - { - if( iV < rMin) - { - iV = rMin.ToInteger().ToString() + rMin.ToString().Substr(rMin.Find("."),3); - } - iV = iV.ToString(2); - } - - string sRange = " (" + rMin.ToInteger().ToString() + rMin.ToString().Substr(rMin.Find("."),3) + " - " + rMax.ToInteger().ToString() + rMax.ToString().Substr(rMax.Find("."),3) + ")"; - - ! Add more exceptions - if (hmipWth != -1) { - boolean showGenericElem = true; - if ((hmipWth != -1) ) { - - if ((oDP.HSSID().Find("CONTROL_MODE") != -1) || (oDP.HSSID().Find("SET_POINT_MODE") != -1)) { - ! The maximal valid value is 3, but 3 is reserved (AUTO,MANU,PARTY,RESERVED), so we restrict the maximal value to 2 - ! Write( '' ); - Write( '' ); - Write('' ); - - showGenericElem = false; - } - - if (showGenericElem) { - Write( '' ); - Write( sUnit ); - Write( '' ); - } - } - - } else { - Write( '' ); - Write( sUnit ); - Write( '' ); - } - } - } - } - if( (iVT == ivtString) || (iVT == "string") ) - { - ! Label() presents the type id of the channel, e.g. HM-OU-LED16 or HM-OU-CFM-Pl - string chLabel = oCH.Label(); - - integer oump3led = chLabel.Find(hb_oump3led); - integer rc6led = chLabel.Find(hb_rc6led); - integer fxled = chLabel.Find(hb_fxled); - integer statusHbDisplayEPaperDevice = hb_statusDisplayEPaper.Find(chLabel); - integer statusHbDisplayEPaperDeviceMains = hb_statusDisplayEPaperMains.Find(chLabel); - integer statusHbDisplayEPaperDevice75 = hb_statusDisplayEPaper75.Find(chLabel); - integer statusHbDisplayEPaperDevice75Mains = hb_statusDisplayEPaper75Mains.Find(chLabel); - integer ouled16 = chLabel.Find(hm_ouled16); - integer oucfm = chLabel.Find(hm_oucfm); - integer oucfmTW = chLabel.Find(hm_oucfmTW); - integer oucmpcb = chLabel.Find(hm_oucmpcb); - integer partyDialogDevice = hm_partyDialog.Find(chLabel); - integer statusDisplayDevice = hm_statusDisplay.Find(chLabel); - integer statusDisplayEPaperDevice = hm_statusDisplayEPaper.Find(chLabel); - integer rgbw_controller = chLabel.Find(hm_rgbw_controller); - integer i_vir_lg_rgb_dim = chLabel.Find(s_vir_lg_rgb_dim); - integer i_vir_lg_rgbw_dim = chLabel.Find(s_vir_lg_rgbw_dim); - integer i_vir_lg_group = chLabel.Find(s_vir_lg_group); - integer jalousieActor = chLabel.Find(hm_jalousieActor); - integer ePaperAcousticDisplay = chLabel.Find(hmip_wrcd); - - if ((statusDisplayDevice != -1) - || (statusDisplayEPaperDevice != -1) - || (statusHbDisplayEPaperDevice != -1) - || (statusHbDisplayEPaperDeviceMains != -1) - || (statusHbDisplayEPaperDevice75 != -1) - || (statusHbDisplayEPaperDevice75Mains != -1) - || (ePaperAcousticDisplay != -1) - || (rgbw_controller != -1) - || ((jalousieActor != - 1) && (oDP.HSSID().Find("LEVEL_COMBINED") != -1)) - || (((i_vir_lg_rgb_dim != - 1) && (oDP.HSSID().Find("RGB") != -1)) || ((i_vir_lg_rgbw_dim != - 1) && (oDP.HSSID().Find("RGBW") != -1)) || (( i_vir_lg_group != - 1) && (oDP.HSSID().Find("RGBW") != -1))) - ) { - if (statusDisplayDevice != -1) { - if(iV == "0") { - ! This is the default string for 'all values not used' - iV = "0x02,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x03"; - } - Write( ' ' ); - } - - if (statusDisplayEPaperDevice != -1) { - if(iV == "1") { - ! This is the default string for 'all values not used' - iV = "0x02,0x0A,0x0A,0x0A,0x0A,0x0A,0x14,0xC0,0x1C,0xD0,0x16,0x,0x1D,0xE0F0,0x03"; - } - Write( ' ' ); - } - - if (ePaperAcousticDisplay != -1) { - if(iV == "0") { - ! This is the default string for 'all values not used' - iV = "{DDBC=WHITE,DDTC=BLACK,DDI=0,DDA=CENTER,DDS=Zeile 1,DDID=1},{DDBC=WHITE,DDTC=BLACK,DDI=0,DDA=CENTER,DDS=Zeile 2,DDID=2},{DDBC=WHITE,DDTC=BLACK,DDI=0,DDA=CENTER,DDS=Zeile 3,DDID=3},{DDBC=WHITE,DDTC=BLACK,DDI=0,DDA=CENTER,DDS=Zeile 4,DDID=4},{DDBC=WHITE,DDTC=BLACK,DDI=0,DDA=CENTER,DDS=Zeile 5,DDID=5}"; - } - Write( ' ' ); - } - - if ((statusHbDisplayEPaperDevice != -1) || (statusHbDisplayEPaperDeviceMains != -1)) { - if(iV == "1") { - ! This is the default string for 'all values not used' - iV = "0x02,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x03"; - } - Write( ' ' ); - } - - if ((statusHbDisplayEPaperDevice75 != -1) || (statusHbDisplayEPaperDevice75Mains != -1)) { - if(iV == "1") { - ! This is the default string for 'all values not used' - iV = "0x02,0x03"; - } - Write( ' ' ); - } - - if (rgbw_controller != -1) { - - if (iV == "0") { - - if (oDP.HSSID().Find("USER_COLOR") != -1) { - ! deprecated iV = "0,200,0.5,0"; - iV = "{'ACT_HSV_COLOR_VALUE_STORE':0,'ACT_BRIGHTNESS_STORE':200,'RAMP_TIME_STORE':0.5,'ON_TIME_STORE':0}"; - } - - if (oDP.HSSID().Find("USER_PROGRAM") != -1) { - ! deprecated iV = "0,200,0.5,0,0,199"; - iV = "{'ACT_COLOR_PROGRAM_STORE':0,'ACT_BRIGHTNESS_STORE':200,'RAMP_TIME_STORE':0.5,'ON_TIME_STORE':0, 'ACT_MIN_BORDER_STORE':0, 'ACT_MAX_BORDER_STORE':199}"; - } - } - Write( ' ' ); - } - - if ((jalousieActor != - 1) && (oDP.HSSID().Find("LEVEL_COMBINED") != -1)) { - if (iV == "0") { - iV = "0X00,0X00"; - } - Write( ' ' ); - } - - if ((i_vir_lg_rgb_dim != -1) && (oDP.HSSID().Find("RGB") != -1)) { - - if(iV.Find("rgb") == -1) { - iV = "rgb(255, 255, 255)"; - } - - Write( ' ' ); - } - - if (((i_vir_lg_rgbw_dim != -1) || ( i_vir_lg_group != -1)) && (oDP.HSSID().Find("RGBW") != -1)) { - if(iV.Find("rgb") == -1) { - iV = "rgb(255, 255, 255, 255)"; - } - Write( ' ' ); - } - } else { - Write( ' ' ); - } - - if((ouled16 == -1) - && (oump3led == -1) - && (rc6led == -1) - && (fxled == -1) - && (statusHbDisplayEPaperDevice == -1) - && (statusHbDisplayEPaperDeviceMains == -1) - && (statusHbDisplayEPaperDevice75 == -1) - && (statusHbDisplayEPaperDevice75Mains == -1) - && (oucfm == -1) - && (oucfmTW == -1) - && (oucmpcb == -1) - && (partyDialogDevice == -1) - && (statusDisplayDevice == -1) - && (statusDisplayEPaperDevice == -1) - && (ePaperAcousticDisplay == -1) - && (rgbw_controller == -1) - && (jalousieActor == -1) - && (i_vir_lg_rgb_dim == -1) - && (i_vir_lg_rgbw_dim == -1) - && ( i_vir_lg_group == -1) - ) { - Write( '' ); - } else { - if(ouled16 != -1) { - Write( '' ); - } - if((oucfm != -1) || (oucfmTW != -1) || (oucmpcb != -1)) { - Write( '' ); - } - if(oump3led != -1) { - Write( '' ); - } - if(rc6led != -1) { - Write( '' ); - } - if(fxled != -1) { - Write( '' ); - } - if (partyDialogDevice != -1) { - Write( '' ); - } - if (statusDisplayDevice != -1) { - Write( '' ); - } - if (statusDisplayEPaperDevice != -1) { - Write( '' ); - } - if ((statusHbDisplayEPaperDevice != -1) || (statusHbDisplayEPaperDeviceMains != -1)) { - Write( '' ); - } - if (ePaperAcousticDisplay != -1) { - Write( '' ); - } - if (rgbw_controller != -1) { - Write( '' ); - } - - if ((jalousieActor != - 1) && (oDP.HSSID().Find("LEVEL_COMBINED") != -1)) { - Write( '' ); - } - - if ((i_vir_lg_rgb_dim != -1) && (oDP.HSSID().Find("RGB") != -1)) { - Write( '' ); - } - - if (((i_vir_lg_rgbw_dim != -1) || ( i_vir_lg_group != -1)) && (oDP.HSSID().Find("RGBW") != -1)) { - Write( '' ); - } - } - } - - if( iVT == ivtObjectId ) - { - - Write( ' mit ' ); - object oDPTmp = dom.GetObject( iV ); - if( oDPTmp ) - { - - object oCH = dom.GetObject( oDPTmp.Channel() ); - if( oCH ) - { - Write( ' '#oCH.Name()#' ' ); - Write( ' ' ); - } else { Write("(unbekannter Kanal)"); } - } else { Write("(unbekannter Datenpunkt)"); } - Write( ' ' ); - } - - if( iVT == ivtSystemId ) - { - Write( ' mit ' ); - object oDPTmp = dom.GetObject( iV ); - string sNameTmp = ""; - if( oDPTmp ) { sNameTmp = oDPTmp.Name(); } - Write( ' '#sNameTmp#' ' ); - Write( ' ' ); - } - } - } - } - } - if( iP == ivtSystemId ) - { - object oDP = dom.GetObject( iDP ); - if( oDP ) - { - if( oDP.Operations() & OPERATION_WRITE ) - { - if( oDP.ValueType() == ivtBinary ) - { - Write( ' ' ); - } - if (oDP.ValueSubType() == istChar8859) - { - Write( ' ' ); - Write( oDP.ValueUnit()#" " ); - } - if( oDP.ValueSubType() == istGeneric ) - { - Write( ' ' ); - real percVal = oSD.DestinationValue(); - if (oDP.ValueUnit() == "%") { - percVal = oSD.DestinationValue() * 100; - } - Write( ' ' ); - Write( oDP.ValueUnit()#" " ); - !Write( '' ); - } - if( oDP.ValueSubType() == istEnum ) - { - Write( ' ' ); - } - } - } - } -%> diff --git a/patchsource/www/rega/esp/side.inc.orig b/patchsource/www/rega/esp/side.inc.orig index fd40d675..515a6219 100755 --- a/patchsource/www/rega/esp/side.inc.orig +++ b/patchsource/www/rega/esp/side.inc.orig @@ -1,5 +1,7 @@ <% + boolean showChannelParam = true; + integer iDP = oSD.DestinationDP(); integer iCH = oSD.DestinationChannel(); integer iP = oSD.DestinationParam(); @@ -17,8 +19,9 @@ string hm_statusDisplayEPaper = "HM-Dis-EP-WM55"; string hm_rgbw_controller = "HM-LC-RGBW-WM"; string hm_jalousieActor = "HM-LC-Ja1PBU"; - string heatingClimateControlTransceiver = "HEATING_CLIMATECONTROL_TRANSCEIVER"; + string hmip_wrcd = "HmIP-WRCD"; + string heatingClimateControlTransceiver = "HEATING_CLIMATECONTROL_TRANSCEIVER"; string s_vir_lg_rgb_dim = "VIR-LG-RGB-DIM"; string s_vir_lg_rgbw_dim = "VIR-LG-RGBW-DIM"; string s_vir_lg_white_dim = "VIR-LG-WHITE-DIM"; @@ -154,7 +157,7 @@ if( oCH.Label().Find(s_vir_lg_onoff) != -1 ) { isVirLG_ONOFF = true; } - Write( ' ' ); boolean bFound = false; integer iFirstID = ID_ERROR; string sDP; @@ -199,76 +202,82 @@ && (optionVal.Find(excludeColorList) == -1) && (optionVal.Find(excludeOntimeList) == -1) ) { + ! Some parameter shouldn´t be visible - this is the new way to hide certain parameters + Call("/esp/functions.fn::destinationIsParameterVisible()"); + if(showChannelParam == true) { - if( (oDP.ID() == iDP) && (iV == sVLKey) ) { sSelected = " selected"; } else { sSelected = ""; } - Write( '' ); } - Call("/esp/functions.fn::getSpecialTranslationPrgDest()"); - Write( sValue ); - Write( '' ); } - } - } } else { if( ((iDPvt == ivtBinary) && (iDPst != istAction)) || (isVirLG_ONOFF) ) { - string sValue = "not set"; - if( (oDP.ID() == iDP) && (iV == 1) ) { sSelected = " selected"; } else { sSelected = ""; } - Write( '' ); - if( (oDP.ID() == iDP) && (iV == 0) ) { sSelected = " selected"; } else { sSelected = ""; } - Write( '' ); + if( (oDP.ID() == iDP) && (iV == 0) ) { sSelected = " selected"; } else { sSelected = ""; } + Write( '' ); } - Write( sValue ); - Write( '' ); } else { @@ -279,29 +288,34 @@ && (oDP.HSSID().Find(excludeHmIPLevel2) == -1) && (oDP.HSSID().Find(excludeOutputSelectSize) == -1) && (oDP.HSSID().Find(excludeCombinedParameter) == -1) + || ((oCH.Label().Find(hmip_wrcd) != -1) && (oDP.HSSID().Find(excludeCombinedParameter) != -1)) ) { - Write( '' ); } - Write( sValue ); - Write( '' ); } } } @@ -459,9 +473,11 @@ integer i_vir_lg_rgbw_dim = chLabel.Find(s_vir_lg_rgbw_dim); integer i_vir_lg_group = chLabel.Find(s_vir_lg_group); integer jalousieActor = chLabel.Find(hm_jalousieActor); + integer ePaperAcousticDisplay = chLabel.Find(hmip_wrcd); if ((statusDisplayDevice != -1) || (statusDisplayEPaperDevice != -1) + || (ePaperAcousticDisplay != -1) || (rgbw_controller != -1) || ((jalousieActor != - 1) && (oDP.HSSID().Find("LEVEL_COMBINED") != -1)) || (((i_vir_lg_rgb_dim != - 1) && (oDP.HSSID().Find("RGB") != -1)) || ((i_vir_lg_rgbw_dim != - 1) && (oDP.HSSID().Find("RGBW") != -1)) || (( i_vir_lg_group != - 1) && (oDP.HSSID().Find("RGBW") != -1))) @@ -482,6 +498,14 @@ Write( ' ' ); } + if (ePaperAcousticDisplay != -1) { + if(iV == "0") { + ! This is the default string for 'all values not used' + iV = "{DDBC=WHITE,DDTC=BLACK,DDI=0,DDA=CENTER,DDS=Zeile 1,DDID=1},{DDBC=WHITE,DDTC=BLACK,DDI=0,DDA=CENTER,DDS=Zeile 2,DDID=2},{DDBC=WHITE,DDTC=BLACK,DDI=0,DDA=CENTER,DDS=Zeile 3,DDID=3},{DDBC=WHITE,DDTC=BLACK,DDI=0,DDA=CENTER,DDS=Zeile 4,DDID=4},{DDBC=WHITE,DDTC=BLACK,DDI=0,DDA=CENTER,DDS=Zeile 5,DDID=5}"; + } + Write( ' ' ); + } + if (rgbw_controller != -1) { if (iV == "0") { @@ -532,6 +556,7 @@ && (partyDialogDevice == -1) && (statusDisplayDevice == -1) && (statusDisplayEPaperDevice == -1) + && (ePaperAcousticDisplay == -1) && (rgbw_controller == -1) && (jalousieActor == -1) && (i_vir_lg_rgb_dim == -1) @@ -555,6 +580,9 @@ if (statusDisplayEPaperDevice != -1) { Write( '' ); } + if (ePaperAcousticDisplay != -1) { + Write( '' ); + } if (rgbw_controller != -1) { Write( '' ); } diff --git a/patchsource/www/rega/esp/side.inc.orig-3.45 b/patchsource/www/rega/esp/side.inc.orig-3.45 deleted file mode 100755 index 515a6219..00000000 --- a/patchsource/www/rega/esp/side.inc.orig-3.45 +++ /dev/null @@ -1,740 +0,0 @@ -<% - - boolean showChannelParam = true; - - integer iDP = oSD.DestinationDP(); - integer iCH = oSD.DestinationChannel(); - integer iP = oSD.DestinationParam(); - integer iV = oSD.DestinationValue(); - integer iVT = oSD.DestinationValueType(); - integer iVP = oSD.DestinationValueParam(); - integer iVPT = oSD.DestinationValueParamType(); - - string hm_ouled16 = "HM-OU-LED16"; - string hm_oucfm = "HM-OU-CFM-Pl"; - string hm_oucfmTW = "HM-OU-CFM-TW"; - string hm_oucmpcb = "HM-OU-CM-PCB"; - string hm_partyDialog = "HM-CC-RT-DN HM-TC-IT-WM-W-EU HM-CC-VG-1"; - string hm_statusDisplay = "HM-Dis-WM55"; - string hm_statusDisplayEPaper = "HM-Dis-EP-WM55"; - string hm_rgbw_controller = "HM-LC-RGBW-WM"; - string hm_jalousieActor = "HM-LC-Ja1PBU"; - string hmip_wrcd = "HmIP-WRCD"; - - string heatingClimateControlTransceiver = "HEATING_CLIMATECONTROL_TRANSCEIVER"; - string s_vir_lg_rgb_dim = "VIR-LG-RGB-DIM"; - string s_vir_lg_rgbw_dim = "VIR-LG-RGBW-DIM"; - string s_vir_lg_white_dim = "VIR-LG-WHITE-DIM"; - string s_vir_lg_group = "VIR-LG-GROUP"; - string s_vir_lg_onoff = "VIR-LG-ONOFF"; - - string excludePARTY = "PARTY_"; - string includePARTY = "PARTY_MODE_SUBMIT"; - - string excludeSoundFileList = "SOUNDFILE_LIST_"; - string excludeColorList = "COLOR_LIST_"; - string excludeOntimeList = "ON_TIME_LIST_"; - string excludeOutputSelectSize = "OUTPUT_SELECT_SIZE"; - string excludeCombinedParameter = "COMBINED_PARAMETER"; - string excludeRepetitions = "REPETITIONS="; - - string excludeHmIPCDT = "CONTROL_DIFFERENTIAL_TEMPERATURE"; - string excludeHmIPResetMotion = "RESET_MOTION"; - string excludeHmIPSmokeDetCommandReservedAlarmOff = "SMOKE_DETECTOR_COMMAND=RESERVED_ALARM_OFF"; - - ! A wired blind actor (e. g. HmIPW-DRBL4) can act as a shutter or a blind. - ! When acting as a shutter the parameter slat position (LEVEL_2) shouldn't be visible - string excludeHmIPLevel2 = "xx"; - object oCH = dom.GetObject( iCH ); - if (oCH) { - if (oCH.HssType().Find("BLIND_VIRTUAL_RECEIVER") != -1) { - object oMode = dom.GetObject(oCH.Address()); - if (oMode.MetaData("channelMode") == "shutter") { - string excludeHmIPLevel2 = "LEVEL_2"; - } - } - } - - string sSelected = ""; - - Write( '' ); - - if( (iP == ivtObjectId) || ( iP == ivtSystemId ) ) - { - if( iP == ivtObjectId ) - { - object oCH = dom.GetObject( iCH ); - if( oCH ) - { - Write( ' '#oCH.Name()#' ' ); - } - else - { - !Write( ' ' ); - Write( ' ' ); - } - } - if( iP == ivtSystemId ) - { - object oDP = dom.GetObject( iDP ); - if( oDP ) - { - Write( ' '#oDP.Name()#' ' ); - } - else - { - Write( ' ' ); - } - } - } - if( (iP == ivtString) || (iP == "string") ) - { - if( (iVT == ivtString) || (iVT == "string") ) - { - string sScript = iV.Substr(0,60); - sScript = sScript#"..."; - Write( ' '#sScript#' ' ); - } - else - { - Write( ' ' ); - } - } - if( (iP==ivtString) || (iP==ivtObjectId) || (iP==ivtSystemId) ) - { - Write( '' ); - if( iVPT == ivtDelay ) - { - integer iHours = iVP.ToString().Substr(11,2).ToInteger(); - integer iMinutes = iVP.ToString().Substr(14,2).ToInteger(); - integer iSeconds = iVP.ToString().Substr(17,2).ToInteger(); - integer iVal = 0; - if( iSeconds > 0 ) { iVal = iSeconds + (iMinutes*60) + (iHours*3600); iMinutes = 0; iHours = 0; } - if( iMinutes > 0 ) { iVal = iMinutes + (iHours*60); iHours = 0; } - if( iHours > 0 ) { iVal = iHours; } - Write( ' ' ); - Write( '' ); - } - } - if( iP == ivtObjectId ) - { - object oCH = dom.GetObject( iCH ); - if( oCH ) - { - boolean isVirLG_ONOFF = false; - if( oCH.Label().Find(s_vir_lg_onoff) != -1 ) { - isVirLG_ONOFF = true; - } - Write( ' ' ); - if( (!bFound) && (iFirstID != ID_ERROR) ) - { - oSD.DestinationDP( iFirstID ); - oSD.DestinationValue( 1 ); - iDP = oSD.DestinationDP(); - iCH = oSD.DestinationChannel(); - iP = oSD.DestinationParam(); - iV = oSD.DestinationValue(); - iVT = oSD.DestinationValueType(); - iVP = oSD.DestinationValueParam(); - iVPT = oSD.DestinationValueParamType(); - } - - object oDP = dom.GetObject( iDP ); - if( oDP ) - { - if( oDP.Operations() & OPERATION_WRITE ) - { - !Write( "SD:["#oSD.ID()#"] " ); - !Write( "DP:["#oDP.ID()#"] " ); - - integer iDPvt = oDP.ValueType(); - integer iDPst = oDP.ValueSubType(); - - !Write( "VT:["#iDPvt#"] " ); - !Write( "ST:["#iDPst#"] " ); - - if( ((iVT == ivtInteger) && (iDPst == istEnum)) || (iVT == ivtBinary) ) - { - !Write( "i" ); - } - - if( (iVT == ivtInteger) || (iVT == ivtFloat) || (iVT == ivtScaling) || (iVT == ivtRelScaling) || (iVT == ivtBitMask) || (iVT == ivtWord) || (iVT == ivtDWord) ) - { - if ((!oDP.IsTypeOf(OT_VARDP)) && (!oDP.IsTypeOf(OT_ALARMDP)) && (oDP.HSSID().Find("WHITE") == 0)) { - ! e. g. OSRAM device - string sUnit = "K"; - real rMin = oDP.ValueMin(); - real rMax = oDP.ValueMax(); - - if( iV < rMin) - { - iV = rMin.ToInteger().ToString(); - } - - iV = iV.ToString(0); - Write( ''#sUnit#'' ); - Write( '' ); - } else { - - if( (iDPst != istEnum) && (! isVirLG_ONOFF) ) - { - Write( ' ${ruleDescrSetValueA} ' ); - - ! Label() presents the type id of the channel, e.g. HM-OU-LED16 or HM-OU-CFM-Pl - string chLabel = oCH.Label(); - - integer hmipWth = oCH.HssType().Find(heatingClimateControlTransceiver); - - if (hmipWth != -1) { - hmipWth = 1; - } - - string sUnit = oDP.ValueUnit().ToString(); - - real rMin = oDP.ValueMin(); - real rMax = oDP.ValueMax(); - - integer iPercentPos = sUnit.Find("%"); - - if( iPercentPos != -1 ) - { - iV = 100.0 * iV; - sUnit = sUnit.Substr(iPercentPos,1); - } - - if( iV.Type() == "real" ) - { - if( iV < rMin) - { - iV = rMin.ToInteger().ToString() + rMin.ToString().Substr(rMin.Find("."),3); - } - iV = iV.ToString(2); - } - - string sRange = " (" + rMin.ToInteger().ToString() + rMin.ToString().Substr(rMin.Find("."),3) + " - " + rMax.ToInteger().ToString() + rMax.ToString().Substr(rMax.Find("."),3) + ")"; - - ! Add more exceptions - if (hmipWth != -1) { - boolean showGenericElem = true; - if ((hmipWth != -1) ) { - - if ((oDP.HSSID().Find("CONTROL_MODE") != -1) || (oDP.HSSID().Find("SET_POINT_MODE") != -1)) { - ! The maximal valid value is 3, but 3 is reserved (AUTO,MANU,PARTY,RESERVED), so we restrict the maximal value to 2 - ! Write( '' ); - Write( '' ); - Write('' ); - - showGenericElem = false; - } - - if (showGenericElem) { - Write( '' ); - Write( sUnit ); - Write( '' ); - } - } - - } else { - Write( '' ); - Write( sUnit ); - Write( '' ); - } - } - } - } - if( (iVT == ivtString) || (iVT == "string") ) - { - ! Label() presents the type id of the channel, e.g. HM-OU-LED16 or HM-OU-CFM-Pl - string chLabel = oCH.Label(); - - integer ouled16 = chLabel.Find(hm_ouled16); - integer oucfm = chLabel.Find(hm_oucfm); - integer oucfmTW = chLabel.Find(hm_oucfmTW); - integer oucmpcb = chLabel.Find(hm_oucmpcb); - integer partyDialogDevice = hm_partyDialog.Find(chLabel); - integer statusDisplayDevice = hm_statusDisplay.Find(chLabel); - integer statusDisplayEPaperDevice = hm_statusDisplayEPaper.Find(chLabel); - integer rgbw_controller = chLabel.Find(hm_rgbw_controller); - integer i_vir_lg_rgb_dim = chLabel.Find(s_vir_lg_rgb_dim); - integer i_vir_lg_rgbw_dim = chLabel.Find(s_vir_lg_rgbw_dim); - integer i_vir_lg_group = chLabel.Find(s_vir_lg_group); - integer jalousieActor = chLabel.Find(hm_jalousieActor); - integer ePaperAcousticDisplay = chLabel.Find(hmip_wrcd); - - if ((statusDisplayDevice != -1) - || (statusDisplayEPaperDevice != -1) - || (ePaperAcousticDisplay != -1) - || (rgbw_controller != -1) - || ((jalousieActor != - 1) && (oDP.HSSID().Find("LEVEL_COMBINED") != -1)) - || (((i_vir_lg_rgb_dim != - 1) && (oDP.HSSID().Find("RGB") != -1)) || ((i_vir_lg_rgbw_dim != - 1) && (oDP.HSSID().Find("RGBW") != -1)) || (( i_vir_lg_group != - 1) && (oDP.HSSID().Find("RGBW") != -1))) - ) { - if (statusDisplayDevice != -1) { - if(iV == "0") { - ! This is the default string for 'all values not used' - iV = "0x02,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x03"; - } - Write( ' ' ); - } - - if (statusDisplayEPaperDevice != -1) { - if(iV == "1") { - ! This is the default string for 'all values not used' - iV = "0x02,0x0A,0x0A,0x0A,0x0A,0x0A,0x14,0xC0,0x1C,0xD0,0x16,0x,0x1D,0xE0F0,0x03"; - } - Write( ' ' ); - } - - if (ePaperAcousticDisplay != -1) { - if(iV == "0") { - ! This is the default string for 'all values not used' - iV = "{DDBC=WHITE,DDTC=BLACK,DDI=0,DDA=CENTER,DDS=Zeile 1,DDID=1},{DDBC=WHITE,DDTC=BLACK,DDI=0,DDA=CENTER,DDS=Zeile 2,DDID=2},{DDBC=WHITE,DDTC=BLACK,DDI=0,DDA=CENTER,DDS=Zeile 3,DDID=3},{DDBC=WHITE,DDTC=BLACK,DDI=0,DDA=CENTER,DDS=Zeile 4,DDID=4},{DDBC=WHITE,DDTC=BLACK,DDI=0,DDA=CENTER,DDS=Zeile 5,DDID=5}"; - } - Write( ' ' ); - } - - if (rgbw_controller != -1) { - - if (iV == "0") { - - if (oDP.HSSID().Find("USER_COLOR") != -1) { - ! deprecated iV = "0,200,0.5,0"; - iV = "{'ACT_HSV_COLOR_VALUE_STORE':0,'ACT_BRIGHTNESS_STORE':200,'RAMP_TIME_STORE':0.5,'ON_TIME_STORE':0}"; - } - - if (oDP.HSSID().Find("USER_PROGRAM") != -1) { - ! deprecated iV = "0,200,0.5,0,0,199"; - iV = "{'ACT_COLOR_PROGRAM_STORE':0,'ACT_BRIGHTNESS_STORE':200,'RAMP_TIME_STORE':0.5,'ON_TIME_STORE':0, 'ACT_MIN_BORDER_STORE':0, 'ACT_MAX_BORDER_STORE':199}"; - } - } - Write( ' ' ); - } - - if ((jalousieActor != - 1) && (oDP.HSSID().Find("LEVEL_COMBINED") != -1)) { - if (iV == "0") { - iV = "0X00,0X00"; - } - Write( ' ' ); - } - - if ((i_vir_lg_rgb_dim != -1) && (oDP.HSSID().Find("RGB") != -1)) { - - if(iV.Find("rgb") == -1) { - iV = "rgb(255, 255, 255)"; - } - - Write( ' ' ); - } - - if (((i_vir_lg_rgbw_dim != -1) || ( i_vir_lg_group != -1)) && (oDP.HSSID().Find("RGBW") != -1)) { - if(iV.Find("rgb") == -1) { - iV = "rgb(255, 255, 255, 255)"; - } - Write( ' ' ); - } - } else { - Write( ' ' ); - } - - if((ouled16 == -1) - && (oucfm == -1) - && (oucfmTW == -1) - && (oucmpcb == -1) - && (partyDialogDevice == -1) - && (statusDisplayDevice == -1) - && (statusDisplayEPaperDevice == -1) - && (ePaperAcousticDisplay == -1) - && (rgbw_controller == -1) - && (jalousieActor == -1) - && (i_vir_lg_rgb_dim == -1) - && (i_vir_lg_rgbw_dim == -1) - && ( i_vir_lg_group == -1) - ) { - Write( '' ); - } else { - if(ouled16 != -1) { - Write( '' ); - } - if((oucfm != -1) || (oucfmTW != -1) || (oucmpcb != -1)) { - Write( '' ); - } - if (partyDialogDevice != -1) { - Write( '' ); - } - if (statusDisplayDevice != -1) { - Write( '' ); - } - if (statusDisplayEPaperDevice != -1) { - Write( '' ); - } - if (ePaperAcousticDisplay != -1) { - Write( '' ); - } - if (rgbw_controller != -1) { - Write( '' ); - } - - if ((jalousieActor != - 1) && (oDP.HSSID().Find("LEVEL_COMBINED") != -1)) { - Write( '' ); - } - - if ((i_vir_lg_rgb_dim != -1) && (oDP.HSSID().Find("RGB") != -1)) { - Write( '' ); - } - - if (((i_vir_lg_rgbw_dim != -1) || ( i_vir_lg_group != -1)) && (oDP.HSSID().Find("RGBW") != -1)) { - Write( '' ); - } - } - } - - if( iVT == ivtObjectId ) - { - - Write( ' mit ' ); - object oDPTmp = dom.GetObject( iV ); - if( oDPTmp ) - { - - object oCH = dom.GetObject( oDPTmp.Channel() ); - if( oCH ) - { - Write( ' '#oCH.Name()#' ' ); - Write( ' ' ); - } else { Write("(unbekannter Kanal)"); } - } else { Write("(unbekannter Datenpunkt)"); } - Write( ' ' ); - } - - if( iVT == ivtSystemId ) - { - Write( ' mit ' ); - object oDPTmp = dom.GetObject( iV ); - string sNameTmp = ""; - if( oDPTmp ) { sNameTmp = oDPTmp.Name(); } - Write( ' '#sNameTmp#' ' ); - Write( ' ' ); - } - } - } - } - } - if( iP == ivtSystemId ) - { - object oDP = dom.GetObject( iDP ); - if( oDP ) - { - if( oDP.Operations() & OPERATION_WRITE ) - { - if( oDP.ValueType() == ivtBinary ) - { - Write( ' ' ); - } - if (oDP.ValueSubType() == istChar8859) - { - Write( ' ' ); - Write( oDP.ValueUnit()#" " ); - } - if( oDP.ValueSubType() == istGeneric ) - { - Write( ' ' ); - real percVal = oSD.DestinationValue(); - if (oDP.ValueUnit() == "%") { - percVal = oSD.DestinationValue() * 100; - } - Write( ' ' ); - Write( oDP.ValueUnit()#" " ); - !Write( '' ); - } - if( oDP.ValueSubType() == istEnum ) - { - Write( ' ' ); - } - } - } - } -%> diff --git a/patchsource/www/rega/pages/tabs/admin/views/programs.htm b/patchsource/www/rega/pages/tabs/admin/views/programs.htm index 0766c8d1..e5a1906f 100755 --- a/patchsource/www/rega/pages/tabs/admin/views/programs.htm +++ b/patchsource/www/rega/pages/tabs/admin/views/programs.htm @@ -94,7 +94,7 @@ ReloadSingleDestination(sdid); }; }; - + // HB-RC-6-PBU-LED ChangeHBRC6LEDValue = function(sdid) { @@ -130,8 +130,8 @@ dlgPopup.hide(); ReloadSingleDestination(sdid); }; - }; - + }; + // Heating thermostate SetPartyMode = function(elm) { var url = "/pages/msg/setPartyMode.htm"; @@ -178,14 +178,27 @@ }; SetStatusDisplay = function(regaDialogID, mode) { - var elm; - if (mode == "DIS") elm = jQuery("#setStatusDisplay" + regaDialogID); - if (mode == "DIS-EP") elm = jQuery("#setStatusDisplayEPaper" + regaDialogID) ; - if (mode == "DIS-EP42BW") elm = jQuery("#setHbStatusDisplayEPaper" + regaDialogID) ; + var url = "/pages/msg/setStatusDisplay.htm"; + var elm; + + switch (mode) { + case "DIS": + elm = jQuery("#setStatusDisplay" + regaDialogID); + break; + case "DIS-EP": + elm = jQuery("#setStatusDisplayEPaper" + regaDialogID); + break; + case "ACOUSTIC_DIS-EP": + elm = jQuery("#ePaperAcousticDisplay" + regaDialogID); + break; + case "DIS-EP42BW": + elm = jQuery("#setHbStatusDisplayEPaper" + regaDialogID); + break; + } jQuery(elm).prop("disabled", true); - var url = "/pages/msg/setStatusDisplay.htm"; + var inputElm = jQuery(elm).prev(); // this is the element which contains the relevant string to transmit var req = jQuery.ajax({ @@ -232,6 +245,18 @@ inputElm.change(); } }, "html"); + } else if (mode == "ACOUSTIC_DIS-EP") { + statusDisplayDialog = new StatusDisplayDialogAcousticEPaper(translateKey("statusDisplayDialogTitle"), htmlContent, jQuery(inputElm).val(), function (result) { + if (result == this.RESULT_YES) { + var configString = this.getConfigString(); + console.log(configString); + var inputElm = jQuery(elm).prev(); + inputElm.val(configString); + inputElm.change(); + } + },"html"); + statusDisplayDialog.btnTextYes(translateKey("footerBtnOk")); + statusDisplayDialog.btnTextNo(translateKey("footerBtnCancel")); } @@ -507,7 +532,18 @@ { var callback = function ( result ) { - if (result) { iseSingleDestination.SetChannel(scid, result); } + if (result) { + window.setTimeout(function() { + iseSingleDestination.SetChannel(scid, result); + // Necessary for the COMBINED_PARAMETER of the HmIP-WRCD + var chn = DeviceList.getChannel(result); + if (chn.channelType == "ACOUSTIC_DISPLAY_RECEIVER") { + window.setTimeout(function () { + jQuery("#setDestinationDPSelectChange" + scid).change(); + }, 250); + } + },500); + } }; ChannelChooser.show(callback, ChannelChooser.SHOW_WRITABLE, ChannelChooser.PRG_ACTIVITY); diff --git a/patchsource/www/rega/pages/tabs/admin/views/programs.htm-3.45 b/patchsource/www/rega/pages/tabs/admin/views/programs.htm-3.45 deleted file mode 100755 index e5a1906f..00000000 --- a/patchsource/www/rega/pages/tabs/admin/views/programs.htm-3.45 +++ /dev/null @@ -1,811 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - -
${thName}${thDescription}${thProgramCondition}${thProgramActivity}${thAction}
<% Write( oPrg.Name() ); %><% Write( oPrg.PrgInfo() ); %><% object oPrgID = oPrg.ID(); string sRet = ""; Call("/esp/programs.fn::WriteConditionText()"); Write(sRet); %><% object oPrgID = oPrg.ID(); string sRet = ""; Call("/esp/programs.fn::WriteDestinationText()"); Write(sRet); %> />
-
-
- -
- - \ No newline at end of file diff --git a/patchsource/www/rega/pages/tabs/admin/views/programs.htm.orig b/patchsource/www/rega/pages/tabs/admin/views/programs.htm.orig index fe74873e..78545bbc 100755 --- a/patchsource/www/rega/pages/tabs/admin/views/programs.htm.orig +++ b/patchsource/www/rega/pages/tabs/admin/views/programs.htm.orig @@ -141,11 +141,24 @@ }; SetStatusDisplay = function(regaDialogID, mode) { - var elm = (mode == "DIS") ? jQuery("#setStatusDisplay" + regaDialogID) : jQuery("#setStatusDisplayEPaper" + regaDialogID) ; + var url = "/pages/msg/setStatusDisplay.htm"; + var elm; + + switch (mode) { + case "DIS": + elm = jQuery("#setStatusDisplay" + regaDialogID); + break; + case "DIS-EP": + elm = jQuery("#setStatusDisplayEPaper" + regaDialogID); + break; + case "ACOUSTIC_DIS-EP": + elm = jQuery("#ePaperAcousticDisplay" + regaDialogID); + break; + } jQuery(elm).prop("disabled", true); - var url = "/pages/msg/setStatusDisplay.htm"; + var inputElm = jQuery(elm).prev(); // this is the element which contains the relevant string to transmit var req = jQuery.ajax({ @@ -179,6 +192,18 @@ inputElm.change(); } }, "html"); + } else if (mode == "ACOUSTIC_DIS-EP") { + statusDisplayDialog = new StatusDisplayDialogAcousticEPaper(translateKey("statusDisplayDialogTitle"), htmlContent, jQuery(inputElm).val(), function (result) { + if (result == this.RESULT_YES) { + var configString = this.getConfigString(); + console.log(configString); + var inputElm = jQuery(elm).prev(); + inputElm.val(configString); + inputElm.change(); + } + },"html"); + statusDisplayDialog.btnTextYes(translateKey("footerBtnOk")); + statusDisplayDialog.btnTextNo(translateKey("footerBtnCancel")); } @@ -454,7 +479,18 @@ { var callback = function ( result ) { - if (result) { iseSingleDestination.SetChannel(scid, result); } + if (result) { + window.setTimeout(function() { + iseSingleDestination.SetChannel(scid, result); + // Necessary for the COMBINED_PARAMETER of the HmIP-WRCD + var chn = DeviceList.getChannel(result); + if (chn.channelType == "ACOUSTIC_DISPLAY_RECEIVER") { + window.setTimeout(function () { + jQuery("#setDestinationDPSelectChange" + scid).change(); + }, 250); + } + },500); + } }; ChannelChooser.show(callback, ChannelChooser.SHOW_WRITABLE, ChannelChooser.PRG_ACTIVITY); diff --git a/patchsource/www/rega/pages/tabs/admin/views/programs.htm.orig-3.45 b/patchsource/www/rega/pages/tabs/admin/views/programs.htm.orig-3.45 deleted file mode 100755 index 78545bbc..00000000 --- a/patchsource/www/rega/pages/tabs/admin/views/programs.htm.orig-3.45 +++ /dev/null @@ -1,758 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - -
${thName}${thDescription}${thProgramCondition}${thProgramActivity}${thAction}
<% Write( oPrg.Name() ); %><% Write( oPrg.PrgInfo() ); %><% object oPrgID = oPrg.ID(); string sRet = ""; Call("/esp/programs.fn::WriteConditionText()"); Write(sRet); %><% object oPrgID = oPrg.ID(); string sRet = ""; Call("/esp/programs.fn::WriteDestinationText()"); Write(sRet); %> />
-
-
- -
- - \ No newline at end of file diff --git a/snapshot-test.sh b/snapshot-test.sh index 5034a6cc..8a74da05 100755 --- a/snapshot-test.sh +++ b/snapshot-test.sh @@ -11,7 +11,7 @@ RM_NIGHTLY_DIR=${DIR_PREFIX}/rm-snapshot RM_NIGHTLY_URL=$(curl -sSL -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/jens-maus/RaspberryMatic/releases/22744592/assets | jq -r '.[] | select(.name | endswith("ccu3.tgz")) | .browser_download_url') IMAGEFILENAME=${DIR_PREFIX}/rm-snapshot/rootfs.ext4 PATCH_DIR=${SCRIPT_DIR}/src/addon/patch -PATCHSUBDIR_VERSION=le_343 +PATCHSUBDIR_VERSION=le_363 PATCHSUBDIR_COMMON=common check_ccu_fw_version() @@ -20,8 +20,8 @@ check_ccu_fw_version() version=`grep VERSION ${MOUNT_DIR}/boot/VERSION | awk -F'[=.]' {'print $3'}` build=`grep VERSION ${MOUNT_DIR}/boot/VERSION | awk -F'[=.]' {'print $4'}` - if [ $model -ge 2 ] && [ $version -ge 45 ]; then - PATCHSUBDIR_VERSION=ge_345 + if [ $model -ge 2 ] && [ $version -ge 65 ]; then + PATCHSUBDIR_VERSION=ge_365 fi echo "Found firmware version $model.$version.$build - using patch subdirectory version ${PATCHSUBDIR_VERSION}" diff --git a/src/addon/patch/common/datapointconfigurator.fn.patch b/src/addon/patch/common/datapointconfigurator.fn.patch index 74a81397..68e6fb94 100644 --- a/src/addon/patch/common/datapointconfigurator.fn.patch +++ b/src/addon/patch/common/datapointconfigurator.fn.patch @@ -1,8 +1,8 @@ --- ./patchsource/www/rega/esp/datapointconfigurator.fn.orig +++ ./patchsource/www/rega/esp/datapointconfigurator.fn -@@ -148,6 +148,20 @@ - var CN_WIN_SC_SENSOR = "WIN_SC_SENSOR."; - var CN_WINDOW = "WINDOW."; +@@ -151,6 +151,20 @@ + var CN_EVENT_INTERFACE = "EVENT_INTERFACE."; + var CN_NOT_ACTIVE = "CHANNEL_NOT_ACTIVE"; + var CN_RFID_BUTTON = "RFIDBTN."; + var CN_IRRC_BUTTON = "IRRCBTN."; @@ -18,8 +18,8 @@ + var CN_PWRSC = "PWRSC."; + var CN_CONDSC = "CONDSC."; + - var CN_EVENT_INTERFACE = "EVENT_INTERFACE."; - var CN_NOT_ACTIVE = "CHANNEL_NOT_ACTIVE"; + var isInvisible = false; + var isKnownControl = false; @@ -369,7 +383,140 @@ sLastControlName = CN_BTN_SHORT_ONLY; diff --git a/src/addon/patch/ge_345/programs.htm.patch b/src/addon/patch/common/programs.htm.patch similarity index 100% rename from src/addon/patch/ge_345/programs.htm.patch rename to src/addon/patch/common/programs.htm.patch diff --git a/src/addon/patch/ge_345/side.inc.patch b/src/addon/patch/common/side.inc.patch similarity index 100% rename from src/addon/patch/ge_345/side.inc.patch rename to src/addon/patch/common/side.inc.patch diff --git a/src/addon/patch/ge_365/rhs.fn.patch b/src/addon/patch/ge_365/rhs.fn.patch new file mode 100644 index 00000000..ffd04b65 --- /dev/null +++ b/src/addon/patch/ge_365/rhs.fn.patch @@ -0,0 +1,40 @@ +--- ./patchsource/www/rega/esp/controls/rhs.fn.orig ++++ ./patchsource/www/rega/esp/controls/rhs.fn +@@ -1,4 +1,5 @@ + function ::CreateWndRotSensor() { ++ object objVoltage = cObj.DPByHssDP("OPERATING_VOLTAGE"); + + object ch = dom.GetObject(chnId); + +@@ -47,10 +48,28 @@ + WriteLine(""); + WriteLine(""); + ++ if (objVoltage) { ++ WriteLine(""); ++ WriteLine(""); ++ WriteLine(""); ++ WriteLine(""); ++ WriteLine(""); ++ WriteLine(""); ++ WriteLine("
"); ++ WriteLine("
"); ++ WriteLine(""); ++ WriteLine("
"); ++ WriteLine("
Extra-Status
"); ++ WriteLine(""); ++ ++ WriteLine("
Betriebsspannung in V:"#objVoltage.Value().ToString(1)#"V
"); ++ } else { ++ WriteLine(""); ++ } ++ + object objState = cObj.DPByControl("RHS.STATE"); +- WriteLine(""); + WriteLine(""); + return; + } +\ No newline at end of file diff --git a/src/addon/patch/le_343/programs.htm.patch b/src/addon/patch/le_343/programs.htm.patch deleted file mode 100644 index ca1f19a7..00000000 --- a/src/addon/patch/le_343/programs.htm.patch +++ /dev/null @@ -1,78 +0,0 @@ ---- ./patchsource/www/rega/pages/tabs/admin/views/programs.htm.orig -+++ ./patchsource/www/rega/pages/tabs/admin/views/programs.htm -@@ -95,6 +95,43 @@ - }; - }; - -+ // HB-RC-6-PBU-LED -+ ChangeHBRC6LEDValue = function(sdid) -+ { -+ iseSingleDestination.reload = false; -+ dlgResult = ""; -+ CreatePopup(ID_SET_HBRC6LED_MODE, "X:"+sdid); -+ PopupClose = function() -+ { -+ dlgPopup.hide(); -+ ReloadSingleDestination(sdid); -+ }; -+ }; -+ // HB-OU-RGBW-LED-FX -+ ChangeHBOURGBWLEDFXValue = function(sdid) -+ { -+ iseSingleDestination.reload = false; -+ dlgResult = ""; -+ CreatePopup(ID_SET_HBOURGBWLEDFX_MODE, "X:"+sdid); -+ PopupClose = function() -+ { -+ dlgPopup.hide(); -+ ReloadSingleDestination(sdid); -+ }; -+ }; -+ // MP3 HB Funkgong -+ ChangeHBOUCFMValue = function(sdid) -+ { -+ iseSingleDestination.reload = false; -+ dlgResult = ""; -+ CreatePopup(ID_SET_HBOUCFM_MODE, "X:"+sdid); -+ PopupClose = function() -+ { -+ dlgPopup.hide(); -+ ReloadSingleDestination(sdid); -+ }; -+ }; -+ - // Heating thermostate - SetPartyMode = function(elm) { - var url = "/pages/msg/setPartyMode.htm"; -@@ -141,7 +178,10 @@ - }; - - SetStatusDisplay = function(regaDialogID, mode) { -- var elm = (mode == "DIS") ? jQuery("#setStatusDisplay" + regaDialogID) : jQuery("#setStatusDisplayEPaper" + regaDialogID) ; -+ var elm; -+ if (mode == "DIS") elm = jQuery("#setStatusDisplay" + regaDialogID); -+ if (mode == "DIS-EP") elm = jQuery("#setStatusDisplayEPaper" + regaDialogID) ; -+ if (mode == "DIS-EP42BW") elm = jQuery("#setHbStatusDisplayEPaper" + regaDialogID) ; - - jQuery(elm).prop("disabled", true); - -@@ -179,6 +219,19 @@ - inputElm.change(); - } - }, "html"); -+ } else if (mode == "DIS-EP42BW") { -+ statusDisplayDialog = new HbStatusDisplayDialogEPaper(translateKey("statusDisplayDialogTitle"), htmlContent, jQuery(inputElm).val(), function (result) { -+ jQuery(elm).prop("disabled", false); -+ if (result == 1) { -+ conInfo("SetStatusDisplay: Yes pressed"); -+ var inputElm = jQuery(elm).prev(); -+ var cfgString = this.getConfigString(); -+ conInfo(cfgString); -+ inputElm.val(cfgString); //.change(); -+ encodeStringStatusDisplay(inputElm.prop("id"),false, '0x7e'); -+ inputElm.change(); -+ } -+ }, "html"); - } - - diff --git a/src/addon/patch/le_343/side.inc.patch b/src/addon/patch/le_343/side.inc.patch deleted file mode 100644 index ccedec82..00000000 --- a/src/addon/patch/le_343/side.inc.patch +++ /dev/null @@ -1,112 +0,0 @@ ---- ./patchsource/www/rega/esp/side.inc.orig -+++ ./patchsource/www/rega/esp/side.inc -@@ -12,9 +12,16 @@ - string hm_oucfm = "HM-OU-CFM-Pl"; - string hm_oucfmTW = "HM-OU-CFM-TW"; - string hm_oucmpcb = "HM-OU-CM-PCB"; -+ string hb_oump3led = "HB-OU-MP3-LED"; -+ string hb_rc6led = "HB-RC-6-PBU-LED"; -+ string hb_fxled = "HB-OU-RGBW-LED-FX"; - string hm_partyDialog = "HM-CC-RT-DN HM-TC-IT-WM-W-EU HM-CC-VG-1"; - string hm_statusDisplay = "HM-Dis-WM55"; - string hm_statusDisplayEPaper = "HM-Dis-EP-WM55"; -+ string hb_statusDisplayEPaper = "HB-DIS-EP-42BW"; -+ string hb_statusDisplayEPaperMains = "HB-DIS-EP-42BW-MAINS"; -+ string hb_statusDisplayEPaper75 = "HB-DIS-EP-75BW"; -+ string hb_statusDisplayEPaper75Mains = "HB-DIS-EP-75BW-MAINS"; - string hm_rgbw_controller = "HM-LC-RGBW-WM"; - string hm_jalousieActor = "HM-LC-Ja1PBU"; - string heatingClimateControlTransceiver = "HEATING_CLIMATECONTROL_TRANSCEIVER"; -@@ -451,9 +458,16 @@ - integer oucfm = chLabel.Find(hm_oucfm); - integer oucfmTW = chLabel.Find(hm_oucfmTW); - integer oucmpcb = chLabel.Find(hm_oucmpcb); -+ integer oump3led = chLabel.Find(hb_oump3led); -+ integer rc6led = chLabel.Find(hb_rc6led); -+ integer fxled = chLabel.Find(hb_fxled); - integer partyDialogDevice = hm_partyDialog.Find(chLabel); - integer statusDisplayDevice = hm_statusDisplay.Find(chLabel); - integer statusDisplayEPaperDevice = hm_statusDisplayEPaper.Find(chLabel); -+ integer statusHbDisplayEPaperDevice = hb_statusDisplayEPaper.Find(chLabel); -+ integer statusHbDisplayEPaperDeviceMains = hb_statusDisplayEPaperMains.Find(chLabel); -+ integer statusHbDisplayEPaperDevice75 = hb_statusDisplayEPaper75.Find(chLabel); -+ integer statusHbDisplayEPaperDevice75Mains = hb_statusDisplayEPaper75Mains.Find(chLabel); - integer rgbw_controller = chLabel.Find(hm_rgbw_controller); - integer i_vir_lg_rgb_dim = chLabel.Find(s_vir_lg_rgb_dim); - integer i_vir_lg_rgbw_dim = chLabel.Find(s_vir_lg_rgbw_dim); -@@ -462,6 +476,10 @@ - - if ((statusDisplayDevice != -1) - || (statusDisplayEPaperDevice != -1) -+ || (statusHbDisplayEPaperDevice != -1) -+ || (statusHbDisplayEPaperDeviceMains != -1) -+ || (statusHbDisplayEPaperDevice75 != -1) -+ || (statusHbDisplayEPaperDevice75Mains != -1) - || (rgbw_controller != -1) - || ((jalousieActor != - 1) && (oDP.HSSID().Find("LEVEL_COMBINED") != -1)) - || (((i_vir_lg_rgb_dim != - 1) && (oDP.HSSID().Find("RGB") != -1)) || ((i_vir_lg_rgbw_dim != - 1) && (oDP.HSSID().Find("RGBW") != -1)) || (( i_vir_lg_group != - 1) && (oDP.HSSID().Find("RGBW") != -1))) -@@ -482,6 +500,21 @@ - Write( ' ' ); - } - -+ if ((statusHbDisplayEPaperDevice != -1) || (statusHbDisplayEPaperDeviceMains != -1)) { -+ if(iV == "1") { -+ ! This is the default string for 'all values not used' -+ iV = "0x02,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x03"; -+ } -+ Write( ' ' ); -+ } -+ -+ if ((statusHbDisplayEPaperDevice75 != -1) || (statusHbDisplayEPaperDevice75Mains != -1)) { -+ if(iV == "1") { -+ ! This is the default string for 'all values not used' -+ iV = "0x02,0x03"; -+ } -+ Write( ' ' ); -+ } - if (rgbw_controller != -1) { - - if (iV == "0") { -@@ -529,9 +562,16 @@ - && (oucfm == -1) - && (oucfmTW == -1) - && (oucmpcb == -1) -+ && (oump3led == -1) -+ && (rc6led == -1) -+ && (fxled == -1) - && (partyDialogDevice == -1) - && (statusDisplayDevice == -1) - && (statusDisplayEPaperDevice == -1) -+ && (statusHbDisplayEPaperDevice == -1) -+ && (statusHbDisplayEPaperDeviceMains == -1) -+ && (statusHbDisplayEPaperDevice75 == -1) -+ && (statusHbDisplayEPaperDevice75Mains == -1) - && (rgbw_controller == -1) - && (jalousieActor == -1) - && (i_vir_lg_rgb_dim == -1) -@@ -546,6 +586,15 @@ - if((oucfm != -1) || (oucfmTW != -1) || (oucmpcb != -1)) { - Write( '' ); - } -+ if(oump3led != -1) { -+ Write( '' ); -+ } -+ if(rc6led != -1) { -+ Write( '' ); -+ } -+ if(fxled != -1) { -+ Write( '' ); -+ } - if (partyDialogDevice != -1) { - Write( '' ); - } -@@ -555,6 +604,9 @@ - if (statusDisplayEPaperDevice != -1) { - Write( '' ); - } -+ if ((statusHbDisplayEPaperDevice != -1) || (statusHbDisplayEPaperDeviceMains != -1)) { -+ Write( '' ); -+ } - if (rgbw_controller != -1) { - Write( '' ); - } diff --git a/src/addon/patch/common/rhs.fn.patch b/src/addon/patch/le_363/rhs.fn.patch similarity index 100% rename from src/addon/patch/common/rhs.fn.patch rename to src/addon/patch/le_363/rhs.fn.patch diff --git a/src/rc.d/jp-hb-devices-addon b/src/rc.d/jp-hb-devices-addon index d68da9b2..3f0f6ba2 100755 --- a/src/rc.d/jp-hb-devices-addon +++ b/src/rc.d/jp-hb-devices-addon @@ -21,15 +21,22 @@ RL_FILE=/lib/udev/rules.d/99-hmip-rfusb.rules CK_FIRMWARE_FILE=${FIRMWARE_DIR}/hb-uni-sen-cap-moist.xml PATCHSUBDIR_COMMON=common -PATCHSUBDIR_VERSION=le_343 + check_ccu_fw_version() { model=`grep VERSION /boot/VERSION | awk -F'[=.]' {'print $2'}` version=`grep VERSION /boot/VERSION | awk -F'[=.]' {'print $3'}` build=`grep VERSION /boot/VERSION | awk -F'[=.]' {'print $4'}` - if [ $model -ge 2 ] && [ $version -ge 45 ]; then - PATCHSUBDIR_VERSION=ge_345 + if [ $model -ge 2 ] && [ $version -le 43 ]; then + echo "Unsupported firmware version $model.$version.$build found. (2.45 / 3.45 or higher needed!)" | tee -a $TMP_LOGFILE | tee -a $TMP_ERRFILE + exit 14 + fi + + if [ $model -ge 2 ] && [ $version -ge 65 ]; then + PATCHSUBDIR_VERSION=ge_365 + else + PATCHSUBDIR_VERSION=le_363 fi echo "Found firmware version $model.$version.$build - using patch subdirectory version ${PATCHSUBDIR_VERSION}" | tee -a $TMP_LOGFILE | tee -a $TMP_ERRFILE @@ -151,9 +158,16 @@ case "$1" in ### revoke patches from currently installed addon version if [ -f ${CK_FIRMWARE_FILE} ] && [ -d ${PATCH_DIR} ]; then - currentversion=`cat ${ADDON_DIR}/VERSION` - echo "Revoking current addon V $currentversion patch files." | tee $TMP_LOGFILE | tee $TMP_ERRFILE + currentversion_major=`cat /usr/local/addons/jp-hb-devices-addon/VERSION | awk -F'[=.]' {'print $1'}` + currentversion_minor=`cat /usr/local/addons/jp-hb-devices-addon/VERSION | awk -F'[=.]' {'print $2'}` + + if [ $currentversion_major -eq 5 ]; then + PATCHSUBDIR_VERSION=ge_345 + fi + + echo "Revoking current addon V $currentversion_major.$currentversion_minor patch files." | tee $TMP_LOGFILE | tee $TMP_ERRFILE patcher "REVOKE" + check_ccu_fw_version fi ### delete the old (current) addon directory and rename the newly uploaded diff --git a/test.sh b/test.sh index 27db6b25..8e8fc9eb 100755 --- a/test.sh +++ b/test.sh @@ -7,7 +7,7 @@ ADDON_FILE=~/Desktop/Homematic/jp-hb-devices-addon/jp-hb-devices-addon.tgz ADDON_DIR=${DIR_PREFIX}/addon PATCH_DIR=${ADDON_DIR}/addon/patch -PATCHSUBDIR_VERSION=le_343 +PATCHSUBDIR_VERSION=le_363 PATCHSUBDIR_COMMON=common check_ccu_fw_version() @@ -16,8 +16,8 @@ check_ccu_fw_version() version=`grep VERSION ${MOUNT_DIR}/boot/VERSION | awk -F'[=.]' {'print $3'}` build=`grep VERSION ${MOUNT_DIR}/boot/VERSION | awk -F'[=.]' {'print $4'}` - if [ $model -ge 2 ] && [ $version -ge 45 ]; then - PATCHSUBDIR_VERSION=ge_345 + if [ $model -ge 2 ] && [ $version -ge 65 ]; then + PATCHSUBDIR_VERSION=ge_365 fi echo "Found firmware version $model.$version.$build - using patch subdirectory version ${PATCHSUBDIR_VERSION}" | tee -a $TMP_LOGFILE @@ -111,4 +111,4 @@ do grep -i -E 'fail|err|fuzz' ${TMP_LOGFILE} echo "----" -done \ No newline at end of file +done