From 7d9f29411d22871525a9f9f24979c4ec730e53ed Mon Sep 17 00:00:00 2001 From: Jens Maus Date: Sun, 13 Sep 2020 22:36:19 +0200 Subject: [PATCH 1/2] slightly reworked S11InitRFHardware to perform the /etc/config/ids and /etc/config/hmip_address.conf fallback management in a single unique place rather than within each dedicated branch of the rf module identification procedure. In addition, introduced new HM_HMRF_ADDRESS_ACTIVE and HM_HMIP_ADDRESS_ACTIVE variables where we put the currently used rf address rather than putting it into /var/ids which now again contains the rf module hard-encoded default rf address. This refs #900. --- .../overlay/base/etc/init.d/S11InitRFHardware | 115 +++++++----------- 1 file changed, 45 insertions(+), 70 deletions(-) diff --git a/buildroot-external/overlay/base/etc/init.d/S11InitRFHardware b/buildroot-external/overlay/base/etc/init.d/S11InitRFHardware index 4472641431..93752171f5 100755 --- a/buildroot-external/overlay/base/etc/init.d/S11InitRFHardware +++ b/buildroot-external/overlay/base/etc/init.d/S11InitRFHardware @@ -239,48 +239,24 @@ query_rf_parameters() { if [[ -n "${HMRF_ADDRESS}" ]] && ! echo ${HMRF_ADDRESS} | egrep -qi '0x000000|0x00ffff'; then HMRF_VERSION=$(/usr/bin/timeout 20 /bin/eq3configcmd update-coprocessor -p ${HM_HOST_GPIO_UART} -t HM-MOD-UART -c -v 2>&1 | grep "Version:" | cut -d' ' -f5 | tr -d '[:space:]') + ########################################### + # homematic (BidCos-RF/HmRF) info retrieval if [[ "${HM_HMRF_DEV}" == "HM-MOD-RPI-PCB" ]]; then HMRF_SERIAL=$(/usr/bin/timeout 20 /bin/eq3configcmd update-coprocessor -p ${HM_HOST_GPIO_UART} -t HM-MOD-UART -c -se 2>&1 | grep "SerialNumber:" | cut -d' ' -f5 | tr -d '[:space:]') HM_HMRF_SERIAL=${HMRF_SERIAL} HM_HMRF_VERSION=${HMRF_VERSION} - - # if the /etc/config/ids file exists we use the rf address that - # is saved in that file instead of the one within the rf module - # because rfd will anyway prefer/use the one from /etc/config/ids - if [[ -f /etc/config/ids ]]; then - HM_HMRF_ADDRESS=$(grep -i BidCoS-Address /etc/config/ids | tr -d '[:space:]' | cut -d= -f2) - else - HM_HMRF_ADDRESS= - fi - - # if HM_HMRF_ADDRESS is empty or 0 (0x000000) we use HMRF_ADDRESS as fallback - # and also remove /etc/config/ids because it might contain an invalid - # rf address - if [[ -z "${HM_HMRF_ADDRESS}" ]] || - [[ "${HM_HMRF_ADDRESS}" == "0" ]] || - [[ "${HM_HMRF_ADDRESS}" == "0x000000" ]]; then - HM_HMRF_ADDRESS=${HMRF_ADDRESS} - if [[ -e /etc/config/ids ]]; then - mv -f /etc/config/ids /etc/config/ids_old-$(date +'%Y%m%d-%H%M%S') - fi - fi + HM_HMRF_ADDRESS=${HMRF_ADDRESS} fi + ########################################### + # homematicIP (HmIP) info retrieval if [[ "${HM_HMIP_DEV}" == "HM-MOD-RPI-PCB" ]]; then HMIP_SGTIN=$(/usr/bin/timeout 20 /bin/eq3configcmd update-coprocessor -p ${HM_HOST_GPIO_UART} -t HM-MOD-UART -c -sg 2>&1 | sed -n 's/.*SGTIN: \([0-9A-Fa-f]\{24\}\).*/\1/p') HM_HMIP_SERIAL=$(echo -n ${HMIP_SGTIN} | tail -c 10) HM_HMIP_VERSION=${HMRF_VERSION} HM_HMIP_SGTIN=${HMIP_SGTIN} - - # we cannot use eq3configcmd to query for the copro hmip rf address - # of the HM-MOD-RPI-PCB, thus we extract it from the hmip_address.conf - # file which HMIPServer generates on first start. - if [[ -f /etc/config/hmip_address.conf ]]; then - HM_HMIP_ADDRESS="0x$(grep -i Adapter.1.Address /etc/config/hmip_address.conf | tr -d '[:space:]' | cut -d= -f2)" - else - HM_HMIP_ADDRESS=${HMRF_ADDRESS} - fi + HM_HMIP_ADDRESS=${HMRF_ADDRESS} fi else # if we haven't identified a HM-MOD-RPI-PCB we try to find @@ -336,15 +312,7 @@ query_rf_parameters() { HM_HMIP_SERIAL=$(echo -n ${HMIP_SGTIN} | tail -c 10) HM_HMIP_VERSION=${HMIP_VERSION} HM_HMIP_SGTIN=${HMIP_SGTIN} - - # if the /etc/config/hmip_address.conf file exists we use the rf address that - # is saved in that file instead of the one within the rf module - # because HMIPServer will anyway prefer/use the one from /etc/config/hmip_address.conf - if [[ -f /etc/config/hmip_address.conf ]]; then - HM_HMIP_ADDRESS="0x$(grep -i Adapter.1.Address /etc/config/hmip_address.conf | tr -d '[:space:]' | cut -d= -f2)" - else - HM_HMIP_ADDRESS=${HMIP_ADDRESS} - fi + HM_HMIP_ADDRESS=${HMIP_ADDRESS} else HM_HMIP_DEV= HM_HMIP_SERIAL= @@ -366,29 +334,12 @@ query_rf_parameters() { HMRF_ADDRESS=$(/usr/bin/timeout 20 /bin/eq3configcmd read-default-rf-address -f ${HM_HOST_GPIO_UART} -h 2>&1 | grep "^0x" | tr -d '[:space:]') fi - # if HMRF_ADDRESS is 0x000000 or 0x00ffff we have to check for a - # already retrieved BidCos RF-address from /etc/config/ids or - # otherwise generate a new random one in the range of 0xFF0000 - # till 0xFFFFFE because this should be a range that no BidCos device - # should have hardcoded. + # if HMRF_ADDRESS is 0x000000 or 0x00ffff we reset it to an empty + # variable so that later a valid bidcos rf address is either taken + # from /etc/config/ids or a new unique random one is generated within + # the private range between 0xFF0000-0xFFFFFE. if echo ${HMRF_ADDRESS} | egrep -qi '0x000000|0x00ffff'; then - if [[ -f /etc/config/ids ]]; then - HMRF_ADDRESS=$(grep -i BidCoS-Address /etc/config/ids | tr -d '[:space:]' | cut -d= -f2) - else - HMRF_ADDRESS= - fi - - # if HM_HMRF_ADDRESS is empty or 0 (0x000000) we use HMRF_ADDRESS as fallback - # and also remove /etc/config/ids because it might contain an invalid - # rf address - if [[ -z "${HMRF_ADDRESS}" ]] || - [[ "${HMRF_ADDRESS}" == "0" ]] || - [[ "${HMRF_ADDRESS}" == "0x000000" ]]; then - HMRF_ADDRESS= - if [[ -e /etc/config/ids ]]; then - mv -f /etc/config/ids /etc/config/ids_old-$(date +'%Y%m%d-%H%M%S') - fi - fi + HMRF_ADDRESS= fi # use eq3configcmd to query the BidCos-RF serial number + version @@ -433,15 +384,7 @@ query_rf_parameters() { HM_HMIP_SERIAL=$(echo -n ${HMIP_SGTIN} | tail -c 10) HM_HMIP_VERSION=${HMIP_VERSION} HM_HMIP_SGTIN=${HMIP_SGTIN} - - # if the /etc/config/hmip_address.conf file exists we use the rf address that - # is saved in that file instead of the one within the rf module - # because HMIPServer will anyway prefer/use the one from /etc/config/hmip_address.conf - if [[ -f /etc/config/hmip_address.conf ]]; then - HM_HMIP_ADDRESS="0x$(grep -i Adapter.1.Address /etc/config/hmip_address.conf | tr -d '[:space:]' | cut -d= -f2)" - else - HM_HMIP_ADDRESS=${HMIP_ADDRESS} - fi + HM_HMIP_ADDRESS=${HMIP_ADDRESS} else HM_HMIP_DEV= HM_HMIP_SERIAL= @@ -468,6 +411,38 @@ query_rf_parameters() { fi fi + ##################################### + # we check if there are already some active bidcos rf address + # or hmip address defined in /etc/config/ids and /etc/config/hmip_address.conf + # or if this is a fresh installation and we have to use the default rf addresses + # we queried above + + # get/set active bidcos rf address + if [[ -f /etc/config/ids ]]; then + HM_HMRF_ADDRESS_ACTIVE=$(grep -i BidCoS-Address /etc/config/ids 2>/dev/null | tr -d '[:space:]' | cut -d= -f2) + + # if HM_HMRF_ADDRESS_ACTIVE is empty or 0 (0x000000) we use HM_HMRF_ADDRESS as fallback + # and also remove /etc/config/ids because it might contain an invalid + # rf address + if [[ -z "${HM_HMRF_ADDRESS_ACTIVE}" ]] || + [[ "${HM_HMRF_ADDRESS_ACTIVE}" == "0" ]] || + [[ "${HM_HMRF_ADDRESS_ACTIVE}" == "0x000000" ]]; then + HM_HMRF_ADDRESS_ACTIVE=${HM_HMRF_ADDRESS} + if [[ -e /etc/config/ids ]]; then + mv -f /etc/config/ids /etc/config/ids_old-$(date +'%Y%m%d-%H%M%S') + fi + fi + else + HM_HMRF_ADDRESS_ACTIVE=${HM_HMRF_ADDRESS} + fi + + # get/set active hmip rf address + if [[ -f /etc/config/hmip_address.conf ]]; then + HM_HMIP_ADDRESS_ACTIVE="0x$(grep -i Adapter.1.Address /etc/config/hmip_address.conf 2>/dev/null | tr -d '[:space:]' | cut -d= -f2)" + else + HM_HMIP_ADDRESS_ACTIVE=${HMIP_ADDRESS} + fi + ##################################### # save all main info about the RF module From 010ac0eb1981dd4a0ae4b1b482b1c027408c079c Mon Sep 17 00:00:00 2001 From: Jens Maus Date: Mon, 14 Sep 2020 23:42:11 +0200 Subject: [PATCH 2/2] integrated a new WebUI fix patch to fix the accidently removed notepad image and possibility in then branches of WebUI programs. This fixes #908 (https://homematic-forum.de/forum/viewtopic.php?f=34&t=60936). --- .../occu/0079-WebUI-Fix-SideIncNotePad.patch | 12 + .../occu/WebUI/www/rega/esp/side.inc | 844 +++++++++++++++++ .../occu/WebUI/www/rega/esp/side.inc.orig | 845 ++++++++++++++++++ 3 files changed, 1701 insertions(+) create mode 100644 buildroot-external/patches/occu/0079-WebUI-Fix-SideIncNotePad.patch create mode 100755 buildroot-external/patches/occu/0079-WebUI-Fix-SideIncNotePad/occu/WebUI/www/rega/esp/side.inc create mode 100755 buildroot-external/patches/occu/0079-WebUI-Fix-SideIncNotePad/occu/WebUI/www/rega/esp/side.inc.orig diff --git a/buildroot-external/patches/occu/0079-WebUI-Fix-SideIncNotePad.patch b/buildroot-external/patches/occu/0079-WebUI-Fix-SideIncNotePad.patch new file mode 100644 index 0000000000..65e1feeabe --- /dev/null +++ b/buildroot-external/patches/occu/0079-WebUI-Fix-SideIncNotePad.patch @@ -0,0 +1,12 @@ +--- occu/WebUI/www/rega/esp/side.inc.orig ++++ occu/WebUI/www/rega/esp/side.inc +@@ -461,8 +461,7 @@ + } else { + Write( '' ); + Write( sUnit ); +- ! Write( '' ); +- Write( '' ); ++ Write( '' ); + + ! SPHM-365 - Help for the LEVEL_2 parameter of blind actors + if ((oCH.HssType().Find(blindVirtualReceiver) != -1) && (oDP.HSSID().Find("LEVEL_2") != -1)) { diff --git a/buildroot-external/patches/occu/0079-WebUI-Fix-SideIncNotePad/occu/WebUI/www/rega/esp/side.inc b/buildroot-external/patches/occu/0079-WebUI-Fix-SideIncNotePad/occu/WebUI/www/rega/esp/side.inc new file mode 100755 index 0000000000..ced7c3a42e --- /dev/null +++ b/buildroot-external/patches/occu/0079-WebUI-Fix-SideIncNotePad/occu/WebUI/www/rega/esp/side.inc @@ -0,0 +1,844 @@ +<% + + 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 hmip_mp3p = "HmIP-MP3P"; + string hmip_bsl = "HmIP-BSL"; + + string heatingClimateControlTransceiver = "HEATING_CLIMATECONTROL_TRANSCEIVER"; + + string acousticSignalVirtualReceiver = "ACOUSTIC_SIGNAL_VIRTUAL_RECEIVER"; + string blindVirtualReceiver = "BLIND_VIRTUAL_RECEIVER"; + string dimmerVirtualReceiver = "DIMMER_VIRTUAL_RECEIVER"; + string switchVirtualReceiver = "SWITCH_VIRTUAL_RECEIVER"; + string alarmSwitchVirtualReceiver = "ALARM_SWITCH_VIRTUAL_RECEIVER"; + + ! e. g. DIMMER_WEEK_PROFILE, SWITCH_WEEK_PROFILE + string hmIPWeekProfile = "_WEEK_PROFILE"; + + 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 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( '' ); + + ! SPHM-365 - Help for the LEVEL_2 parameter of blind actors + if ((oCH.HssType().Find(blindVirtualReceiver) != -1) && (oDP.HSSID().Find("LEVEL_2") != -1)) { + Write( "" ); + } + + if ((oCH.HssType().Find(alarmSwitchVirtualReceiver) != -1) && (oDP.HSSID().Find("DURATION_VALUE") != -1)) { + 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 i_acousticSignalVirtualReceiver = oCH.HssType().Find(acousticSignalVirtualReceiver); + integer i_dimmerVirtualReceiver = oCH.HssType().Find(dimmerVirtualReceiver); + integer i_switchVirtualReceiver = oCH.HssType().Find(switchVirtualReceiver); + integer i_blindVirtualReceiver = oCH.HssType().Find(blindVirtualReceiver); + integer i_hmip_mp3p = chLabel.Find(hmip_mp3p); + integer i_hmip_WeekProfile = oCH.HssType().Find(hmIPWeekProfile); + + 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)) + || (i_hmip_mp3p != -1) + || (i_blindVirtualReceiver != -1) + || (i_dimmerVirtualReceiver != -1) + || (i_switchVirtualReceiver != -1) + || (i_hmip_WeekProfile != -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( ' ' ); + } + + if (((i_hmip_mp3p != -1) && (i_acousticSignalVirtualReceiver != -1)) && (oDP.HSSID().Find("COMBINED_PARAMETER") != -1)) { + if (iV.Find("SL=") == -1) { + iV = "L=100,DU=2,DV=31,RTU=0,RTV=0,R=0,SL=0"; + } + Write( ' ' ); + } + + if ((i_hmip_WeekProfile != -1) && (oDP.HSSID().Find("COMBINED_PARAMETER") != -1)) { + object oUser = dom.GetObject( system.GetSessionVar('sessionUserID')); + boolean noExpertMode = false; + if (oUser) { + noExpertMode = oUser.UserEasyLinkMode(); + } + object oCH = dom.GetObject( iCH ); + if (iV.Find("WPTCL=") == -1) { + iV = " WPTCLS=0,WPTCL=2"; + } + Write( ' ' ); + + } + + + if ((i_dimmerVirtualReceiver != -1) && (oDP.HSSID().Find("COMBINED_PARAMETER") != -1)) { + if (iV.Find("L=") == -1) { + if ((oCH.Label().Find(hmip_mp3p) == -1) && (oCH.Label().Find(hmip_bsl) == -1)) { + iV = "L=100,OT=0, RT=0"; + } else { + iV = "L=100,DV=31,DU=2,RTV=0, RTU=1,C=7"; + } + } + Write( ' ' ); + } + + if ((i_switchVirtualReceiver != -1) && (oDP.HSSID().Find("COMBINED_PARAMETER") != -1)) { + if (iV.Find("S=") == -1) { + iV = "S=true"; + } + Write( ' ' ); + } + + if (((i_blindVirtualReceiver != -1)) && (oDP.HSSID().Find("COMBINED_PARAMETER") != -1)) { + if (iV.Find("L=") == -1) { + iV = "L=100,L2=100"; + } + 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) + && (i_acousticSignalVirtualReceiver == -1) + && (i_blindVirtualReceiver == -1) + && (i_dimmerVirtualReceiver == -1) + && (i_switchVirtualReceiver == -1) + && (i_hmip_WeekProfile == -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 ((i_acousticSignalVirtualReceiver != - 1) && (oDP.HSSID().Find("COMBINED_PARAMETER") != -1)) { + Write( '' ); + } + + if ((i_blindVirtualReceiver != - 1) && (oDP.HSSID().Find("COMBINED_PARAMETER") != -1)) { + Write( '' ); + Write(''); + } + + if ((i_dimmerVirtualReceiver != - 1) && (oDP.HSSID().Find("COMBINED_PARAMETER") != -1)) { + Write( '' ); + } + + if ((i_switchVirtualReceiver != - 1) && (oDP.HSSID().Find("COMBINED_PARAMETER") != -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/buildroot-external/patches/occu/0079-WebUI-Fix-SideIncNotePad/occu/WebUI/www/rega/esp/side.inc.orig b/buildroot-external/patches/occu/0079-WebUI-Fix-SideIncNotePad/occu/WebUI/www/rega/esp/side.inc.orig new file mode 100755 index 0000000000..148fceb874 --- /dev/null +++ b/buildroot-external/patches/occu/0079-WebUI-Fix-SideIncNotePad/occu/WebUI/www/rega/esp/side.inc.orig @@ -0,0 +1,845 @@ +<% + + 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 hmip_mp3p = "HmIP-MP3P"; + string hmip_bsl = "HmIP-BSL"; + + string heatingClimateControlTransceiver = "HEATING_CLIMATECONTROL_TRANSCEIVER"; + + string acousticSignalVirtualReceiver = "ACOUSTIC_SIGNAL_VIRTUAL_RECEIVER"; + string blindVirtualReceiver = "BLIND_VIRTUAL_RECEIVER"; + string dimmerVirtualReceiver = "DIMMER_VIRTUAL_RECEIVER"; + string switchVirtualReceiver = "SWITCH_VIRTUAL_RECEIVER"; + string alarmSwitchVirtualReceiver = "ALARM_SWITCH_VIRTUAL_RECEIVER"; + + ! e. g. DIMMER_WEEK_PROFILE, SWITCH_WEEK_PROFILE + string hmIPWeekProfile = "_WEEK_PROFILE"; + + 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 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( '' ); + Write( '' ); + + ! SPHM-365 - Help for the LEVEL_2 parameter of blind actors + if ((oCH.HssType().Find(blindVirtualReceiver) != -1) && (oDP.HSSID().Find("LEVEL_2") != -1)) { + Write( "" ); + } + + if ((oCH.HssType().Find(alarmSwitchVirtualReceiver) != -1) && (oDP.HSSID().Find("DURATION_VALUE") != -1)) { + 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 i_acousticSignalVirtualReceiver = oCH.HssType().Find(acousticSignalVirtualReceiver); + integer i_dimmerVirtualReceiver = oCH.HssType().Find(dimmerVirtualReceiver); + integer i_switchVirtualReceiver = oCH.HssType().Find(switchVirtualReceiver); + integer i_blindVirtualReceiver = oCH.HssType().Find(blindVirtualReceiver); + integer i_hmip_mp3p = chLabel.Find(hmip_mp3p); + integer i_hmip_WeekProfile = oCH.HssType().Find(hmIPWeekProfile); + + 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)) + || (i_hmip_mp3p != -1) + || (i_blindVirtualReceiver != -1) + || (i_dimmerVirtualReceiver != -1) + || (i_switchVirtualReceiver != -1) + || (i_hmip_WeekProfile != -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( ' ' ); + } + + if (((i_hmip_mp3p != -1) && (i_acousticSignalVirtualReceiver != -1)) && (oDP.HSSID().Find("COMBINED_PARAMETER") != -1)) { + if (iV.Find("SL=") == -1) { + iV = "L=100,DU=2,DV=31,RTU=0,RTV=0,R=0,SL=0"; + } + Write( ' ' ); + } + + if ((i_hmip_WeekProfile != -1) && (oDP.HSSID().Find("COMBINED_PARAMETER") != -1)) { + object oUser = dom.GetObject( system.GetSessionVar('sessionUserID')); + boolean noExpertMode = false; + if (oUser) { + noExpertMode = oUser.UserEasyLinkMode(); + } + object oCH = dom.GetObject( iCH ); + if (iV.Find("WPTCL=") == -1) { + iV = " WPTCLS=0,WPTCL=2"; + } + Write( ' ' ); + + } + + + if ((i_dimmerVirtualReceiver != -1) && (oDP.HSSID().Find("COMBINED_PARAMETER") != -1)) { + if (iV.Find("L=") == -1) { + if ((oCH.Label().Find(hmip_mp3p) == -1) && (oCH.Label().Find(hmip_bsl) == -1)) { + iV = "L=100,OT=0, RT=0"; + } else { + iV = "L=100,DV=31,DU=2,RTV=0, RTU=1,C=7"; + } + } + Write( ' ' ); + } + + if ((i_switchVirtualReceiver != -1) && (oDP.HSSID().Find("COMBINED_PARAMETER") != -1)) { + if (iV.Find("S=") == -1) { + iV = "S=true"; + } + Write( ' ' ); + } + + if (((i_blindVirtualReceiver != -1)) && (oDP.HSSID().Find("COMBINED_PARAMETER") != -1)) { + if (iV.Find("L=") == -1) { + iV = "L=100,L2=100"; + } + 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) + && (i_acousticSignalVirtualReceiver == -1) + && (i_blindVirtualReceiver == -1) + && (i_dimmerVirtualReceiver == -1) + && (i_switchVirtualReceiver == -1) + && (i_hmip_WeekProfile == -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 ((i_acousticSignalVirtualReceiver != - 1) && (oDP.HSSID().Find("COMBINED_PARAMETER") != -1)) { + Write( '' ); + } + + if ((i_blindVirtualReceiver != - 1) && (oDP.HSSID().Find("COMBINED_PARAMETER") != -1)) { + Write( '' ); + Write(''); + } + + if ((i_dimmerVirtualReceiver != - 1) && (oDP.HSSID().Find("COMBINED_PARAMETER") != -1)) { + Write( '' ); + } + + if ((i_switchVirtualReceiver != - 1) && (oDP.HSSID().Find("COMBINED_PARAMETER") != -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( ' ' ); + } + } + } + } +%>