From 24ea23f6cecd3c06daed3e3c7d7ec76eb2acb428 Mon Sep 17 00:00:00 2001 From: Jens Maus Date: Thu, 15 Oct 2026 06:52:41 +0000 Subject: [PATCH] webui: show the internal device channels on request This applies OpenCCU rootfs patch 0133-WebUI-Fix-InternalIDExposure.patch: - The device view of "Status und Bedienung" gets a footer button that toggles the existing ShowInternalDeviceChannels action. While it is enabled, the MAINTENANCE channels of HmIP devices are shown, otherwise only those of the central units. This replaces the device-specific rules for HmIPW and some other devices. - The device channel view also lists the enabled internal channels while the button is enabled, and no longer hides channels that are not yet configured. - The function and room views, the alarm messages and the favorite editor also list the enabled internal channels. --- src/webui/rega/www/esp/functions.fn | 44 ++----------------- .../rega/www/pages/tabs/control/devices.htm | 33 ++++++++++++++ .../www/pages/tabs/control/hdevichannels.htm | 18 +++++++- .../www/pages/tabs/control/hfuncchannels.htm | 11 ++++- .../www/pages/tabs/control/hroomchannels.htm | 11 ++++- .../pages/tabs/statusviews/alarmMessages.htm | 14 +++++- src/webui/rega/www/pages/tabs/user/newFav.htm | 22 +++++++++- 7 files changed, 104 insertions(+), 49 deletions(-) diff --git a/src/webui/rega/www/esp/functions.fn b/src/webui/rega/www/esp/functions.fn index a81b8ad9..76888d9f 100644 --- a/src/webui/rega/www/esp/functions.fn +++ b/src/webui/rega/www/esp/functions.fn @@ -398,52 +398,14 @@ function ::showHideHmIPChannel() { if (bShowChannel == true) { ! Interface HmIP-RF and HmIP-Wired - if (chn.HssType().Find("MAINTENANCE") != -1) { + if ( (chn.HssType().Find("MAINTENANCE") != -1) && ((system.IsSessionVar("sessionSIDC") == false) || (system.GetSessionVar("sessionSIDC") != "1")) ) { ! Don't show the maintenance channel of the new HmIP devices ! This is necessary because the name of such a channel of an HmIP device ! can be MAINTENANCE_BAT_BL, MAINTENANCE_BAT_EL, MAINTENANCE_BAT_CL and so on ! For BidCos-RF this isn't necessary - integer devFwMajor = 0; - Call("/esp/functions.fn::getFirmwareVersion()"); - - if ((oDevHssType.Substr(0,6) == "HmIPW-") - || (oDevHssType == "HmIP-DRSI1") - || (oDevHssType == "HmIP-DRSI4") - || (oDevHssType == "HmIP-DRG-DALI") - || ((oDevHssType == "HmIP-BSL") && (devFwMajor >= 2)) - || (oDevHssType == "HmIP-WGD") - || (oDevHssType == "HmIP-WGD-PL") - || (oDevHssType == "HmIP-UDI-PB2") - || (oDevHssType == "HmIP-UDI-PB2-A") - || (oDevHssType == "HmIP-UDI-SMI55") - || (oDevHssType == "HmIP-UDI-SMI55-A") - || (oDevHssType == "HmIP-DRBLI4") - ) { - - object chnParam; - ! A HmIPW-* device with a control for the parameter IDENTIFY_TARGET_LEVEL (MAINTENANCE channel) - ! should be visible. So it's possible to use the identify function of HmIPW-devices. - chnParam = dom.GetObject("HmIP-RF."#chn.Address()#".IDENTIFY_TARGET_LEVEL"); - - ! A HmIPW-* device with a control for the parameter ERROR_POWER_SHORT_CIRCUIT_BUS_1 (MAINTENANCE channel) - ! should be visible. This is the DRAP. - if (!chnParam) { - chnParam = dom.GetObject("HmIP-RF."#chn.Address()#".ERROR_POWER_SHORT_CIRCUIT_BUS_1"); - } - - if (chnParam) { - string controlName = chnParam.MetaData("CONTROL"); - if (! controlName) { - bShowChannel = false; - } - } else { - bShowChannel = false; - } - } else { - if ((oDevHssType != "HmIP-CCU3") && (oDevHssType != "HmIP-HAP") && (oDevHssType != "HmIP-HAP-A") && (oDevHssType != "HmIP-HAP2") && (oDevHssType != "HmIP-HAP2-A") && (oDevHssType != "HmIP-HAP-B1") && (oDevHssType != "HmIP-HAP JS1") && (oDevHssType != "RPI-RF-MOD")) { - bShowChannel = false; - } + if ((oDevHssType != "HmIP-CCU3") && (oDevHssType != "HmIP-HAP") && (oDevHssType != "HmIP-HAP-A") && (oDevHssType != "HmIP-HAP2") && (oDevHssType != "HmIP-HAP2-A") && (oDevHssType != "HmIP-HAP-B1") && (oDevHssType != "HmIP-HAP JS1") && (oDevHssType != "RPI-RF-MOD")) { + bShowChannel = false; } ! Necessary to be able to learn the codes of keypads and finger print sensors diff --git a/src/webui/rega/www/pages/tabs/control/devices.htm b/src/webui/rega/www/pages/tabs/control/devices.htm index 75ddbe8f..fb09ce6d 100644 --- a/src/webui/rega/www/pages/tabs/control/devices.htm +++ b/src/webui/rega/www/pages/tabs/control/devices.htm @@ -222,6 +222,38 @@ "); } - foreach(sID, oUser.UserTempViewIDs().EnumIDs() ) + string sEnumUserIDs = oUser.UserTempViewIDs().EnumIDs(); + string sEnumUserInternalIDs = oUser.UserTempViewIDs().EnumEnabledInternalIDs(); + if( sEnumUserInternalIDs != "" ) { + if( sEnumUserIDs != "" ) { + sEnumUserIDs = sEnumUserIDs # "\t" # sEnumUserInternalIDs; + } else { + sEnumUserIDs = sEnumUserInternalIDs; + } + } + foreach(sID, sEnumUserIDs ) { !Vars für Filterung string sName = "";