diff --git a/buildroot-external/patches/occu/0189-WebUI-Fix-ControlHmIP-MOD-RC8.patch b/buildroot-external/patches/occu/0189-WebUI-Fix-ControlHmIP-MOD-RC8.patch deleted file mode 100644 index d2625466c8..0000000000 --- a/buildroot-external/patches/occu/0189-WebUI-Fix-ControlHmIP-MOD-RC8.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- occu/WebUI/www/rega/esp/datapointconfigurator.fn.orig -+++ occu/WebUI/www/rega/esp/datapointconfigurator.fn -@@ -591,7 +591,7 @@ - if (ch.MetaData("channelMode") == 3) { - Call("/esp/controls/door_window_contact.fn::CreateDoorWindowContact()"); - } else { -- Call("/esp/datapointconfigurator.fn::CreateNoFunction()"); -+ Call("/esp/controls/key_switch_sc.fn::CreateContent()"); - } - } - } diff --git a/buildroot-external/patches/occu/0189-WebUI-Fix-ControlHmIP-MOD-RC8/occu/WebUI/www/rega/esp/datapointconfigurator.fn b/buildroot-external/patches/occu/0189-WebUI-Fix-ControlHmIP-MOD-RC8/occu/WebUI/www/rega/esp/datapointconfigurator.fn deleted file mode 100755 index 3f36f4a8ed..0000000000 --- a/buildroot-external/patches/occu/0189-WebUI-Fix-ControlHmIP-MOD-RC8/occu/WebUI/www/rega/esp/datapointconfigurator.fn +++ /dev/null @@ -1,1821 +0,0 @@ -function ::dcCreateTable() -{ - object c2Obj = dom.GetObject( system.GetVar("cId") ); - string sName = c2Obj.Name(); - - WriteLine(''); - - if( iFavNamePosition == 1 ) - { - WriteLine(''); - WriteLine(''); - - WriteLine(''); - WriteLine(''); - WriteLine(''); - - WriteLine(''); - WriteLine(''); - WriteLine(''); - - WriteLine(''); - WriteLine(''); - WriteLine(''); - } - - if( iFavNamePosition == 0 ) - { - integer iLength = 9; - Call("/esp/datapointconfigurator.fn::StringCut()"); - - WriteLine(''); - WriteLine(''); - WriteLine(''); - WriteLine(''); - - } - WriteLine('
'); - WriteLine('
' # sName # '
'); - WriteLine('
'); - WriteLine('
'); - Call("/esp/datapointconfigurator.fn::dcCreate()"); - WriteLine('
'); - WriteLine('
'#sName#'
'); - Call("/esp/datapointconfigurator.fn::dcCreate()"); - WriteLine('
'); -} - -! dcCreate() -! [cId]: idnumber, [iStatusOnly]: Controls (un)bedienbar -function ::dcCreate() -{ - ! Control Button Dimensions - integer ictCH = 0; - integer chnId = system.GetVar("cId"); - boolean ctrlReqUpdate = false; - object cObj = dom.GetObject( system.GetVar("cId") ); - - if( cObj.IsTypeOf( OT_PROGRAM ) ) - { - ictCH = 0; - ctrlReqUpdate = true; - string progId = cObj.ID(); - string viewstatus = ""; - Call("/esp/system.fn::writeProgCtrl()"); - } - - if( cObj.IsTypeOf( OT_DP ) ) - { - ictCH = 0; - ctrlReqUpdate = true; - integer iVT = cObj.ValueType(); - integer iST = cObj.ValueSubType(); - boolean bLogic = ( (iVT==ivtBinary) && (iST==istBool) ); - boolean bList = ( (iVT==ivtInteger) && (iST==istEnum) ); - boolean bNumber = ( (iVT==ivtFloat) && (iST==istGeneric) ); - boolean bAlarm = ( (iVT==ivtBinary) && (iST==istAlarm) ); - boolean bString = ( (iVT==ivtString) && (iST==istChar8859)); - boolean bSysVar = ( bLogic || bList || bNumber || bAlarm || bString); - if( bSysVar ) - { - WriteLine( '' ); - WriteLine( '' ); - Call( "/esp/datapointconfigurator.fn::CreateSysVar()" ); - WriteLine( '' ); - WriteLine( '
' ); - } - } - - if( cObj.IsTypeOf( OT_CHANNEL ) ) - { - var CN_ACCELERATION_TRANSCEIVER = "ACCELERATION_TRANSCEIVER."; - var CN_ACCESSPOINT_GENERIC_RECEIVER = "ACCESSPOINT_GENERIC_RECEIVER."; - var CN_ACCESS_RECEIVER = "ACCESS_RECEIVER."; - var CN_ACCESS_TRANSCEIVER = "ACCESS_TRANSCEIVER."; - var CN_ACOUSTIC_DISPLAY_RECEIVER = "ACOUSTIC_DISPLAY_RECEIVER."; - var CN_ACOUSTIC_SIGNAL_TRANSMITTER = "ACOUSTIC_SIGNAL_TRANSMITTER."; - var CN_ACOUSTIC_SIGNAL_VIRTUAL_RECEIVER = "ACOUSTIC_SIGNAL_VIRTUAL_RECEIVER."; - var CN_ALARM_SWITCH_VIRTUAL_RECEIVER = "ALARM_SWITCH_VIRTUAL_RECEIVER."; - var CN_ANALOG_INPUT = "ANALOG_INPUT."; - var CN_ARMING = "ARMING."; - var CN_BLIND = "BLIND."; - var CN_BLIND_TRANSMITTER = "BLIND_TRANSMITTER."; - var CN_BLIND_VIRTUAL_RECEIVER = "BLIND_VIRTUAL_RECEIVER."; - var CN_BRIGHTNESS_TRANSMITTER = "BRIGHTNESS_TRANSMITTER."; - var CN_BTN_SHORT_ONLY = "BTN_SHORT_ONLY."; - var CN_BUTTON = "BUTTON."; - var CN_CAPACITIVE_FILLING_SENSOR = "CAPACITIVE_FILLING_LEVEL_SENSOR."; - var CN_CARBON_DIOXIDE_RECEIVER = "CARBON_DIOXIDE_RECEIVER."; - var CN_CLIMATE_CONTROL_FLOOR_PUMP_TRANSCEIVER = "CLIMATECONTROL_FLOOR_PUMP_TRANSCEIVER."; - var CN_CLIMATE_CONTROL_FLOOR_TRANSCEIVER = "CLIMATECONTROL_FLOOR_TRANSCEIVER."; - var CN_CLIMATE_TRANSCEIVER = "CLIMATE_TRANSCEIVER."; - var CN_COLORTEMP = "COLORTEMP."; - var CN_COND_SWITCH_TRANSMITTER_TEMPERATURE = "COND_SWITCH_TRANSMITTER_TEMPERATURE."; - var CN_DANGER = "_DANGER."; - var CN_DIGITAL_ANALOG_OUTPUT = "DIGITAL_ANALOG_OUTPUT."; - var CN_DIGITAL_STATE = "DIGITAL_STATE."; - var CN_DIMMER = "DIMMER."; - var CN_DIMMER_REAL = "DIMMER_REAL."; - var CN_DOOR_LOCK_STATE_TRANSCEIVER = "DOOR_LOCK_STATE_TRANSCEIVER."; - var CN_DOOR_LOCK_STATE_TRANSMITTER = "DOOR_LOCK_STATE_TRANSMITTER."; - var CN_DOOR_OPENER = "DOOROPENER."; - var CN_DOOR_RECEIVER = "DOOR_RECEIVER."; - var CN_DOOR_SENSOR = "DOOR_SENSOR."; - var CN_DUAL_WHITE_BRIGHTNESS = "DUAL_WHITE_BRIGHTNESS"; - var CN_DUAL_WHITE_COLOR = "DUAL_WHITE_COLOR"; - var CN_GENERIC_INPUT_TRANSMITTER = "GENERIC_INPUT_TRANSMITTER."; - var CN_GENERIC_MEASURING_TRANSMITTER = "GENERIC_MEASURING_TRANSMITTER."; - var CN_HEATING_CONTROL = "HEATING_CONTROL."; - var CN_HEATING_CONTROL_HMIP = "HEATING_CONTROL_HMIP."; - var CN_HMIP_BUTTON = "BUTTON_NO_FUNCTION."; - var CN_IDENTIFICATION = "IDENTIFICATION."; - var CN_JALOUSIE = "JALOUSIE."; - var CN_LOCK = "LOCK."; - var CN_MAINTENANCE = "MAINTENANCE."; - var CN_MOTIONDETECTOR = "MOTIONDETECTOR_TRANSCEIVER."; - var CN_NONE = "NONE"; - var CN_OPTICAL_SIGNAL_RECEIVER = "OPTICAL_SIGNAL_RECEIVER"; - var CN_PDDT = "PASSAGE_DETECTOR_DIRECTION_TRANSMITTER."; - var CN_POWERMETER = "POWERMETER."; - var CN_POWERMETER_IEC1 = "POWERMETER_IEC1."; - var CN_POWERMETER_IEC2 = "POWERMETER_IEC2."; - var CN_POWERMETER_IGL = "POWERMETER_IGL."; - var CN_POWERMETER_PSM = "POWERMETER_PSM."; - var CN_RC19_DISPLAY = "RC19_DISPLAY."; - var CN_RAIN_DETECTION_TRANSMITTER = "RAIN_DETECTION_TRANSMITTER."; - var CN_RGB_COLOR = "RGB_COLOR."; - var CN_RGBW_AUTOMATIC = "RGBW_AUTOMATIC."; - var CN_RGBW_COLOR = "RGBW_COLOR."; - var CN_RHS = "RHS."; - var CN_SERVO_TRANSMITTER = "SERVO_TRANSMITTER."; - var CN_SERVO_VIRTUAL_RECEIVER = "SERVO_VIRTUAL_RECEIVER."; - var CN_SHUTTER_TRANSMITTER = "SHUTTER_TRANSMITTER."; - var CN_SHUTTER_VIRTUAL_RECEIVER = "SHUTTER_VIRTUAL_RECEIVER."; - var CN_SIMPLE_SWITCH_RECEIVER = "SIMPLE_SWITCH_RECEIVER."; - var CN_SMOKE_DETECTOR = "SMOKE_DETECTOR."; - var CN_SWITCH = "SWITCH."; - var CN_SWITCH_TRANSM = "SWITCH_TRANSMITTER."; - var CN_TEMP_HUMIDITY_PARTICULATE_MATTER_TRANSMITTER = "TEMP_HUM_PARTICLE_MATTER_TRANSMITTER."; - var CN_THERMO = "TEMP."; - var CN_UNIVERSAL_LIGHT_RECEIVER = "UNIVERSAL_LIGHT_RECEIVER."; - var CN_WATER_DETECTION_TRANSMITTER = "WATER_DETECTION_TRANSMITTER."; - var CN_WEATHER_TRANSMIT = "WEATHER_TRANSMIT."; - var CN_WEEKLY_PROFILE = "WEEK_PROFILE."; - var CN_WIN_SC = "WIN_SC."; - var CN_WIN_SC_SECURE = "WIN_SC_SECURE."; - var CN_WIN_SC_SENSOR = "WIN_SC_SENSOR."; - var CN_WINDOW = "WINDOW."; - var CN_WINDOW_DRIVE_RECEIVER = "WINDOW_DRIVE_RECEIVER."; - - var CN_EVENT_INTERFACE = "EVENT_INTERFACE."; - var CN_NOT_ACTIVE = "CHANNEL_NOT_ACTIVE"; - - var isInvisible = false; - var isKnownControl = false; - - ctrlReqUpdate = true; - boolean bUnknown = true; - string sLastControlName = ""; - string sControlName = ""; - boolean bSV = false; - boolean bIsControl = false; - - integer devFwMajor = 0; - integer devFwMinor = 0; - integer devFwPatch = 0; - Call("/esp/functions.fn::getFirmwareVersion()"); - - ictCH = cObj.ChannelType(); - WriteLine(""); - WriteLine(""); - - string sE; - string oEName; - string style = "-"; - - foreach( sE, cObj.DPs().EnumEnabledVisibleIDs() ) - { - object oE = dom.GetObject( sE ); - if( oE ) - { - - ! WriteLine( "" ); - - sControlName = oE.MetaData("CONTROL"); - if( sControlName ) - { - object oDevice = dom.GetObject(cObj.Device()); - object ch = dom.GetObject(chnId); - ! WriteLine( "" ); - - !#ACCELERATION_TRANSCEIVER - bIsControl = ( sControlName.Find(CN_ACCELERATION_TRANSCEIVER) > -1 ); - if( bIsControl && (sLastControlName != CN_ACCELERATION_TRANSCEIVER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_ACCELERATION_TRANSCEIVER; - if (ch.Label() == "ELV-SH-TACO") { - Call("/esp/controls/acceleration_transceiver.fn::CreateAccelerationTransceiverTaco()"); - } else { - Call("/esp/controls/acceleration_transceiver.fn::CreateAccelerationTransceiver()"); - } - } - - !#ACCESSPOINT_GENERIC_RECEIVER - bIsControl = ( sControlName.Find(CN_ACCESSPOINT_GENERIC_RECEIVER) > -1 ); - if( bIsControl && (sLastControlName != CN_ACCESSPOINT_GENERIC_RECEIVER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_ACCESSPOINT_GENERIC_RECEIVER; - Call("/esp/controls/accesspoint_generic_receiver.fn::CreateAccessPointGenericReceiver()"); - } - !#ACCESS_RECEIVER - bIsControl = ( sControlName.Find(CN_ACCESS_RECEIVER) > -1 ); - if( bIsControl && (sLastControlName != CN_ACCESS_RECEIVER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_ACCESS_RECEIVER; - Call("/esp/controls/accessreceiver.fn::CreateAccessReceiver()"); - } - - !#ACCESS_TRANSCEIVER - bIsControl = ( sControlName.Find(CN_ACCESS_TRANSCEIVER) > -1 ); - if( bIsControl && (sLastControlName != CN_ACCESS_TRANSCEIVER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_ACCESS_TRANSCEIVER; - Call("/esp/controls/accessreceiver.fn::CreateAccessTransceiver()"); - } - - !#ACOUSTIC_DISPLAY_RECEIVER - bIsControl = ( sControlName.Find(CN_ACOUSTIC_DISPLAY_RECEIVER) > -1 ); - if( bIsControl && (sLastControlName != CN_ACOUSTIC_DISPLAY_RECEIVER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_ACOUSTIC_DISPLAY_RECEIVER; - Call("/esp/controls/acoustic_display_receiver.fn::CreateAcousticDisplayReceiver()"); - } - - !# CN_ACOUSTIC_SIGNAL_TRANSMITTER - bIsControl = ( sControlName.Find(CN_ACOUSTIC_SIGNAL_TRANSMITTER) > -1 ); - if( bIsControl && (sLastControlName != CN_ACOUSTIC_SIGNAL_TRANSMITTER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_ACOUSTIC_SIGNAL_TRANSMITTER; - Call("/esp/controls/acoustic_signal.fn::CreateAcousticSignalRealInfoControl()"); - } - - !# CN_ACOUSTIC_SIGNAL_VIRTUAL_RECEIVER - bIsControl = ( sControlName.Find(CN_ACOUSTIC_SIGNAL_VIRTUAL_RECEIVER) > -1 ); - if( bIsControl && (sLastControlName != CN_ACOUSTIC_SIGNAL_VIRTUAL_RECEIVER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_ACOUSTIC_SIGNAL_VIRTUAL_RECEIVER; - Call("/esp/controls/acoustic_signal.fn::CreateAcousticSignalVirtualReceiver()"); - } - - !# CN_ALARM_SWITCH_VIRTUAL_RECEIVER - HmIP - bIsControl = ( sControlName.Find(CN_ALARM_SWITCH_VIRTUAL_RECEIVER) > -1 ); - if( bIsControl && (sLastControlName != CN_ALARM_SWITCH_VIRTUAL_RECEIVER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_ALARM_SWITCH_VIRTUAL_RECEIVER; - Call("/esp/controls/alarmsirene.fn::CreateAlarmSwitchVirtualReceiver()"); - } - - !#ANALOG_INPUT - bIsControl = ( sControlName.Find(CN_ANALOG_INPUT) > -1 ); - if( bIsControl && (sLastControlName != CN_ANALOG_INPUT) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_ANALOG_INPUT; - Call("/esp/controls/analog_input.fn::CreateAnalogInputVoltage()"); - } - - !# CN_ARMING - bIsControl = ( sControlName.Find(CN_ARMING) > -1 ); - if( bIsControl && (sLastControlName != CN_ARMING) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_ARMING; - Call("/esp/controls/alarmsirene.fn::CreateAlarmArmingControl()"); - } - - !# BLIND - bIsControl = ( sControlName.Find(CN_BLIND) > -1 ); - if( bIsControl && (sLastControlName!=CN_BLIND) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_BLIND; - Call("/esp/controls/blind.fn::CreateShutterActuator()"); - } - - !# CN_BLIND_TRANSMITTER - bIsControl = ( sControlName.Find(CN_BLIND_TRANSMITTER) > -1 ); - if( bIsControl && (sLastControlName!=CN_BLIND_TRANSMITTER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_BLIND_TRANSMITTER; - if ((ch.Label().Substr(0,6) != "HmIPW-") && (ch.Label() != "HmIP-DRBLI4") && (ch.Label() != "HmIP-BBL") && (ch.Label() != "HmIP-BBL-2") && (ch.Label() != "HmIP-FBL") && (ch.Label() != "HmIP-BBL-I")) { - Call("/esp/controls/blind.fn::CreateBlindTransmitter()"); - } else { - object mode = dom.GetObject(ch.Address()); - if (mode.MetaData("channelMode") == "shutter") { - Call("/esp/controls/blind.fn::CreateShutterTransmitter()"); - } else { - Call("/esp/controls/blind.fn::CreateBlindTransmitter()"); - } - } - } - - !# CN_BLIND_VIRTUAL_RECEIVER - bIsControl = ( sControlName.Find(CN_BLIND_VIRTUAL_RECEIVER) > -1 ); - if( bIsControl && (sLastControlName!=CN_BLIND_VIRTUAL_RECEIVER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_BLIND_VIRTUAL_RECEIVER; - if ((ch.Label().Substr(0,6) != "HmIPW-") && (ch.Label() != "HmIP-DRBLI4") && (ch.Label() != "HmIP-BBL") && (ch.Label() != "HmIP-BBL-2") && (ch.Label() != "HmIP-FBL") && (ch.Label() != "HmIP-BBL-I")) { - Call("/esp/controls/blind.fn::CreateBlindVirtualReceiver()"); - } else { - object mode = dom.GetObject(ch.Address()); - if (mode.MetaData("channelMode") == "shutter") { - Call("/esp/controls/blind.fn::CreateShutterVirtualReceiver()"); - } else { - Call("/esp/controls/blind.fn::CreateBlindVirtualReceiver()"); - } - } - } - - !# CN_BRIGHTNESS_TRANSMITTER - HmIP - bIsControl = ( sControlName.Find(CN_BRIGHTNESS_TRANSMITTER) > -1 ); - if( bIsControl && (sLastControlName != CN_BRIGHTNESS_TRANSMITTER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_BRIGHTNESS_TRANSMITTER; - Call("/esp/controls/brightness_transmitter.fn::CreateBrightnessTransmitter()"); - } - - !# BTN - bIsControl = ( sControlName.Find(CN_BTN_SHORT_ONLY) > -1 ); - if( bIsControl && (sLastControlName!=CN_BTN_SHORT_ONLY) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_BTN_SHORT_ONLY; - Call("/esp/controls/button.fn::CreateKeyShortOnly()"); - } - - !# BUTTON - bIsControl = ( sControlName.Find(CN_BUTTON) > -1 ); - if( bIsControl && (sLastControlName!=CN_BUTTON) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_BUTTON; - Call("/esp/controls/button.fn::CreateKey()"); - } - - !# CAPACITIVE FILLING LEVEL SENSOR - bIsControl = ( sControlName.Find(CN_CAPACITIVE_FILLING_SENSOR) > -1 ); - if( bIsControl && (sLastControlName!=CN_CAPACITIVE_FILLING_SENSOR) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_CAPACITIVE_FILLING_SENSOR; - Call("/esp/controls/capacitive_filling_level_sensor.fn::CreateCapacitiveFillingSensor()"); - } - - !# CN_CARBON_DIOXIDE_RECEIVER - if (ch.Label() != "HmIPW-SCTHD") { - bIsControl = ( sControlName.Find(CN_CARBON_DIOXIDE_RECEIVER) > -1 ); - if( bIsControl && (sLastControlName!=CN_CARBON_DIOXIDE_RECEIVER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_CARBON_DIOXIDE_RECEIVER; - Call("/esp/controls/weather_sensor.fn::CreateCarbonDioxideReceiver()"); - } - } - - !# CHANNEL_NOT_ACTIVE - bIsControl = ( sControlName.Find(CN_NOT_ACTIVE) > -1 ); - if( bIsControl && (sLastControlName!=CN_NOT_ACTIVE) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_NOT_ACTIVE; - Call("/esp/datapointconfigurator.fn::CreateChannelNotActive()"); - } - - !# CLIMATE_TRANSCEIVER - bIsControl = ( sControlName.Find(CN_CLIMATE_TRANSCEIVER) > -1 ); - if( bIsControl && (sLastControlName != CN_CLIMATE_TRANSCEIVER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_CLIMATE_TRANSCEIVER; - Call("/esp/controls/climate_transceiver.fn::CreateClimateTransceiver()"); - } - - !# CN_CLIMATE_CONTROL_FLOOR_PUMP_TRANSCEIVER - HmIP - bIsControl = ( sControlName.Find(CN_CLIMATE_CONTROL_FLOOR_PUMP_TRANSCEIVER) > -1 ); - if( bIsControl && (sLastControlName != CN_CLIMATE_CONTROL_FLOOR_PUMP_TRANSCEIVER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_CLIMATE_CONTROL_FLOOR_PUMP_TRANSCEIVER; - Call("/esp/controls/climatecontrol_floor_transceiver.fn::CreateClimateControlFloorPumpTransceiver()"); - } - - !# CN_CLIMATE_CONTROL_FLOOR_TRANSCEIVER - HmIP - bIsControl = ( sControlName.Find(CN_CLIMATE_CONTROL_FLOOR_TRANSCEIVER) > -1 ); - if( bIsControl && (sLastControlName != CN_CLIMATE_CONTROL_FLOOR_TRANSCEIVER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_CLIMATE_CONTROL_FLOOR_TRANSCEIVER; - Call("/esp/controls/climatecontrol_floor_transceiver.fn::CreateClimateControlFloorTransceiver()"); - } - - !# CN_COLORTEMP - bIsControl = ( sControlName.Find(CN_COLORTEMP) > -1 ); - if( bIsControl && (sLastControlName != CN_COLORTEMP) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_COLORTEMP; - if (ch.Label().Substr(0,7) == "VIR-LG-") { - Call("/esp/controls/rgbw.fn::CreateVIR-LGWhiteLevelControl()"); - } - } - - !# CN_COND_SWITCH_TRANSMITTER_TEMPERATURE - HmIP - bIsControl = ( sControlName.Find(CN_COND_SWITCH_TRANSMITTER_TEMPERATURE) > -1 ); - if( bIsControl && (sLastControlName != CN_COND_SWITCH_TRANSMITTER_TEMPERATURE) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_COND_SWITCH_TRANSMITTER_TEMPERATURE; - Call("/esp/controls/cond_switch_transmitter_temp.fn::CreateCondSwitchTransmitterTemperature()"); - } - - !# DANGER - ! bIsControl = ( sControlName.Find(CN_DANGER) > -1 ); - ! if( bIsControl && (sLastControlName!=CN_DANGER) && (ch.Label() != "HmIP-SWSD-2")) - ! { - ! WriteLine( "" ); - ! isKnownControl = true; - ! sLastControlName = CN_DANGER; - ! Call("/esp/controls/danger.fn::CreateDangerSensor()"); - ! } - - !# FREQUENCY - bIsControl = ( sControlName.Find(CN_DIGITAL_ANALOG_OUTPUT) > -1 ); - if( bIsControl && (sLastControlName!=CN_DIGITAL_ANALOG_OUTPUT) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_DIGITAL_ANALOG_OUTPUT; - Call("/esp/controls/frequency.fn::CreateFrequency()"); - } - - bIsControl = ( sControlName.Find(CN_DIGITAL_STATE) > -1 ); - if( bIsControl && (sLastControlName!=CN_DIGITAL_STATE) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_DIGITAL_STATE; - Call("/esp/controls/digitalstate.fn::CreateDigitalState()"); - } - - !# DIMMER - bIsControl = ( sControlName.Find(CN_DIMMER) > -1 ); - if( bIsControl && (sLastControlName!=CN_DIMMER) ) - { - isKnownControl = true; - sLastControlName = CN_DIMMER; - if (ch.Label().Substr(0,12) != "VIR-LG-ONOFF") { - WriteLine( "" ); - if ((ch.Label() == "HmIP-BSL") && (devFwMajor >= 2)) { - Call("/esp/controls/dimmer.fn::CreateOpticalSignalReceiver()"); - } else { - Call("/esp/controls/dimmer.fn::CreateDimmingActuator()"); - } - } else { - ! This is because the device VIR_LG_ONOFF claims it is a DIMMER instead of a SWITCH - WriteLine( "" ); - sLastControlName = CN_SWITCH; - Call("/esp/controls/switch.fn::CreateVIR-LG-ONOFF_Actuator()"); - } - } - - !# CN_DIMMER_REAL - bIsControl = ( sControlName.Find(CN_DIMMER_REAL) > -1 ); - if( bIsControl && (sLastControlName != CN_DIMMER_REAL) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_DIMMER_REAL; - Call("/esp/controls/dimmer.fn::CreateDimmerRealInfoControl()"); - } - - !# DOOR_LOCK_STATE_TRANSCEIVER - bIsControl = ( sControlName.Find(CN_DOOR_LOCK_STATE_TRANSCEIVER) > -1 ); - if( bIsControl && (sLastControlName != CN_DOOR_LOCK_STATE_TRANSCEIVER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_DOOR_LOCK_STATE_TRANSCEIVER; - Call("/esp/controls/door_opener.fn::CreateDoorLockStateTranseiver()"); - } - - !# DOOR_LOCK_STATE_TRANSMITTER - bIsControl = ( sControlName.Find(CN_DOOR_LOCK_STATE_TRANSMITTER) > -1 ); - if( bIsControl && (sLastControlName != CN_DOOR_LOCK_STATE_TRANSMITTER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_DOOR_LOCK_STATE_TRANSMITTER; - Call("/esp/controls/door_opener.fn::CreateDoorLockStateTransmitter()"); - } - - !# DOOROPENER - bIsControl = ( sControlName.Find(CN_DOOR_OPENER) > -1 ); - if( bIsControl && (sLastControlName!=CN_DOOR_OPENER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_DOOR_OPENER; - Call("/esp/controls/door_opener.fn::CreateDoorOpener()"); - } - - !# DOOR_RECEIVER - bIsControl = ( sControlName.Find(CN_DOOR_RECEIVER) > -1 ); - if( bIsControl && (sLastControlName!=CN_DOOR_RECEIVER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_DOOR_RECEIVER; - Call("/esp/controls/door_opener.fn::CreateDoorReceiver()"); - } - - !# DOOR_WINDOW_CONTACT - bIsControl = ( sControlName.Find(CN_DOOR_SENSOR) > -1 ); - if( bIsControl && (sLastControlName!=CN_DOOR_SENSOR) ) - { - if (ch.HssType() != "MULTI_MODE_INPUT_TRANSMITTER") { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_DOOR_SENSOR; - Call("/esp/controls/door_window_contact.fn::CreateDoorWindowContact()"); - } else { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_DOOR_SENSOR; - if (ch) { - ! channelMode 1 and 2 are handled as HMIP_BUTTON - if (ch.MetaData("channelMode") == 3) { - Call("/esp/controls/door_window_contact.fn::CreateDoorWindowContact()"); - } else { - Call("/esp/controls/key_switch_sc.fn::CreateContent()"); - } - } - } - } - - !# CN_DUAL_WHITE_BRIGHTNESS - bIsControl = ( sControlName.Find(CN_DUAL_WHITE_BRIGHTNESS) > -1 ); - if( bIsControl && (sLastControlName!=CN_DUAL_WHITE_BRIGHTNESS) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_DUAL_WHITE_BRIGHTNESS; - Call("/esp/controls/dual_white_controller.fn::CreateDualWhiteBrightnessActuator()"); - } - - !# CN_DUAL_WHITE_COLOR - bIsControl = ( sControlName.Find(CN_DUAL_WHITE_COLOR) > -1 ); - if( bIsControl && (sLastControlName!=CN_DUAL_WHITE_COLOR) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_DUAL_WHITE_COLOR; - Call("/esp/controls/dual_white_controller.fn::CreateDualWhiteColorActuator()"); - } - - !# EVENT_INTERFACE - bIsControl = ( sControlName.Find(CN_EVENT_INTERFACE) > -1 ); - if( bIsControl && (sLastControlName!=CN_EVENT_INTERFACE) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_EVENT_INTERFACE; - Call("/esp/datapointconfigurator.fn::CreateEventInterface()"); - } - - !# CN_GENERIC_INPUT_TRANSMITTER - HmIP - bIsControl = ( sControlName.Find(CN_GENERIC_INPUT_TRANSMITTER) > -1 ); - if( bIsControl && (sLastControlName != CN_GENERIC_INPUT_TRANSMITTER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_GENERIC_INPUT_TRANSMITTER; - Call("/esp/controls/generic_input_transmitter.fn::CreateGenericInputTransmitter()"); - } - - !# CN_GENERIC_MEASURING_TRANSMITTER - HmIP - bIsControl = ( sControlName.Find(CN_GENERIC_MEASURING_TRANSMITTER) > -1 ); - if( bIsControl && (sLastControlName != CN_GENERIC_MEASURING_TRANSMITTER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_GENERIC_MEASURING_TRANSMITTER; - Call("/esp/controls/generic_input_transmitter.fn::CreateGenericMeasuringTransmitter()"); - } - - !# HEATING_CONTROL - bIsControl = ( sControlName.Find(CN_HEATING_CONTROL) > -1 ); - if( bIsControl && (sLastControlName != CN_HEATING_CONTROL) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_HEATING_CONTROL; - Call("/esp/controls/heating_control.fn::CreateHeatingControl()"); - } - - !# HEATING_CONTROL_HMIP - bIsControl = ( sControlName.Find(CN_HEATING_CONTROL_HMIP) > -1 ); - if( bIsControl && (sLastControlName != CN_HEATING_CONTROL_HMIP) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_HEATING_CONTROL_HMIP; - if (ch.Label() == "ALPHA-IP-RBGa") { - Call("/esp/controls/heating_control.fn::CreateHeatingControlHmIPa()"); - } else { - Call("/esp/controls/heating_control.fn::CreateHeatingControlHmIP()"); - } - } - - !# HMIP_BUTTON - bIsControl = ( sControlName.Find(CN_HMIP_BUTTON) > -1 ); - if( bIsControl && (sLastControlName!=CN_HMIP_BUTTON) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_HMIP_BUTTON; - if ((ch.HssType() != "MULTI_MODE_INPUT_TRANSMITTER") || (ch.Label() == "ELV-SH-BM-S")) { - if (ch.Label().Substr(5,7) != "MOD-RC8") { - if ((ch.Label() == "ELV-SH-BM-S")) { - WriteLine( "" ); - Call("/esp/controls/key_switch_sc.fn::CreateContentA()"); - } else { - Call("/esp/datapointconfigurator.fn::CreateNoFunction()"); - } - } else { - WriteLine( "" ); - Call("/esp/controls/key_switch_sc.fn::CreateContent()"); - } - } - } - - !# CN_IDENTIFICATION - HmIPW Identification - if (ch.Label() != "HmIPW-DRAP") { - bIsControl = ( sControlName.Find(CN_IDENTIFICATION) > -1 ); - if( bIsControl && (sLastControlName != CN_IDENTIFICATION) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_IDENTIFICATION; - Call("/esp/controls/hmipw_identification.fn::CreateIdentification()"); - } - } - - !# CN_JALOUSIE - bIsControl = ( sControlName.Find(CN_JALOUSIE) > -1 ); - if( bIsControl && (sLastControlName!=CN_JALOUSIE) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_JALOUSIE; - Call("/esp/controls/blind.fn::CreateJalousieActuator()"); - } - - !# LOCK - bIsControl = ( sControlName.Find(CN_LOCK) > -1 ); - if( bIsControl && (sLastControlName!=CN_LOCK) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_LOCK; - Call("/esp/controls/lock.fn::CreateKeyMatic()"); - } - - ! CN_MAINTENANCE - bIsControl = ( sControlName.Find(CN_MAINTENANCE) > -1 ); - if( bIsControl && (sLastControlName != CN_MAINTENANCE) ) - { - WriteLine( "" ); - if (ch.Label() == "HmIPW-DRAP") { - WriteLine( "" ); - sLastControlName = CN_MAINTENANCE; - isKnownControl = true; - Call("/esp/controls/drap.fn::CreateDrap()"); - } - - if ((ch.Label() == "HmIP-HAP") || (ch.Label() == "HmIP-HAP-A") || (ch.Label() == "HmIP-HAP-B1") || (ch.Label() == "HmIP-HAP JS1")) { - WriteLine( "" ); - sLastControlName = CN_MAINTENANCE; - isKnownControl = true; - Call("/esp/controls/hap.fn::CreateHAP()"); - } - - if ((ch.Label() == "RPI-RF-MOD") || (ch.Label() == "HmIP-CCU3") || (ch.Label() == "HmIP-RFUSB")) { - WriteLine( "" ); - sLastControlName = CN_MAINTENANCE; - isKnownControl = true; - Call("/esp/controls/coProcessor.fn::CreateCoPro()"); - } - - if (ch.Label() == "HmIP-FWI") { - WriteLine( "" ); - sLastControlName = CN_MAINTENANCE; - isKnownControl = true; - Call("/esp/controls/maintenanceFWI.fn::CreateMaintenance()"); - } - - if (ch.Label() == "HmIP-WKP") { - WriteLine( "" ); - sLastControlName = CN_MAINTENANCE; - isKnownControl = true; - Call("/esp/controls/maintenanceWKP.fn::CreateMaintenance()"); - } - - if (ch.Label() == "HmIP-SWSD-2") { - WriteLine( "" ); - sLastControlName = CN_MAINTENANCE; - isKnownControl = true; - Call("/esp/controls/maintenanceSmokeDetector.fn::CreateMaintenance()"); - } - } - - !# CN_MOTIONDETECTOR - bIsControl = ( sControlName.Find(CN_MOTIONDETECTOR) > -1 ); - if( bIsControl && (sLastControlName != CN_MOTIONDETECTOR) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_MOTIONDETECTOR; - Call("/esp/controls/motiondetector.fn::CreateMotionDetector()"); - } - - !# NONE - bIsControl = ( sControlName.Find(CN_NONE) > -1 ); - if( bIsControl && (sLastControlName != CN_NONE) ) - { - ! IGNORE NONE - } - - !# OPTICAL_SIGNAL_RECEIVER - bIsControl = ( sControlName.Find(CN_OPTICAL_SIGNAL_RECEIVER) > -1 ); - if( bIsControl && (sLastControlName != CN_OPTICAL_SIGNAL_RECEIVER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_OPTICAL_SIGNAL_RECEIVER; - Call("/esp/controls/opticalsignalreceiver.fn::CreateOpticalSignalReceiver()"); - } - - - !# CN_PDDT (PASSAGE_DETECTOR_DIRECTION_TRANSMITTER) - bIsControl = ( sControlName.Find(CN_PDDT) > -1 ); - if( bIsControl && (sLastControlName != CN_PDDT) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_PDDT; - Call("/esp/controls/passagedetector.fn::CreatePassageDetector()"); - } - - !# POWERMETER - bIsControl = ( sControlName.Find(CN_POWERMETER) > -1 ); - if( bIsControl && (sLastControlName != CN_POWERMETER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_POWERMETER; - Call("/esp/controls/powermeter.fn::CreatePowermeterControl()"); - } - - !# POWERMETER_IEC1 - bIsControl = ( sControlName.Find(CN_POWERMETER_IEC1) > -1 ); - if( bIsControl && (sLastControlName != CN_POWERMETER_IEC1) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_POWERMETER_IEC1; - Call("/esp/controls/powermeter.fn::CreatePowermeterIECControl()"); - } - - !# POWERMETER_IEC2 - bIsControl = ( sControlName.Find(CN_POWERMETER_IEC2) > -1 ); - if( bIsControl && (sLastControlName != CN_POWERMETER_IEC2) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_POWERMETER_IEC2; - Call("/esp/controls/powermeter.fn::CreatePowermeterIECControl()"); - } - - !# POWERMETER_IGL - bIsControl = ( sControlName.Find(CN_POWERMETER_IGL) > -1 ); - if( bIsControl && (sLastControlName != CN_POWERMETER_IGL) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_POWERMETER_IGL; - Call("/esp/controls/powermeter.fn::CreatePowermeterIGLControl()"); - } - - !# POWERMETER_PSM - bIsControl = ( sControlName.Find(CN_POWERMETER_PSM) > -1 ); - if( bIsControl && (sLastControlName != CN_POWERMETER_PSM) ) - { - WriteLine( "" ); - - string chnAddress = ch.Address(); - integer chnNumber = chnAddress.StrValueByIndex(":",1).ToInteger(); - string chn1Address = chnAddress.StrValueByIndex(":",0) # ":1"; - - isKnownControl = true; - sLastControlName = CN_POWERMETER_PSM; - - if (ch.Label() != "HmIP-ESI") { - Call("/esp/controls/powermeter.fn::CreatePowermeterPSMControl()"); - } else { - string esiSensor; - string sensorState = "SENSOR_UNKNOWN,SENSOR_ES_GAS,SENSOR_ES_LED,SENSOR_ES_IEC,SENSOR_ES_IEC_SML,SENSOR_ES_IEC_SML_WH,SENSOR_ES_IEC_D0_A,SENSOR_ES_IEC_D0_B,SENSOR_ES_IEC_D0_C,SENSOR_ES_IEC_D0_D"; - - object oDevice = dom.GetObject(cObj.Device()); - object oChnOne = dom.GetObject(oDevice.Channels().GetAt(1)); - object oChannelOpMode = oChnOne.DPByControl("POWERMETER_PSM.CHANNEL_OPERATION_MODE"); - - if (oChannelOpMode) { - integer sensorIndex = oChannelOpMode.Value().ToInteger(); - esiSensor = sensorState.StrValueByIndex(',',sensorIndex); - } else { - esiSensor = sensorState.StrValueByIndex(',',0); - } - - WriteLine( "" ); - - if (chnNumber == 1) { - Call("/esp/controls/powermeter.fn::CreatePowermeterESIControl_CurConsumption()"); - } else { - string _esiSensor = esiSensor; - - if ((esiSensor == "SENSOR_UNKNOWN") || (esiSensor == "SENSOR_ES_IEC")) { - string style = "style='margin-left:8px;'"; - Call("/esp/datapointconfigurator.fn::CreateNoFunction()"); - } else { - if (esiSensor.Substr(0,13) != "SENSOR_ES_IEC") { - if (chnNumber == 2) { - ! Create GAS or LED Control - Call("/esp/controls/powermeter.fn::CreatePowermeterESIControl_TotalConsumption()"); - } else { - ! Wenn kein IEC, Kanal 3 und 4 = noParam - string style = "style='margin-left:8px;'"; - Call("/esp/datapointconfigurator.fn::CreateNoFunction()"); - } - } else { - ! Create IEC Control - Call("/esp/controls/powermeter.fn::CreatePowermeterESIControl_ESI_IEC()"); - } - } - } - } - } - - !# RAIN_DETECTION_TRANSMITTER - HmIP - bIsControl = ( sControlName.Find(CN_RAIN_DETECTION_TRANSMITTER) > -1 ); - if( bIsControl && (sLastControlName != CN_RAIN_DETECTION_TRANSMITTER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_RAIN_DETECTION_TRANSMITTER; - Call("/esp/controls/raindetector_transmitter.fn::CreateRainDetectorTransmitter()"); - } - - !# RC19_DISPLAY - bIsControl = ( sControlName.Find(CN_RC19_DISPLAY) > -1 ); - if( bIsControl && (sLastControlName!=CN_RC19_DISPLAY) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_RC19_DISPLAY; - Call("/esp/controls/rc19_display.fn::CreateDisplay()"); - } - - !# CN_RGBW_AUTOMATIC - bIsControl = ( sControlName.Find(CN_RGBW_AUTOMATIC) > -1 ); - if( bIsControl && (sLastControlName != CN_RGBW_AUTOMATIC) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_RGBW_AUTOMATIC; - Call("/esp/controls/rgbw.fn::CreateRGBWAutomaticControl()"); - } - - !# CN_RGBW_COLOR - bIsControl = ( sControlName.Find(CN_RGBW_COLOR) > -1 ); - if( bIsControl && (sLastControlName != CN_RGBW_COLOR) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_RGBW_COLOR; - - if (ch.Label().Substr(0,7) == "VIR-LG-") { - string chLabel = ch.Label(); - if((chLabel.Find("RGBW") > -1) || (chLabel.Find("GROUP") > -1)) { - Call("/esp/controls/rgbw.fn::CreateVIR-LGRGBWColorControl()"); - } - } else { - Call("/esp/controls/rgbw.fn::CreateRGBWColorControl()"); - } - } - - !# CN_RGB_COLOR - bIsControl = ( sControlName.Find(CN_RGB_COLOR) > -1 ); - if( bIsControl && (sLastControlName != CN_RGB_COLOR) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_RGB_COLOR; - if (ch.Label().Substr(0,7) == "VIR-LG-") { - string chLabel = ch.Label(); - if(chLabel.Find("RGB") > -1) { - Call("/esp/controls/rgbw.fn::CreateVIR-LGRGBColorControl()"); - } - } - } - - !# RHS (Rotary Handle Sensor - Fensterdrehgriffkontakt) - bIsControl = ( sControlName.Find(CN_RHS) > -1 ); - if( bIsControl && (sLastControlName!=CN_RHS) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_RHS; - Call("/esp/controls/rhs.fn::CreateWndRotSensor()"); - } - - !# CN_SERVO_TRANSMITTER (e. g. WSC - Servo Steuerung) - bIsControl = ( sControlName.Find(CN_SERVO_TRANSMITTER) > -1 ); - if( bIsControl && (sLastControlName!=CN_SERVO_TRANSMITTER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_SERVO_TRANSMITTER; - Call("/esp/controls/servo.fn::CreateServoTransmitter()"); - } - - !# CN_SERVO_VIRTUAL_RECEIVER (e. g. WSC - Servo Steuerung) - bIsControl = ( sControlName.Find(CN_SERVO_VIRTUAL_RECEIVER) > -1 ); - if( bIsControl && (sLastControlName!=CN_SERVO_VIRTUAL_RECEIVER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_SERVO_VIRTUAL_RECEIVER; - Call("/esp/controls/servo.fn::CreateServoVirtualReceiver()"); - } - - !# CN_SHUTTER_TRANSMITTER - bIsControl = ( sControlName.Find(CN_SHUTTER_TRANSMITTER) > -1 ); - if( bIsControl && (sLastControlName!=CN_SHUTTER_TRANSMITTER) ) - { - object mode = dom.GetObject(ch.Address()); - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_SHUTTER_TRANSMITTER; - Call("/esp/controls/blind.fn::CreateShutterTransmitter()"); - } - - !# CN_SHUTTER_VIRTUAL_RECEIVER - bIsControl = ( sControlName.Find(CN_SHUTTER_VIRTUAL_RECEIVER) > -1 ); - if( bIsControl && (sLastControlName!=CN_SHUTTER_VIRTUAL_RECEIVER) ) - { - object mode = dom.GetObject(ch.Address()); - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_SHUTTER_VIRTUAL_RECEIVER; - Call("/esp/controls/blind.fn::CreateShutterVirtualReceiver()"); - } - - !# CN_SIMPLE_SWITCH_RECEIVER - bIsControl = ( sControlName.Find(CN_SIMPLE_SWITCH_RECEIVER) > -1 ); - if( bIsControl && (sLastControlName!=CN_SIMPLE_SWITCH_RECEIVER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_SIMPLE_SWITCH_RECEIVER; - Call("/esp/controls/door_opener.fn::CreateSimpleSwitchReceiver()"); - } - - !# CN_SMOKE_DETECTOR - bIsControl = ( sControlName.Find(CN_SMOKE_DETECTOR) > -1 ); - if( bIsControl && (sLastControlName != CN_SMOKE_DETECTOR)) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_SMOKE_DETECTOR; - Call("/esp/controls/smokedetector.fn::CreateSmokeDetectorControl()"); - } - - !# SWITCH - bIsControl = ( sControlName.Find(CN_SWITCH) > -1 ); - if( bIsControl && (sLastControlName != CN_SWITCH) ) - { - isKnownControl = true; - sLastControlName = CN_SWITCH; - if (ch.Label().Substr(5,4) != "BWTH") { - WriteLine( "" ); - Call("/esp/controls/switch.fn::CreateBinaryActuator()"); - } else { - ! If the device is a HmIP-BWTH or HmIP-BWTH24 - WriteLine( "" ); - Call("/esp/controls/heating_control.fn::CreateBWTHSwitchState()"); - } - } - - !# SWITCH_TRANSMITTER - bIsControl = ( sControlName.Find(CN_SWITCH_TRANSM) > -1 ); - if( bIsControl && (sLastControlName != CN_SWITCH_TRANSM) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_SWITCH_TRANSM; - Call("/esp/controls/switch.fn::CreateSwitchTansmitter()"); - } - - !# TEMP_HUM_PARTICLE_MATTER_TRANSMITTER - bIsControl = ( sControlName.Find(CN_TEMP_HUMIDITY_PARTICULATE_MATTER_TRANSMITTER) > -1 ); - if( bIsControl && (sLastControlName != CN_TEMP_HUMIDITY_PARTICULATE_MATTER_TRANSMITTER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_TEMP_HUMIDITY_PARTICULATE_MATTER_TRANSMITTER; - Call("/esp/controls/weather_sensor.fn::CreateTempHuminityParticulateMatterTransmitter()"); - } - - !# THERMOSTAT - bIsControl = ( sControlName.Find(CN_THERMO) > -1 ); - if( bIsControl && (sLastControlName!=CN_THERMO) && (sControlName.Find('COLORTEMP') == -1)) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_THERMO; - Call("/esp/controls/thermostat.fn::CreateThermostat()"); - } - - !# UNIVERSAL_LIGHT_RECEIVER - bIsControl = ( sControlName.Find(CN_UNIVERSAL_LIGHT_RECEIVER) > -1 ); - if( bIsControl && (sLastControlName != CN_UNIVERSAL_LIGHT_RECEIVER)) - { - isKnownControl = true; - sLastControlName = CN_UNIVERSAL_LIGHT_RECEIVER; - - object oDevice = dom.GetObject(cObj.Device()); - object oMaintenance = dom.GetObject(oDevice.Channels().GetAt(0)); - string chnAddress = ch.Address(); - integer chnNumber = chnAddress.StrValueByIndex(":",1).ToInteger(); - - if (ch.Label() != "HmIP-DRG-DALI") { - WriteLine( "" ); - if (ch.Label() != "HmIP-LSC") { - if ((oMaintenance.MetaData("deviceMode") == 0) || (oMaintenance.MetaData("deviceMode") == 1)) { - if (chnNumber == 1) { - Call("/esp/controls/universal_light_receiver.fn::CreateRGBWControlMode01()"); - } else { - Call("/esp/datapointconfigurator.fn::CreateNoFunction()"); - } - } - if (oMaintenance.MetaData("deviceMode") == 2) { - - if ((chnNumber == 1) || (chnNumber == 2) ) { - Call("/esp/controls/universal_light_receiver.fn::CreateRGBWControlMode2()"); - } else { - Call("/esp/datapointconfigurator.fn::CreateNoFunction()"); - } - } - if (oMaintenance.MetaData("deviceMode") == 3) { - Call("/esp/controls/universal_light_receiver.fn::CreateRGBWControlMode3()"); - } - } else { - ! HmIP-LSC - ! isKnownControl = false; - ! sLastControlName = ""; - Call("/esp/controls/universal_light_receiver.fn::CreateRGBWControlMode_RGB_TW()"); - } - } else { - ! HmIP-DRG-DALI - - integer maxCap = ch.MetaData('maxCap'); - - if ((maxCap != null) && (maxCap != "--") && (maxCap < 5)) { - ! Switch - if (maxCap == 0) {Call("/esp/controls/switch.fn::CreateVIR-LG-ONOFF_Actuator()");} - - ! Dimmer - if (maxCap == 1) {Call("/esp/controls/dimmer.fn::CreateDALIDimmingActuator()");} - - ! Tunable White - if (maxCap == 2) {Call("/esp/controls/universal_light_receiver.fn::CreateRGBWControlMode2()");} - - ! RGB - if ((maxCap == 3) || (maxCap == 4)) { - Call("/esp/controls/universal_light_receiver.fn::CreateRGBWControlMode_RGB_TW()"); - } - } else { - ! No parameter to set - Call("/esp/datapointconfigurator.fn::CreateNoFunction()"); - } - } - } - - !# CN_WATER_DETECTION_TRANSMITTER - HmIP - bIsControl = ( sControlName.Find(CN_WATER_DETECTION_TRANSMITTER) > -1 ); - if( bIsControl && (sLastControlName != CN_WATER_DETECTION_TRANSMITTER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_WATER_DETECTION_TRANSMITTER; - Call("/esp/controls/water_detection_transmitter.fn::CreateWaterDetectionTransmitter()"); - } - - !# CN_WEATHER_TRANSMIT - HmIP - bIsControl = ( sControlName.Find(CN_WEATHER_TRANSMIT) > -1 ); - if( bIsControl && (sLastControlName != CN_WEATHER_TRANSMIT) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_WEATHER_TRANSMIT; - Call("/esp/controls/weather_sensor.fn::CreateWeatherSensor()"); - } - - !# CN_WEEKLY_PROFILE - HmIP - bIsControl = ( sControlName.Find(CN_WEEKLY_PROFILE) > -1 ); - if( bIsControl && (sLastControlName != CN_WEEKLY_PROFILE) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_WEEKLY_PROFILE; - Call("/esp/controls/hmip_weekly_program.fn::CreateWeeklyProgram()"); - } - - !# WINDOW - bIsControl = ( sControlName.Find(CN_WINDOW) > -1 ); - if( bIsControl && (sLastControlName!=CN_WINDOW) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_WINDOW; - Call("/esp/controls/window.fn::CreateWinMatic()"); - } - - !# WIN_SC - bIsControl = ( sControlName.Find(CN_WIN_SC) > -1 ); - if( bIsControl && (sLastControlName!=CN_WIN_SC) ) - { - !WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_WIN_SC; - Call("/esp/controls/win_sc.fn::CreateWin_SC()"); - } - - !# WIN_SC_SECURE - bIsControl = ( sControlName.Find(CN_WIN_SC_SECURE) > -1 ); - if( bIsControl && (sLastControlName != CN_WIN_SC_SECURE) ) - { - !WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_WIN_SC_SECURE; - Call("/esp/controls/win_sc_secure.fn::CreateWin_SC_SECURE()"); - } - - !# WIN_SC_SENSOR - bIsControl = ( sControlName.Find(CN_WIN_SC_SENSOR) > -1 ); - if( bIsControl && (sLastControlName!=CN_WIN_SC_SENSOR) ) - { - !WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_WIN_SC_SENSOR; - Call("/esp/controls/win_sc_sensor.fn::CreateWin_SC_SENSOR()"); - } - - !# CN_WINDOW_DRIVE_RECEIVER - bIsControl = ( sControlName.Find(CN_WINDOW_DRIVE_RECEIVER) > -1 ); - if( bIsControl && (sLastControlName!=CN_WINDOW_DRIVE_RECEIVER) ) - { - !WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_WINDOW_DRIVE_RECEIVER; - Call("/esp/controls/win_sc_sensor.fn::CreateWindowDriveReceiver()"); - } - } - else - { - oEName = oE.Name(); - bSV = true; - } - } - } - ! create device maintenance channel information - if (ictCH == ictMaintenance) { - WriteLine( '
' ); - Call("/esp/controls/maintenance.fn::CreateDeviceMaintenanceChannel()"); - isKnownControl = true; - } - if (!isKnownControl) - { - WriteLine( '
' ); - object ch = dom.GetObject(chnId); - - ! This if branch is not necessary anymore. It's only for compatibility reasons - if (ch.HssType() == "ROTARY_CONTROL_TRANSCEIVER") { - if (ch.Label() == "HmIP-WRCR") { - WriteLine( "" ); - Call("/esp/datapointconfigurator.fn::CreateNoFunction()"); - } else { - WriteLine( "" ); - Call("/esp/datapointconfigurator.fn::CreateUnknown()"); - } - } else { - WriteLine( "" ); - Call("/esp/datapointconfigurator.fn::CreateUnknown()"); - } - } - if ( (isKnownControl) && (bSV) && (oEName.Find("HmIP-RF.") == -1) && (oEName.Find("CUxD.CUX") == -1) ) - { - WriteLine( '
'); - WriteLine( "" ); - WriteLine('' ); - Call("/esp/datapointconfigurator.fn::CreateSysVars()"); - } - WriteLine( '' ); - WriteLine( '
' ); - } - - ! write update script - if( ctrlReqUpdate ) - { - cId = chnId; - WriteLine(""); - } - - !WriteLine(""); - - return; -} - -function ::StringCut() -{ - if(((sName.Find(" ") == -1) || (sName.Find(" ") >= 9)) && (sName.Length()>9) && (sName.Find("${") == -1)) - { - string sI = ""; - integer iCurrCut = 0; - integer iLastCut = 0; - string sWorkingName = ""; - - foreach(sI,system.GenerateEnum(0,sName.Length())) - { - iCurrCut = iCurrCut +1; - - if( (iCurrCut % iLength) == 0 ) - { - sWorkingName = sWorkingName#sName.Substr(iLastCut,iLength)#'
'; - iLastCut = iCurrCut; - } - } - sWorkingName = sWorkingName#sName.Substr(iLastCut,sName.Length())#' '; - sName = sWorkingName; - } -} - -function ::CreateEventInterface() -{ - object objEvent = cObj.DPByControl("EVENT_INTERFACE.TRIGGER"); - if( objEvent ) - { - WriteLine(""); - WriteLine(""); - WriteLine(""); - WriteLine(""); - WriteLine(""); - WriteLine(""); - WriteLine("
"); - WriteLine("
"); - WriteLine(""); - WriteLine("
"); - WriteLine("
Betätigen
"); - WriteLine(""); - WriteLine(" "); - - WriteLine(""); - } - return; -} - -function ::CreateChannelNotActive() -{ - WriteLine(""); - WriteLine(""); - WriteLine(""); - WriteLine(""); - WriteLine(""); - WriteLine("
"); - WriteLine("
"); - WriteLine("${controlChannelNotActive}"); - WriteLine("
"); - WriteLine("
"); - WriteLine(""); - return; -} - -function ::CreateNoFunction() -{ - - string _style = ""; - if (style != "-") { - _style = style; - } - - WriteLine(""); - WriteLine(""); - WriteLine(""); - WriteLine(""); - WriteLine(""); - WriteLine("
"); - WriteLine("
"); - WriteLine("${controlChannelHasNoFunction}"); - WriteLine("
"); - WriteLine("
"); - WriteLine(""); -} - -function ::CreateUnknown() -{ - boolean bStatusOnly = (system.GetVar("iStatusOnly") == 0); - string showParam = true; - - WriteLine( '' ); - WriteLine( '' ); - WriteLine( ''); - integer i = 0; - string sEnum = ""; - - if( (cObj.IsTypeOf( OT_VARDP )) || (cObj.IsTypeOf( OT_ALARMDP)) ) - { - sEnum = cObj.ID().ToString(); - } - else - { - sEnum = cObj.DPs().EnumEnabledVisibleIDs(); - } - - string sKnownControls = "NONE.SWITCH.DIMMER.BLIND.WINDOW.LOCK.BUTTON.RC19_DISPLAY.DOOR_SENSOR.RHS.TEMP.ANALOG_OUTPUT."; - string s; - foreach( s, sEnum ) - { - object oDP = dom.GetObject( s ); - - if( oDP) - { - - ! Some parameters shouldn't be visible - Call("/esp/datapointconfigurator.fn::HideCertainParameters()"); - if (showParam == true) { - boolean bIsKnownControl = false; - string sCName = oDP.MetaData("CONTROL"); - if( sCName ) - { - integer iPosPoint = sCName.Find('.'); - if( iPosPoint != -1 ) - { - string sCtrlName = sCName.Substr(0,iPosPoint); - integer iPosCtrl = sKnownControls.Find( sCtrlName ); - if( iPosCtrl != -1 ) - { - bIsKnownControl = true; - } - } - !# Parameter is not visible - if( sCName.Find("INVISIBLE") > -1) - { - WriteLine( "" ); - isInvisible = true; - } else { - isInvisible = false; - } - } - if( (!bIsKnownControl) && (!isInvisible) ) - { - var value = oDP.Value(); - - boolean bIsSysVar = ((oDP.IsTypeOf( OT_VARDP )) || (oDP.IsTypeOf( OT_ALARMDP ))); - boolean bIsHssDp = ( oDP.IsTypeOf( OT_HSSDP ) ); - boolean bChannel = ( cObj.IsTypeOf( OT_CHANNEL ) ); - string sTitle = ""; - string sKey = ""; - boolean bHideValue = false; - if( bChannel ) - { - if( bIsHssDp ) - { - string sLongKey = cObj.HssType()#"|"#oDP.HSSID(); - string sShortKey = oDP.HSSID(); - if( (oDP.ValueType() == ivtInteger) && (oDP.ValueSubType() == istEnum) ) - { - ! Current HmIP devices don`t work properly with web.webGetValueFromList - ! Therefore this is deactivated - if ( (oEName.Find("HmIP-RF.") == -1) ) { - sLongKey = sLongKey#"="#web.webGetValueFromList( oDP.ValueList(), value ); - sShortKey = sShortKey#"="#web.webGetValueFromList( oDP.ValueList(), value ); - } else { - sLongKey = sLongKey#"="#value; - sShortKey = sShortKey#"="#value; - } - - bHideValue = true; - } - if( (oDP.ValueType() == ivtBinary ) && ((oDP.ValueSubType() == istGeneric)||(oDP.ValueSubType() == istBool)||(oDP.ValueSubType() == istSwitch)) ) - { - string sPVal = ""; - if( oDP.Value() ) - { - sPVal = "TRUE"; - } - else - { - sPVal = "FALSE"; - } - sLongKey = sLongKey#"="#sPVal; - sShortKey = sShortKey#"="#sPVal; - bHideValue = true; - } - sTitle = web.webKeyFromStringTable( sLongKey ); - if( !sTitle.Length() ) - { - sTitle = web.webKeyFromStringTable( sShortKey ); - if( !sTitle.Length() ) - { - sTitle = "["#sShortKey#"]"; - } - } - } - else - { - sTitle = oDP.Name(); - } - } - else - { - sTitle = oDP.Name(); - } - - string sValueUnit = oDP.ValueUnit(); - string sSpace = " "; - if( sValueUnit == "degree" ) { sValueUnit = "°"; } - if( sValueUnit == "100%" ) - { - value = value * 100; - sValueUnit = "%"; - } - - string sValue = "?"; - - boolean bBoolean = ( value.Type() == "boolean" ); - boolean bReal = ( value.Type() == "real" ); - - if( bBoolean && bChannel ) - { - string sVLKey = ""; - if( value == false ) { sVLKey = "=FALSE"; } - if( value == true ) { sVLKey = "=TRUE"; } - sValue = web.webKeyFromStringTable( sKey#sVLKey ); - if( !sValue.Length() ) - { - sValue = value.ToString(0); - if( !sTitle.Length() ) - { - sTitle = sKey; - } - } - else - { - sTitle = ""; - } - } - else - { - if( !sTitle.Length() ) - { - sTitle = sKey; - } - } - - if( bReal ) - { - sValue = value.ToString(2); - - ! Show the illumination without decimal places - if ( (oEName.Find("HmIP-RF.") != -1) && (sShortKey == "ILLUMINATION") ) { - sValue = value.ToString(0); - } - ! Show the temperature with one decimal place - if ( (oEName.Find("HmIP-RF.") != -1) && (sShortKey == "ACTUAL_TEMPERATURE") ) { - sValue = value.ToString(1); - } - } - - if( (!bBoolean) && (!bReal) ) - { - sValue = value.ToString(0); - } - - if( !value.ToString().Length() ) - { - sValue = "0"; - } - - if( bHideValue ) - { - if( ( oDP.Operations() & OPERATION_WRITE ) == 0 ) - { - sValue = sTitle; - sTitle = ""; - } - } - - ! if( !(i%2) ) { WriteLine( '' ); } - boolean bExistControl = true; - if( (bStatusOnly) && (!bIsSysVar) && (sLastControlName != "")) - { - bExistControl = false; - } - if( bExistControl ) - { - WriteLine( '' ); - } - if( (i%2) ) { WriteLine( '' ); } - i = i + 1; - } - } - } - } - WriteLine(''); - WriteLine('
' ); - - WriteLine( '
' ); - if(sTitle == "") { - WriteLine( ''#sTitle#'' ); - } - else { - WriteLine( ''#sTitle#':' ); - } - boolean tbRead = ( ( oDP.Operations() & OPERATION_READ ) != 0 ); - boolean tbEvent = ( ( oDP.Operations() & OPERATION_EVENT ) != 0 ); - boolean tbWrite = ( ( oDP.Operations() & OPERATION_WRITE ) != 0 ); - boolean bBoolean = false; - - if (cObj.IsTypeOf(OT_VARDP) || cObj.IsTypeOf(OT_ALARMDP)) { - tbWrite = false; - } - - WriteLine( '' ); - - if( !tbWrite ) - { - string sValueh = ""; - if (oDP.HssType() == "WIND_DIRECTION") - { - Call("/esp/datapointconfigurator.fn::ConvWindDir()"); - } - WriteLine(sValueh#" "#sValue#sSpace#sValueUnit ); - } - else - { - if( !bBoolean ) - { - if( (bStatusOnly) && (!bIsSysVar) && (sLastControlName == "")) - { - string sDivider = ""; - if( oDP.ValueUnit() == "100%" ) { sDivider = "/100"; } - WriteLine( ""#sSpace#sValueUnit ); - } - else - { - string sSysVarVal = ""; - object cObjTmp = oDP; - integer iVT = oDP.ValueType(); - integer iST = oDP.ValueSubType(); - boolean bLogic = ( (iVT==ivtBinary) && (iST==istBool) ); - boolean bList = ( (iVT==ivtInteger) && (iST==istEnum) ); - boolean bNumber = ( (iVT==ivtFloat) && (iST==istGeneric) ); - boolean bAlarm = ( (iVT==ivtBinary) && (iST==istAlarm) ); - boolean bString = ( (iVT==ivtString) && (iST==istChar8859)); - Call( "/esp/system.fn::getSysVarValAsString()" ); - WriteLine( sSysVarVal ); - } - } - else - { - - if( system.GetVar("iStatusOnly") == 0 ) - { - string sClassName; - - sClassName = "CLASS02516"; - if( oDP.Value() == true ) { sClassName = "CLASS02517"; } - WriteLine("  An    "); - - sClassName = "CLASS02516"; - if( (oDP.Value() == false) || (oDP.Value() == "") ) { sClassName = "CLASS02517"; } - WriteLine(" Aus "); - } - else - { - if (oDP.Value()) - { - WriteLine(oDP.ValueName1()); - } - else - { - WriteLine(oDP.ValueName0()); - } - } - } - } - WriteLine(""); - WriteLine( '
' ); - WriteLine( '
'); - WriteLine(''); - WriteLine(''); - return; -} - - -function ::ConvWindDir() { - -! --- Konvertierung der Gradanzeige in Himmelsrichtungen --- - - integer iValue = sValue.ToInteger() ; - - sValueh = "no value"; - - if ( (iValue >= 346) || (iValue <= 15) ) - { - sValueh = "N"; - return; - } - if ( (iValue >= 16) && (iValue <= 75) ) - { - sValueh = "NO"; - return; - } - if ( (iValue >= 76) && (iValue <= 105) ) - { - sValueh = "O"; - return; - } - if ( (iValue >= 106) && (iValue <= 165) ) - { - sValueh = "SO"; - return; - } - if ( (iValue >= 166) && (iValue <= 195) ) - { - sValueh = "S"; - return; - } - if ( (iValue >= 196) && (iValue <= 255) ) - { - sValueh = "SW"; - return; - } - if ( (iValue >= 256) && (iValue <= 285) ) - { - sValueh = "W"; - return; - } - if ( (iValue >= 286) && (iValue <= 345) ) - { - sValueh = "NW"; - return; - } - - return; -} - -function ::CreateSysVar() -{ - WriteLine( '' ); - WriteLine( '
' ); - - string sSysVarVal = ''; - object cObjTmp = cObj; - Call( "/esp/system.fn::getSysVarValAsString()" ); - - WriteLine( ''#sSysVarVal#'' ); - WriteLine( '
' ); - WriteLine( '' ); - return; -} - -function ::CreateSysVars() -{ - WriteLine( '' ); - WriteLine( '' ); - WriteLine( ''); - integer i = 0; - string s; - foreach(s,cObj.DPs().EnumIDs()) - { - object oSV = dom.GetObject( s ); - if( oSV ) - { - if( oSV.IsTypeOf( OT_VARDP ) || oSV.IsTypeOf( OT_ALARMDP ) ) - { -! if( !(i%2) ) { WriteLine( '' ); } - WriteLine( '' ); - if( (i%2) ) { WriteLine( '' ); } - i = i + 1; - } - } - } - WriteLine( '' ); - WriteLine( '
' ); - WriteLine( '
' ); - WriteLine( ''#oSV.Name()#':' ); - - string sSysVarVal = ""; - object cObjTmp = oSV; - integer iVT = cObjTmp.ValueType(); - integer iST = cObjTmp.ValueSubType(); - boolean bLogic = ( (iVT==ivtBinary) && (iST==istBool) ); - boolean bList = ( (iVT==ivtInteger) && (iST==istEnum) ); - boolean bNumber = ( (iVT==ivtFloat) && (iST==istGeneric) ); - boolean bAlarm = ( (iVT==ivtBinary) && (iST==istAlarm) ); - boolean bString = ( (iVT==ivtString) && (iST==istChar8859)); - boolean bSysVar = ( bLogic || bList || bNumber || bAlarm || bString); - Call( "/esp/system.fn::getSysVarValAsString()" ); - - WriteLine( ''#sSysVarVal#'' ); - WriteLine( '
' ); - WriteLine( '
' ); - WriteLine( '' ); - - return; -} - -function ::HideCertainParameters() { - string tmpHCP; - string param2Exclude = "IDENTIFY_DURATION,IDENTIFICATION_MODE_KEY_VISUAL,IDENTIFICATION_MODE_LCD_BACKLIGHT,IDENTIFY_TARGET_LEVEL,STATUS_FLAG_ERROR,STATUS_FLAG_LOW_BAT,STATUS_FLAG_PLAYING_FILE_ACTIVE,STATUS_FLAG_PLAYLIST_ACTIVE,ERROR_CODE_STATUS"; - - showParam = true; - ! Check if datapoint is no sysvar - if (! oDP.IsTypeOf( OT_VARDP )) { - foreach (tmpHCP, param2Exclude.Split(",")) { - if (oDP.HSSID().Find(tmpHCP) != -1) { - showParam = false; - return; - } - } - } - return; -} diff --git a/buildroot-external/patches/occu/0189-WebUI-Fix-ControlHmIP-MOD-RC8/occu/WebUI/www/rega/esp/datapointconfigurator.fn.orig b/buildroot-external/patches/occu/0189-WebUI-Fix-ControlHmIP-MOD-RC8/occu/WebUI/www/rega/esp/datapointconfigurator.fn.orig deleted file mode 100755 index 528c1d303d..0000000000 --- a/buildroot-external/patches/occu/0189-WebUI-Fix-ControlHmIP-MOD-RC8/occu/WebUI/www/rega/esp/datapointconfigurator.fn.orig +++ /dev/null @@ -1,1821 +0,0 @@ -function ::dcCreateTable() -{ - object c2Obj = dom.GetObject( system.GetVar("cId") ); - string sName = c2Obj.Name(); - - WriteLine(''); - - if( iFavNamePosition == 1 ) - { - WriteLine(''); - WriteLine(''); - - WriteLine(''); - WriteLine(''); - WriteLine(''); - - WriteLine(''); - WriteLine(''); - WriteLine(''); - - WriteLine(''); - WriteLine(''); - WriteLine(''); - } - - if( iFavNamePosition == 0 ) - { - integer iLength = 9; - Call("/esp/datapointconfigurator.fn::StringCut()"); - - WriteLine(''); - WriteLine(''); - WriteLine(''); - WriteLine(''); - - } - WriteLine('
'); - WriteLine('
' # sName # '
'); - WriteLine('
'); - WriteLine('
'); - Call("/esp/datapointconfigurator.fn::dcCreate()"); - WriteLine('
'); - WriteLine('
'#sName#'
'); - Call("/esp/datapointconfigurator.fn::dcCreate()"); - WriteLine('
'); -} - -! dcCreate() -! [cId]: idnumber, [iStatusOnly]: Controls (un)bedienbar -function ::dcCreate() -{ - ! Control Button Dimensions - integer ictCH = 0; - integer chnId = system.GetVar("cId"); - boolean ctrlReqUpdate = false; - object cObj = dom.GetObject( system.GetVar("cId") ); - - if( cObj.IsTypeOf( OT_PROGRAM ) ) - { - ictCH = 0; - ctrlReqUpdate = true; - string progId = cObj.ID(); - string viewstatus = ""; - Call("/esp/system.fn::writeProgCtrl()"); - } - - if( cObj.IsTypeOf( OT_DP ) ) - { - ictCH = 0; - ctrlReqUpdate = true; - integer iVT = cObj.ValueType(); - integer iST = cObj.ValueSubType(); - boolean bLogic = ( (iVT==ivtBinary) && (iST==istBool) ); - boolean bList = ( (iVT==ivtInteger) && (iST==istEnum) ); - boolean bNumber = ( (iVT==ivtFloat) && (iST==istGeneric) ); - boolean bAlarm = ( (iVT==ivtBinary) && (iST==istAlarm) ); - boolean bString = ( (iVT==ivtString) && (iST==istChar8859)); - boolean bSysVar = ( bLogic || bList || bNumber || bAlarm || bString); - if( bSysVar ) - { - WriteLine( '' ); - WriteLine( '' ); - Call( "/esp/datapointconfigurator.fn::CreateSysVar()" ); - WriteLine( '' ); - WriteLine( '
' ); - } - } - - if( cObj.IsTypeOf( OT_CHANNEL ) ) - { - var CN_ACCELERATION_TRANSCEIVER = "ACCELERATION_TRANSCEIVER."; - var CN_ACCESSPOINT_GENERIC_RECEIVER = "ACCESSPOINT_GENERIC_RECEIVER."; - var CN_ACCESS_RECEIVER = "ACCESS_RECEIVER."; - var CN_ACCESS_TRANSCEIVER = "ACCESS_TRANSCEIVER."; - var CN_ACOUSTIC_DISPLAY_RECEIVER = "ACOUSTIC_DISPLAY_RECEIVER."; - var CN_ACOUSTIC_SIGNAL_TRANSMITTER = "ACOUSTIC_SIGNAL_TRANSMITTER."; - var CN_ACOUSTIC_SIGNAL_VIRTUAL_RECEIVER = "ACOUSTIC_SIGNAL_VIRTUAL_RECEIVER."; - var CN_ALARM_SWITCH_VIRTUAL_RECEIVER = "ALARM_SWITCH_VIRTUAL_RECEIVER."; - var CN_ANALOG_INPUT = "ANALOG_INPUT."; - var CN_ARMING = "ARMING."; - var CN_BLIND = "BLIND."; - var CN_BLIND_TRANSMITTER = "BLIND_TRANSMITTER."; - var CN_BLIND_VIRTUAL_RECEIVER = "BLIND_VIRTUAL_RECEIVER."; - var CN_BRIGHTNESS_TRANSMITTER = "BRIGHTNESS_TRANSMITTER."; - var CN_BTN_SHORT_ONLY = "BTN_SHORT_ONLY."; - var CN_BUTTON = "BUTTON."; - var CN_CAPACITIVE_FILLING_SENSOR = "CAPACITIVE_FILLING_LEVEL_SENSOR."; - var CN_CARBON_DIOXIDE_RECEIVER = "CARBON_DIOXIDE_RECEIVER."; - var CN_CLIMATE_CONTROL_FLOOR_PUMP_TRANSCEIVER = "CLIMATECONTROL_FLOOR_PUMP_TRANSCEIVER."; - var CN_CLIMATE_CONTROL_FLOOR_TRANSCEIVER = "CLIMATECONTROL_FLOOR_TRANSCEIVER."; - var CN_CLIMATE_TRANSCEIVER = "CLIMATE_TRANSCEIVER."; - var CN_COLORTEMP = "COLORTEMP."; - var CN_COND_SWITCH_TRANSMITTER_TEMPERATURE = "COND_SWITCH_TRANSMITTER_TEMPERATURE."; - var CN_DANGER = "_DANGER."; - var CN_DIGITAL_ANALOG_OUTPUT = "DIGITAL_ANALOG_OUTPUT."; - var CN_DIGITAL_STATE = "DIGITAL_STATE."; - var CN_DIMMER = "DIMMER."; - var CN_DIMMER_REAL = "DIMMER_REAL."; - var CN_DOOR_LOCK_STATE_TRANSCEIVER = "DOOR_LOCK_STATE_TRANSCEIVER."; - var CN_DOOR_LOCK_STATE_TRANSMITTER = "DOOR_LOCK_STATE_TRANSMITTER."; - var CN_DOOR_OPENER = "DOOROPENER."; - var CN_DOOR_RECEIVER = "DOOR_RECEIVER."; - var CN_DOOR_SENSOR = "DOOR_SENSOR."; - var CN_DUAL_WHITE_BRIGHTNESS = "DUAL_WHITE_BRIGHTNESS"; - var CN_DUAL_WHITE_COLOR = "DUAL_WHITE_COLOR"; - var CN_GENERIC_INPUT_TRANSMITTER = "GENERIC_INPUT_TRANSMITTER."; - var CN_GENERIC_MEASURING_TRANSMITTER = "GENERIC_MEASURING_TRANSMITTER."; - var CN_HEATING_CONTROL = "HEATING_CONTROL."; - var CN_HEATING_CONTROL_HMIP = "HEATING_CONTROL_HMIP."; - var CN_HMIP_BUTTON = "BUTTON_NO_FUNCTION."; - var CN_IDENTIFICATION = "IDENTIFICATION."; - var CN_JALOUSIE = "JALOUSIE."; - var CN_LOCK = "LOCK."; - var CN_MAINTENANCE = "MAINTENANCE."; - var CN_MOTIONDETECTOR = "MOTIONDETECTOR_TRANSCEIVER."; - var CN_NONE = "NONE"; - var CN_OPTICAL_SIGNAL_RECEIVER = "OPTICAL_SIGNAL_RECEIVER"; - var CN_PDDT = "PASSAGE_DETECTOR_DIRECTION_TRANSMITTER."; - var CN_POWERMETER = "POWERMETER."; - var CN_POWERMETER_IEC1 = "POWERMETER_IEC1."; - var CN_POWERMETER_IEC2 = "POWERMETER_IEC2."; - var CN_POWERMETER_IGL = "POWERMETER_IGL."; - var CN_POWERMETER_PSM = "POWERMETER_PSM."; - var CN_RC19_DISPLAY = "RC19_DISPLAY."; - var CN_RAIN_DETECTION_TRANSMITTER = "RAIN_DETECTION_TRANSMITTER."; - var CN_RGB_COLOR = "RGB_COLOR."; - var CN_RGBW_AUTOMATIC = "RGBW_AUTOMATIC."; - var CN_RGBW_COLOR = "RGBW_COLOR."; - var CN_RHS = "RHS."; - var CN_SERVO_TRANSMITTER = "SERVO_TRANSMITTER."; - var CN_SERVO_VIRTUAL_RECEIVER = "SERVO_VIRTUAL_RECEIVER."; - var CN_SHUTTER_TRANSMITTER = "SHUTTER_TRANSMITTER."; - var CN_SHUTTER_VIRTUAL_RECEIVER = "SHUTTER_VIRTUAL_RECEIVER."; - var CN_SIMPLE_SWITCH_RECEIVER = "SIMPLE_SWITCH_RECEIVER."; - var CN_SMOKE_DETECTOR = "SMOKE_DETECTOR."; - var CN_SWITCH = "SWITCH."; - var CN_SWITCH_TRANSM = "SWITCH_TRANSMITTER."; - var CN_TEMP_HUMIDITY_PARTICULATE_MATTER_TRANSMITTER = "TEMP_HUM_PARTICLE_MATTER_TRANSMITTER."; - var CN_THERMO = "TEMP."; - var CN_UNIVERSAL_LIGHT_RECEIVER = "UNIVERSAL_LIGHT_RECEIVER."; - var CN_WATER_DETECTION_TRANSMITTER = "WATER_DETECTION_TRANSMITTER."; - var CN_WEATHER_TRANSMIT = "WEATHER_TRANSMIT."; - var CN_WEEKLY_PROFILE = "WEEK_PROFILE."; - var CN_WIN_SC = "WIN_SC."; - var CN_WIN_SC_SECURE = "WIN_SC_SECURE."; - var CN_WIN_SC_SENSOR = "WIN_SC_SENSOR."; - var CN_WINDOW = "WINDOW."; - var CN_WINDOW_DRIVE_RECEIVER = "WINDOW_DRIVE_RECEIVER."; - - var CN_EVENT_INTERFACE = "EVENT_INTERFACE."; - var CN_NOT_ACTIVE = "CHANNEL_NOT_ACTIVE"; - - var isInvisible = false; - var isKnownControl = false; - - ctrlReqUpdate = true; - boolean bUnknown = true; - string sLastControlName = ""; - string sControlName = ""; - boolean bSV = false; - boolean bIsControl = false; - - integer devFwMajor = 0; - integer devFwMinor = 0; - integer devFwPatch = 0; - Call("/esp/functions.fn::getFirmwareVersion()"); - - ictCH = cObj.ChannelType(); - WriteLine(""); - WriteLine(""); - - string sE; - string oEName; - string style = "-"; - - foreach( sE, cObj.DPs().EnumEnabledVisibleIDs() ) - { - object oE = dom.GetObject( sE ); - if( oE ) - { - - ! WriteLine( "" ); - - sControlName = oE.MetaData("CONTROL"); - if( sControlName ) - { - object oDevice = dom.GetObject(cObj.Device()); - object ch = dom.GetObject(chnId); - ! WriteLine( "" ); - - !#ACCELERATION_TRANSCEIVER - bIsControl = ( sControlName.Find(CN_ACCELERATION_TRANSCEIVER) > -1 ); - if( bIsControl && (sLastControlName != CN_ACCELERATION_TRANSCEIVER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_ACCELERATION_TRANSCEIVER; - if (ch.Label() == "ELV-SH-TACO") { - Call("/esp/controls/acceleration_transceiver.fn::CreateAccelerationTransceiverTaco()"); - } else { - Call("/esp/controls/acceleration_transceiver.fn::CreateAccelerationTransceiver()"); - } - } - - !#ACCESSPOINT_GENERIC_RECEIVER - bIsControl = ( sControlName.Find(CN_ACCESSPOINT_GENERIC_RECEIVER) > -1 ); - if( bIsControl && (sLastControlName != CN_ACCESSPOINT_GENERIC_RECEIVER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_ACCESSPOINT_GENERIC_RECEIVER; - Call("/esp/controls/accesspoint_generic_receiver.fn::CreateAccessPointGenericReceiver()"); - } - !#ACCESS_RECEIVER - bIsControl = ( sControlName.Find(CN_ACCESS_RECEIVER) > -1 ); - if( bIsControl && (sLastControlName != CN_ACCESS_RECEIVER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_ACCESS_RECEIVER; - Call("/esp/controls/accessreceiver.fn::CreateAccessReceiver()"); - } - - !#ACCESS_TRANSCEIVER - bIsControl = ( sControlName.Find(CN_ACCESS_TRANSCEIVER) > -1 ); - if( bIsControl && (sLastControlName != CN_ACCESS_TRANSCEIVER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_ACCESS_TRANSCEIVER; - Call("/esp/controls/accessreceiver.fn::CreateAccessTransceiver()"); - } - - !#ACOUSTIC_DISPLAY_RECEIVER - bIsControl = ( sControlName.Find(CN_ACOUSTIC_DISPLAY_RECEIVER) > -1 ); - if( bIsControl && (sLastControlName != CN_ACOUSTIC_DISPLAY_RECEIVER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_ACOUSTIC_DISPLAY_RECEIVER; - Call("/esp/controls/acoustic_display_receiver.fn::CreateAcousticDisplayReceiver()"); - } - - !# CN_ACOUSTIC_SIGNAL_TRANSMITTER - bIsControl = ( sControlName.Find(CN_ACOUSTIC_SIGNAL_TRANSMITTER) > -1 ); - if( bIsControl && (sLastControlName != CN_ACOUSTIC_SIGNAL_TRANSMITTER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_ACOUSTIC_SIGNAL_TRANSMITTER; - Call("/esp/controls/acoustic_signal.fn::CreateAcousticSignalRealInfoControl()"); - } - - !# CN_ACOUSTIC_SIGNAL_VIRTUAL_RECEIVER - bIsControl = ( sControlName.Find(CN_ACOUSTIC_SIGNAL_VIRTUAL_RECEIVER) > -1 ); - if( bIsControl && (sLastControlName != CN_ACOUSTIC_SIGNAL_VIRTUAL_RECEIVER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_ACOUSTIC_SIGNAL_VIRTUAL_RECEIVER; - Call("/esp/controls/acoustic_signal.fn::CreateAcousticSignalVirtualReceiver()"); - } - - !# CN_ALARM_SWITCH_VIRTUAL_RECEIVER - HmIP - bIsControl = ( sControlName.Find(CN_ALARM_SWITCH_VIRTUAL_RECEIVER) > -1 ); - if( bIsControl && (sLastControlName != CN_ALARM_SWITCH_VIRTUAL_RECEIVER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_ALARM_SWITCH_VIRTUAL_RECEIVER; - Call("/esp/controls/alarmsirene.fn::CreateAlarmSwitchVirtualReceiver()"); - } - - !#ANALOG_INPUT - bIsControl = ( sControlName.Find(CN_ANALOG_INPUT) > -1 ); - if( bIsControl && (sLastControlName != CN_ANALOG_INPUT) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_ANALOG_INPUT; - Call("/esp/controls/analog_input.fn::CreateAnalogInputVoltage()"); - } - - !# CN_ARMING - bIsControl = ( sControlName.Find(CN_ARMING) > -1 ); - if( bIsControl && (sLastControlName != CN_ARMING) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_ARMING; - Call("/esp/controls/alarmsirene.fn::CreateAlarmArmingControl()"); - } - - !# BLIND - bIsControl = ( sControlName.Find(CN_BLIND) > -1 ); - if( bIsControl && (sLastControlName!=CN_BLIND) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_BLIND; - Call("/esp/controls/blind.fn::CreateShutterActuator()"); - } - - !# CN_BLIND_TRANSMITTER - bIsControl = ( sControlName.Find(CN_BLIND_TRANSMITTER) > -1 ); - if( bIsControl && (sLastControlName!=CN_BLIND_TRANSMITTER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_BLIND_TRANSMITTER; - if ((ch.Label().Substr(0,6) != "HmIPW-") && (ch.Label() != "HmIP-DRBLI4") && (ch.Label() != "HmIP-BBL") && (ch.Label() != "HmIP-BBL-2") && (ch.Label() != "HmIP-FBL") && (ch.Label() != "HmIP-BBL-I")) { - Call("/esp/controls/blind.fn::CreateBlindTransmitter()"); - } else { - object mode = dom.GetObject(ch.Address()); - if (mode.MetaData("channelMode") == "shutter") { - Call("/esp/controls/blind.fn::CreateShutterTransmitter()"); - } else { - Call("/esp/controls/blind.fn::CreateBlindTransmitter()"); - } - } - } - - !# CN_BLIND_VIRTUAL_RECEIVER - bIsControl = ( sControlName.Find(CN_BLIND_VIRTUAL_RECEIVER) > -1 ); - if( bIsControl && (sLastControlName!=CN_BLIND_VIRTUAL_RECEIVER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_BLIND_VIRTUAL_RECEIVER; - if ((ch.Label().Substr(0,6) != "HmIPW-") && (ch.Label() != "HmIP-DRBLI4") && (ch.Label() != "HmIP-BBL") && (ch.Label() != "HmIP-BBL-2") && (ch.Label() != "HmIP-FBL") && (ch.Label() != "HmIP-BBL-I")) { - Call("/esp/controls/blind.fn::CreateBlindVirtualReceiver()"); - } else { - object mode = dom.GetObject(ch.Address()); - if (mode.MetaData("channelMode") == "shutter") { - Call("/esp/controls/blind.fn::CreateShutterVirtualReceiver()"); - } else { - Call("/esp/controls/blind.fn::CreateBlindVirtualReceiver()"); - } - } - } - - !# CN_BRIGHTNESS_TRANSMITTER - HmIP - bIsControl = ( sControlName.Find(CN_BRIGHTNESS_TRANSMITTER) > -1 ); - if( bIsControl && (sLastControlName != CN_BRIGHTNESS_TRANSMITTER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_BRIGHTNESS_TRANSMITTER; - Call("/esp/controls/brightness_transmitter.fn::CreateBrightnessTransmitter()"); - } - - !# BTN - bIsControl = ( sControlName.Find(CN_BTN_SHORT_ONLY) > -1 ); - if( bIsControl && (sLastControlName!=CN_BTN_SHORT_ONLY) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_BTN_SHORT_ONLY; - Call("/esp/controls/button.fn::CreateKeyShortOnly()"); - } - - !# BUTTON - bIsControl = ( sControlName.Find(CN_BUTTON) > -1 ); - if( bIsControl && (sLastControlName!=CN_BUTTON) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_BUTTON; - Call("/esp/controls/button.fn::CreateKey()"); - } - - !# CAPACITIVE FILLING LEVEL SENSOR - bIsControl = ( sControlName.Find(CN_CAPACITIVE_FILLING_SENSOR) > -1 ); - if( bIsControl && (sLastControlName!=CN_CAPACITIVE_FILLING_SENSOR) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_CAPACITIVE_FILLING_SENSOR; - Call("/esp/controls/capacitive_filling_level_sensor.fn::CreateCapacitiveFillingSensor()"); - } - - !# CN_CARBON_DIOXIDE_RECEIVER - if (ch.Label() != "HmIPW-SCTHD") { - bIsControl = ( sControlName.Find(CN_CARBON_DIOXIDE_RECEIVER) > -1 ); - if( bIsControl && (sLastControlName!=CN_CARBON_DIOXIDE_RECEIVER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_CARBON_DIOXIDE_RECEIVER; - Call("/esp/controls/weather_sensor.fn::CreateCarbonDioxideReceiver()"); - } - } - - !# CHANNEL_NOT_ACTIVE - bIsControl = ( sControlName.Find(CN_NOT_ACTIVE) > -1 ); - if( bIsControl && (sLastControlName!=CN_NOT_ACTIVE) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_NOT_ACTIVE; - Call("/esp/datapointconfigurator.fn::CreateChannelNotActive()"); - } - - !# CLIMATE_TRANSCEIVER - bIsControl = ( sControlName.Find(CN_CLIMATE_TRANSCEIVER) > -1 ); - if( bIsControl && (sLastControlName != CN_CLIMATE_TRANSCEIVER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_CLIMATE_TRANSCEIVER; - Call("/esp/controls/climate_transceiver.fn::CreateClimateTransceiver()"); - } - - !# CN_CLIMATE_CONTROL_FLOOR_PUMP_TRANSCEIVER - HmIP - bIsControl = ( sControlName.Find(CN_CLIMATE_CONTROL_FLOOR_PUMP_TRANSCEIVER) > -1 ); - if( bIsControl && (sLastControlName != CN_CLIMATE_CONTROL_FLOOR_PUMP_TRANSCEIVER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_CLIMATE_CONTROL_FLOOR_PUMP_TRANSCEIVER; - Call("/esp/controls/climatecontrol_floor_transceiver.fn::CreateClimateControlFloorPumpTransceiver()"); - } - - !# CN_CLIMATE_CONTROL_FLOOR_TRANSCEIVER - HmIP - bIsControl = ( sControlName.Find(CN_CLIMATE_CONTROL_FLOOR_TRANSCEIVER) > -1 ); - if( bIsControl && (sLastControlName != CN_CLIMATE_CONTROL_FLOOR_TRANSCEIVER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_CLIMATE_CONTROL_FLOOR_TRANSCEIVER; - Call("/esp/controls/climatecontrol_floor_transceiver.fn::CreateClimateControlFloorTransceiver()"); - } - - !# CN_COLORTEMP - bIsControl = ( sControlName.Find(CN_COLORTEMP) > -1 ); - if( bIsControl && (sLastControlName != CN_COLORTEMP) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_COLORTEMP; - if (ch.Label().Substr(0,7) == "VIR-LG-") { - Call("/esp/controls/rgbw.fn::CreateVIR-LGWhiteLevelControl()"); - } - } - - !# CN_COND_SWITCH_TRANSMITTER_TEMPERATURE - HmIP - bIsControl = ( sControlName.Find(CN_COND_SWITCH_TRANSMITTER_TEMPERATURE) > -1 ); - if( bIsControl && (sLastControlName != CN_COND_SWITCH_TRANSMITTER_TEMPERATURE) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_COND_SWITCH_TRANSMITTER_TEMPERATURE; - Call("/esp/controls/cond_switch_transmitter_temp.fn::CreateCondSwitchTransmitterTemperature()"); - } - - !# DANGER - ! bIsControl = ( sControlName.Find(CN_DANGER) > -1 ); - ! if( bIsControl && (sLastControlName!=CN_DANGER) && (ch.Label() != "HmIP-SWSD-2")) - ! { - ! WriteLine( "" ); - ! isKnownControl = true; - ! sLastControlName = CN_DANGER; - ! Call("/esp/controls/danger.fn::CreateDangerSensor()"); - ! } - - !# FREQUENCY - bIsControl = ( sControlName.Find(CN_DIGITAL_ANALOG_OUTPUT) > -1 ); - if( bIsControl && (sLastControlName!=CN_DIGITAL_ANALOG_OUTPUT) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_DIGITAL_ANALOG_OUTPUT; - Call("/esp/controls/frequency.fn::CreateFrequency()"); - } - - bIsControl = ( sControlName.Find(CN_DIGITAL_STATE) > -1 ); - if( bIsControl && (sLastControlName!=CN_DIGITAL_STATE) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_DIGITAL_STATE; - Call("/esp/controls/digitalstate.fn::CreateDigitalState()"); - } - - !# DIMMER - bIsControl = ( sControlName.Find(CN_DIMMER) > -1 ); - if( bIsControl && (sLastControlName!=CN_DIMMER) ) - { - isKnownControl = true; - sLastControlName = CN_DIMMER; - if (ch.Label().Substr(0,12) != "VIR-LG-ONOFF") { - WriteLine( "" ); - if ((ch.Label() == "HmIP-BSL") && (devFwMajor >= 2)) { - Call("/esp/controls/dimmer.fn::CreateOpticalSignalReceiver()"); - } else { - Call("/esp/controls/dimmer.fn::CreateDimmingActuator()"); - } - } else { - ! This is because the device VIR_LG_ONOFF claims it is a DIMMER instead of a SWITCH - WriteLine( "" ); - sLastControlName = CN_SWITCH; - Call("/esp/controls/switch.fn::CreateVIR-LG-ONOFF_Actuator()"); - } - } - - !# CN_DIMMER_REAL - bIsControl = ( sControlName.Find(CN_DIMMER_REAL) > -1 ); - if( bIsControl && (sLastControlName != CN_DIMMER_REAL) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_DIMMER_REAL; - Call("/esp/controls/dimmer.fn::CreateDimmerRealInfoControl()"); - } - - !# DOOR_LOCK_STATE_TRANSCEIVER - bIsControl = ( sControlName.Find(CN_DOOR_LOCK_STATE_TRANSCEIVER) > -1 ); - if( bIsControl && (sLastControlName != CN_DOOR_LOCK_STATE_TRANSCEIVER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_DOOR_LOCK_STATE_TRANSCEIVER; - Call("/esp/controls/door_opener.fn::CreateDoorLockStateTranseiver()"); - } - - !# DOOR_LOCK_STATE_TRANSMITTER - bIsControl = ( sControlName.Find(CN_DOOR_LOCK_STATE_TRANSMITTER) > -1 ); - if( bIsControl && (sLastControlName != CN_DOOR_LOCK_STATE_TRANSMITTER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_DOOR_LOCK_STATE_TRANSMITTER; - Call("/esp/controls/door_opener.fn::CreateDoorLockStateTransmitter()"); - } - - !# DOOROPENER - bIsControl = ( sControlName.Find(CN_DOOR_OPENER) > -1 ); - if( bIsControl && (sLastControlName!=CN_DOOR_OPENER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_DOOR_OPENER; - Call("/esp/controls/door_opener.fn::CreateDoorOpener()"); - } - - !# DOOR_RECEIVER - bIsControl = ( sControlName.Find(CN_DOOR_RECEIVER) > -1 ); - if( bIsControl && (sLastControlName!=CN_DOOR_RECEIVER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_DOOR_RECEIVER; - Call("/esp/controls/door_opener.fn::CreateDoorReceiver()"); - } - - !# DOOR_WINDOW_CONTACT - bIsControl = ( sControlName.Find(CN_DOOR_SENSOR) > -1 ); - if( bIsControl && (sLastControlName!=CN_DOOR_SENSOR) ) - { - if (ch.HssType() != "MULTI_MODE_INPUT_TRANSMITTER") { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_DOOR_SENSOR; - Call("/esp/controls/door_window_contact.fn::CreateDoorWindowContact()"); - } else { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_DOOR_SENSOR; - if (ch) { - ! channelMode 1 and 2 are handled as HMIP_BUTTON - if (ch.MetaData("channelMode") == 3) { - Call("/esp/controls/door_window_contact.fn::CreateDoorWindowContact()"); - } else { - Call("/esp/datapointconfigurator.fn::CreateNoFunction()"); - } - } - } - } - - !# CN_DUAL_WHITE_BRIGHTNESS - bIsControl = ( sControlName.Find(CN_DUAL_WHITE_BRIGHTNESS) > -1 ); - if( bIsControl && (sLastControlName!=CN_DUAL_WHITE_BRIGHTNESS) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_DUAL_WHITE_BRIGHTNESS; - Call("/esp/controls/dual_white_controller.fn::CreateDualWhiteBrightnessActuator()"); - } - - !# CN_DUAL_WHITE_COLOR - bIsControl = ( sControlName.Find(CN_DUAL_WHITE_COLOR) > -1 ); - if( bIsControl && (sLastControlName!=CN_DUAL_WHITE_COLOR) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_DUAL_WHITE_COLOR; - Call("/esp/controls/dual_white_controller.fn::CreateDualWhiteColorActuator()"); - } - - !# EVENT_INTERFACE - bIsControl = ( sControlName.Find(CN_EVENT_INTERFACE) > -1 ); - if( bIsControl && (sLastControlName!=CN_EVENT_INTERFACE) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_EVENT_INTERFACE; - Call("/esp/datapointconfigurator.fn::CreateEventInterface()"); - } - - !# CN_GENERIC_INPUT_TRANSMITTER - HmIP - bIsControl = ( sControlName.Find(CN_GENERIC_INPUT_TRANSMITTER) > -1 ); - if( bIsControl && (sLastControlName != CN_GENERIC_INPUT_TRANSMITTER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_GENERIC_INPUT_TRANSMITTER; - Call("/esp/controls/generic_input_transmitter.fn::CreateGenericInputTransmitter()"); - } - - !# CN_GENERIC_MEASURING_TRANSMITTER - HmIP - bIsControl = ( sControlName.Find(CN_GENERIC_MEASURING_TRANSMITTER) > -1 ); - if( bIsControl && (sLastControlName != CN_GENERIC_MEASURING_TRANSMITTER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_GENERIC_MEASURING_TRANSMITTER; - Call("/esp/controls/generic_input_transmitter.fn::CreateGenericMeasuringTransmitter()"); - } - - !# HEATING_CONTROL - bIsControl = ( sControlName.Find(CN_HEATING_CONTROL) > -1 ); - if( bIsControl && (sLastControlName != CN_HEATING_CONTROL) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_HEATING_CONTROL; - Call("/esp/controls/heating_control.fn::CreateHeatingControl()"); - } - - !# HEATING_CONTROL_HMIP - bIsControl = ( sControlName.Find(CN_HEATING_CONTROL_HMIP) > -1 ); - if( bIsControl && (sLastControlName != CN_HEATING_CONTROL_HMIP) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_HEATING_CONTROL_HMIP; - if (ch.Label() == "ALPHA-IP-RBGa") { - Call("/esp/controls/heating_control.fn::CreateHeatingControlHmIPa()"); - } else { - Call("/esp/controls/heating_control.fn::CreateHeatingControlHmIP()"); - } - } - - !# HMIP_BUTTON - bIsControl = ( sControlName.Find(CN_HMIP_BUTTON) > -1 ); - if( bIsControl && (sLastControlName!=CN_HMIP_BUTTON) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_HMIP_BUTTON; - if ((ch.HssType() != "MULTI_MODE_INPUT_TRANSMITTER") || (ch.Label() == "ELV-SH-BM-S")) { - if (ch.Label().Substr(5,7) != "MOD-RC8") { - if ((ch.Label() == "ELV-SH-BM-S")) { - WriteLine( "" ); - Call("/esp/controls/key_switch_sc.fn::CreateContentA()"); - } else { - Call("/esp/datapointconfigurator.fn::CreateNoFunction()"); - } - } else { - WriteLine( "" ); - Call("/esp/controls/key_switch_sc.fn::CreateContent()"); - } - } - } - - !# CN_IDENTIFICATION - HmIPW Identification - if (ch.Label() != "HmIPW-DRAP") { - bIsControl = ( sControlName.Find(CN_IDENTIFICATION) > -1 ); - if( bIsControl && (sLastControlName != CN_IDENTIFICATION) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_IDENTIFICATION; - Call("/esp/controls/hmipw_identification.fn::CreateIdentification()"); - } - } - - !# CN_JALOUSIE - bIsControl = ( sControlName.Find(CN_JALOUSIE) > -1 ); - if( bIsControl && (sLastControlName!=CN_JALOUSIE) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_JALOUSIE; - Call("/esp/controls/blind.fn::CreateJalousieActuator()"); - } - - !# LOCK - bIsControl = ( sControlName.Find(CN_LOCK) > -1 ); - if( bIsControl && (sLastControlName!=CN_LOCK) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_LOCK; - Call("/esp/controls/lock.fn::CreateKeyMatic()"); - } - - ! CN_MAINTENANCE - bIsControl = ( sControlName.Find(CN_MAINTENANCE) > -1 ); - if( bIsControl && (sLastControlName != CN_MAINTENANCE) ) - { - WriteLine( "" ); - if (ch.Label() == "HmIPW-DRAP") { - WriteLine( "" ); - sLastControlName = CN_MAINTENANCE; - isKnownControl = true; - Call("/esp/controls/drap.fn::CreateDrap()"); - } - - if ((ch.Label() == "HmIP-HAP") || (ch.Label() == "HmIP-HAP-A") || (ch.Label() == "HmIP-HAP-B1") || (ch.Label() == "HmIP-HAP JS1")) { - WriteLine( "" ); - sLastControlName = CN_MAINTENANCE; - isKnownControl = true; - Call("/esp/controls/hap.fn::CreateHAP()"); - } - - if ((ch.Label() == "RPI-RF-MOD") || (ch.Label() == "HmIP-CCU3") || (ch.Label() == "HmIP-RFUSB")) { - WriteLine( "" ); - sLastControlName = CN_MAINTENANCE; - isKnownControl = true; - Call("/esp/controls/coProcessor.fn::CreateCoPro()"); - } - - if (ch.Label() == "HmIP-FWI") { - WriteLine( "" ); - sLastControlName = CN_MAINTENANCE; - isKnownControl = true; - Call("/esp/controls/maintenanceFWI.fn::CreateMaintenance()"); - } - - if (ch.Label() == "HmIP-WKP") { - WriteLine( "" ); - sLastControlName = CN_MAINTENANCE; - isKnownControl = true; - Call("/esp/controls/maintenanceWKP.fn::CreateMaintenance()"); - } - - if (ch.Label() == "HmIP-SWSD-2") { - WriteLine( "" ); - sLastControlName = CN_MAINTENANCE; - isKnownControl = true; - Call("/esp/controls/maintenanceSmokeDetector.fn::CreateMaintenance()"); - } - } - - !# CN_MOTIONDETECTOR - bIsControl = ( sControlName.Find(CN_MOTIONDETECTOR) > -1 ); - if( bIsControl && (sLastControlName != CN_MOTIONDETECTOR) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_MOTIONDETECTOR; - Call("/esp/controls/motiondetector.fn::CreateMotionDetector()"); - } - - !# NONE - bIsControl = ( sControlName.Find(CN_NONE) > -1 ); - if( bIsControl && (sLastControlName != CN_NONE) ) - { - ! IGNORE NONE - } - - !# OPTICAL_SIGNAL_RECEIVER - bIsControl = ( sControlName.Find(CN_OPTICAL_SIGNAL_RECEIVER) > -1 ); - if( bIsControl && (sLastControlName != CN_OPTICAL_SIGNAL_RECEIVER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_OPTICAL_SIGNAL_RECEIVER; - Call("/esp/controls/opticalsignalreceiver.fn::CreateOpticalSignalReceiver()"); - } - - - !# CN_PDDT (PASSAGE_DETECTOR_DIRECTION_TRANSMITTER) - bIsControl = ( sControlName.Find(CN_PDDT) > -1 ); - if( bIsControl && (sLastControlName != CN_PDDT) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_PDDT; - Call("/esp/controls/passagedetector.fn::CreatePassageDetector()"); - } - - !# POWERMETER - bIsControl = ( sControlName.Find(CN_POWERMETER) > -1 ); - if( bIsControl && (sLastControlName != CN_POWERMETER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_POWERMETER; - Call("/esp/controls/powermeter.fn::CreatePowermeterControl()"); - } - - !# POWERMETER_IEC1 - bIsControl = ( sControlName.Find(CN_POWERMETER_IEC1) > -1 ); - if( bIsControl && (sLastControlName != CN_POWERMETER_IEC1) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_POWERMETER_IEC1; - Call("/esp/controls/powermeter.fn::CreatePowermeterIECControl()"); - } - - !# POWERMETER_IEC2 - bIsControl = ( sControlName.Find(CN_POWERMETER_IEC2) > -1 ); - if( bIsControl && (sLastControlName != CN_POWERMETER_IEC2) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_POWERMETER_IEC2; - Call("/esp/controls/powermeter.fn::CreatePowermeterIECControl()"); - } - - !# POWERMETER_IGL - bIsControl = ( sControlName.Find(CN_POWERMETER_IGL) > -1 ); - if( bIsControl && (sLastControlName != CN_POWERMETER_IGL) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_POWERMETER_IGL; - Call("/esp/controls/powermeter.fn::CreatePowermeterIGLControl()"); - } - - !# POWERMETER_PSM - bIsControl = ( sControlName.Find(CN_POWERMETER_PSM) > -1 ); - if( bIsControl && (sLastControlName != CN_POWERMETER_PSM) ) - { - WriteLine( "" ); - - string chnAddress = ch.Address(); - integer chnNumber = chnAddress.StrValueByIndex(":",1).ToInteger(); - string chn1Address = chnAddress.StrValueByIndex(":",0) # ":1"; - - isKnownControl = true; - sLastControlName = CN_POWERMETER_PSM; - - if (ch.Label() != "HmIP-ESI") { - Call("/esp/controls/powermeter.fn::CreatePowermeterPSMControl()"); - } else { - string esiSensor; - string sensorState = "SENSOR_UNKNOWN,SENSOR_ES_GAS,SENSOR_ES_LED,SENSOR_ES_IEC,SENSOR_ES_IEC_SML,SENSOR_ES_IEC_SML_WH,SENSOR_ES_IEC_D0_A,SENSOR_ES_IEC_D0_B,SENSOR_ES_IEC_D0_C,SENSOR_ES_IEC_D0_D"; - - object oDevice = dom.GetObject(cObj.Device()); - object oChnOne = dom.GetObject(oDevice.Channels().GetAt(1)); - object oChannelOpMode = oChnOne.DPByControl("POWERMETER_PSM.CHANNEL_OPERATION_MODE"); - - if (oChannelOpMode) { - integer sensorIndex = oChannelOpMode.Value().ToInteger(); - esiSensor = sensorState.StrValueByIndex(',',sensorIndex); - } else { - esiSensor = sensorState.StrValueByIndex(',',0); - } - - WriteLine( "" ); - - if (chnNumber == 1) { - Call("/esp/controls/powermeter.fn::CreatePowermeterESIControl_CurConsumption()"); - } else { - string _esiSensor = esiSensor; - - if ((esiSensor == "SENSOR_UNKNOWN") || (esiSensor == "SENSOR_ES_IEC")) { - string style = "style='margin-left:8px;'"; - Call("/esp/datapointconfigurator.fn::CreateNoFunction()"); - } else { - if (esiSensor.Substr(0,13) != "SENSOR_ES_IEC") { - if (chnNumber == 2) { - ! Create GAS or LED Control - Call("/esp/controls/powermeter.fn::CreatePowermeterESIControl_TotalConsumption()"); - } else { - ! Wenn kein IEC, Kanal 3 und 4 = noParam - string style = "style='margin-left:8px;'"; - Call("/esp/datapointconfigurator.fn::CreateNoFunction()"); - } - } else { - ! Create IEC Control - Call("/esp/controls/powermeter.fn::CreatePowermeterESIControl_ESI_IEC()"); - } - } - } - } - } - - !# RAIN_DETECTION_TRANSMITTER - HmIP - bIsControl = ( sControlName.Find(CN_RAIN_DETECTION_TRANSMITTER) > -1 ); - if( bIsControl && (sLastControlName != CN_RAIN_DETECTION_TRANSMITTER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_RAIN_DETECTION_TRANSMITTER; - Call("/esp/controls/raindetector_transmitter.fn::CreateRainDetectorTransmitter()"); - } - - !# RC19_DISPLAY - bIsControl = ( sControlName.Find(CN_RC19_DISPLAY) > -1 ); - if( bIsControl && (sLastControlName!=CN_RC19_DISPLAY) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_RC19_DISPLAY; - Call("/esp/controls/rc19_display.fn::CreateDisplay()"); - } - - !# CN_RGBW_AUTOMATIC - bIsControl = ( sControlName.Find(CN_RGBW_AUTOMATIC) > -1 ); - if( bIsControl && (sLastControlName != CN_RGBW_AUTOMATIC) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_RGBW_AUTOMATIC; - Call("/esp/controls/rgbw.fn::CreateRGBWAutomaticControl()"); - } - - !# CN_RGBW_COLOR - bIsControl = ( sControlName.Find(CN_RGBW_COLOR) > -1 ); - if( bIsControl && (sLastControlName != CN_RGBW_COLOR) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_RGBW_COLOR; - - if (ch.Label().Substr(0,7) == "VIR-LG-") { - string chLabel = ch.Label(); - if((chLabel.Find("RGBW") > -1) || (chLabel.Find("GROUP") > -1)) { - Call("/esp/controls/rgbw.fn::CreateVIR-LGRGBWColorControl()"); - } - } else { - Call("/esp/controls/rgbw.fn::CreateRGBWColorControl()"); - } - } - - !# CN_RGB_COLOR - bIsControl = ( sControlName.Find(CN_RGB_COLOR) > -1 ); - if( bIsControl && (sLastControlName != CN_RGB_COLOR) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_RGB_COLOR; - if (ch.Label().Substr(0,7) == "VIR-LG-") { - string chLabel = ch.Label(); - if(chLabel.Find("RGB") > -1) { - Call("/esp/controls/rgbw.fn::CreateVIR-LGRGBColorControl()"); - } - } - } - - !# RHS (Rotary Handle Sensor - Fensterdrehgriffkontakt) - bIsControl = ( sControlName.Find(CN_RHS) > -1 ); - if( bIsControl && (sLastControlName!=CN_RHS) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_RHS; - Call("/esp/controls/rhs.fn::CreateWndRotSensor()"); - } - - !# CN_SERVO_TRANSMITTER (e. g. WSC - Servo Steuerung) - bIsControl = ( sControlName.Find(CN_SERVO_TRANSMITTER) > -1 ); - if( bIsControl && (sLastControlName!=CN_SERVO_TRANSMITTER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_SERVO_TRANSMITTER; - Call("/esp/controls/servo.fn::CreateServoTransmitter()"); - } - - !# CN_SERVO_VIRTUAL_RECEIVER (e. g. WSC - Servo Steuerung) - bIsControl = ( sControlName.Find(CN_SERVO_VIRTUAL_RECEIVER) > -1 ); - if( bIsControl && (sLastControlName!=CN_SERVO_VIRTUAL_RECEIVER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_SERVO_VIRTUAL_RECEIVER; - Call("/esp/controls/servo.fn::CreateServoVirtualReceiver()"); - } - - !# CN_SHUTTER_TRANSMITTER - bIsControl = ( sControlName.Find(CN_SHUTTER_TRANSMITTER) > -1 ); - if( bIsControl && (sLastControlName!=CN_SHUTTER_TRANSMITTER) ) - { - object mode = dom.GetObject(ch.Address()); - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_SHUTTER_TRANSMITTER; - Call("/esp/controls/blind.fn::CreateShutterTransmitter()"); - } - - !# CN_SHUTTER_VIRTUAL_RECEIVER - bIsControl = ( sControlName.Find(CN_SHUTTER_VIRTUAL_RECEIVER) > -1 ); - if( bIsControl && (sLastControlName!=CN_SHUTTER_VIRTUAL_RECEIVER) ) - { - object mode = dom.GetObject(ch.Address()); - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_SHUTTER_VIRTUAL_RECEIVER; - Call("/esp/controls/blind.fn::CreateShutterVirtualReceiver()"); - } - - !# CN_SIMPLE_SWITCH_RECEIVER - bIsControl = ( sControlName.Find(CN_SIMPLE_SWITCH_RECEIVER) > -1 ); - if( bIsControl && (sLastControlName!=CN_SIMPLE_SWITCH_RECEIVER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_SIMPLE_SWITCH_RECEIVER; - Call("/esp/controls/door_opener.fn::CreateSimpleSwitchReceiver()"); - } - - !# CN_SMOKE_DETECTOR - bIsControl = ( sControlName.Find(CN_SMOKE_DETECTOR) > -1 ); - if( bIsControl && (sLastControlName != CN_SMOKE_DETECTOR)) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_SMOKE_DETECTOR; - Call("/esp/controls/smokedetector.fn::CreateSmokeDetectorControl()"); - } - - !# SWITCH - bIsControl = ( sControlName.Find(CN_SWITCH) > -1 ); - if( bIsControl && (sLastControlName != CN_SWITCH) ) - { - isKnownControl = true; - sLastControlName = CN_SWITCH; - if (ch.Label().Substr(5,4) != "BWTH") { - WriteLine( "" ); - Call("/esp/controls/switch.fn::CreateBinaryActuator()"); - } else { - ! If the device is a HmIP-BWTH or HmIP-BWTH24 - WriteLine( "" ); - Call("/esp/controls/heating_control.fn::CreateBWTHSwitchState()"); - } - } - - !# SWITCH_TRANSMITTER - bIsControl = ( sControlName.Find(CN_SWITCH_TRANSM) > -1 ); - if( bIsControl && (sLastControlName != CN_SWITCH_TRANSM) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_SWITCH_TRANSM; - Call("/esp/controls/switch.fn::CreateSwitchTansmitter()"); - } - - !# TEMP_HUM_PARTICLE_MATTER_TRANSMITTER - bIsControl = ( sControlName.Find(CN_TEMP_HUMIDITY_PARTICULATE_MATTER_TRANSMITTER) > -1 ); - if( bIsControl && (sLastControlName != CN_TEMP_HUMIDITY_PARTICULATE_MATTER_TRANSMITTER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_TEMP_HUMIDITY_PARTICULATE_MATTER_TRANSMITTER; - Call("/esp/controls/weather_sensor.fn::CreateTempHuminityParticulateMatterTransmitter()"); - } - - !# THERMOSTAT - bIsControl = ( sControlName.Find(CN_THERMO) > -1 ); - if( bIsControl && (sLastControlName!=CN_THERMO) && (sControlName.Find('COLORTEMP') == -1)) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_THERMO; - Call("/esp/controls/thermostat.fn::CreateThermostat()"); - } - - !# UNIVERSAL_LIGHT_RECEIVER - bIsControl = ( sControlName.Find(CN_UNIVERSAL_LIGHT_RECEIVER) > -1 ); - if( bIsControl && (sLastControlName != CN_UNIVERSAL_LIGHT_RECEIVER)) - { - isKnownControl = true; - sLastControlName = CN_UNIVERSAL_LIGHT_RECEIVER; - - object oDevice = dom.GetObject(cObj.Device()); - object oMaintenance = dom.GetObject(oDevice.Channels().GetAt(0)); - string chnAddress = ch.Address(); - integer chnNumber = chnAddress.StrValueByIndex(":",1).ToInteger(); - - if (ch.Label() != "HmIP-DRG-DALI") { - WriteLine( "" ); - if (ch.Label() != "HmIP-LSC") { - if ((oMaintenance.MetaData("deviceMode") == 0) || (oMaintenance.MetaData("deviceMode") == 1)) { - if (chnNumber == 1) { - Call("/esp/controls/universal_light_receiver.fn::CreateRGBWControlMode01()"); - } else { - Call("/esp/datapointconfigurator.fn::CreateNoFunction()"); - } - } - if (oMaintenance.MetaData("deviceMode") == 2) { - - if ((chnNumber == 1) || (chnNumber == 2) ) { - Call("/esp/controls/universal_light_receiver.fn::CreateRGBWControlMode2()"); - } else { - Call("/esp/datapointconfigurator.fn::CreateNoFunction()"); - } - } - if (oMaintenance.MetaData("deviceMode") == 3) { - Call("/esp/controls/universal_light_receiver.fn::CreateRGBWControlMode3()"); - } - } else { - ! HmIP-LSC - ! isKnownControl = false; - ! sLastControlName = ""; - Call("/esp/controls/universal_light_receiver.fn::CreateRGBWControlMode_RGB_TW()"); - } - } else { - ! HmIP-DRG-DALI - - integer maxCap = ch.MetaData('maxCap'); - - if ((maxCap != null) && (maxCap != "--") && (maxCap < 5)) { - ! Switch - if (maxCap == 0) {Call("/esp/controls/switch.fn::CreateVIR-LG-ONOFF_Actuator()");} - - ! Dimmer - if (maxCap == 1) {Call("/esp/controls/dimmer.fn::CreateDALIDimmingActuator()");} - - ! Tunable White - if (maxCap == 2) {Call("/esp/controls/universal_light_receiver.fn::CreateRGBWControlMode2()");} - - ! RGB - if ((maxCap == 3) || (maxCap == 4)) { - Call("/esp/controls/universal_light_receiver.fn::CreateRGBWControlMode_RGB_TW()"); - } - } else { - ! No parameter to set - Call("/esp/datapointconfigurator.fn::CreateNoFunction()"); - } - } - } - - !# CN_WATER_DETECTION_TRANSMITTER - HmIP - bIsControl = ( sControlName.Find(CN_WATER_DETECTION_TRANSMITTER) > -1 ); - if( bIsControl && (sLastControlName != CN_WATER_DETECTION_TRANSMITTER) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_WATER_DETECTION_TRANSMITTER; - Call("/esp/controls/water_detection_transmitter.fn::CreateWaterDetectionTransmitter()"); - } - - !# CN_WEATHER_TRANSMIT - HmIP - bIsControl = ( sControlName.Find(CN_WEATHER_TRANSMIT) > -1 ); - if( bIsControl && (sLastControlName != CN_WEATHER_TRANSMIT) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_WEATHER_TRANSMIT; - Call("/esp/controls/weather_sensor.fn::CreateWeatherSensor()"); - } - - !# CN_WEEKLY_PROFILE - HmIP - bIsControl = ( sControlName.Find(CN_WEEKLY_PROFILE) > -1 ); - if( bIsControl && (sLastControlName != CN_WEEKLY_PROFILE) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_WEEKLY_PROFILE; - Call("/esp/controls/hmip_weekly_program.fn::CreateWeeklyProgram()"); - } - - !# WINDOW - bIsControl = ( sControlName.Find(CN_WINDOW) > -1 ); - if( bIsControl && (sLastControlName!=CN_WINDOW) ) - { - WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_WINDOW; - Call("/esp/controls/window.fn::CreateWinMatic()"); - } - - !# WIN_SC - bIsControl = ( sControlName.Find(CN_WIN_SC) > -1 ); - if( bIsControl && (sLastControlName!=CN_WIN_SC) ) - { - !WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_WIN_SC; - Call("/esp/controls/win_sc.fn::CreateWin_SC()"); - } - - !# WIN_SC_SECURE - bIsControl = ( sControlName.Find(CN_WIN_SC_SECURE) > -1 ); - if( bIsControl && (sLastControlName != CN_WIN_SC_SECURE) ) - { - !WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_WIN_SC_SECURE; - Call("/esp/controls/win_sc_secure.fn::CreateWin_SC_SECURE()"); - } - - !# WIN_SC_SENSOR - bIsControl = ( sControlName.Find(CN_WIN_SC_SENSOR) > -1 ); - if( bIsControl && (sLastControlName!=CN_WIN_SC_SENSOR) ) - { - !WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_WIN_SC_SENSOR; - Call("/esp/controls/win_sc_sensor.fn::CreateWin_SC_SENSOR()"); - } - - !# CN_WINDOW_DRIVE_RECEIVER - bIsControl = ( sControlName.Find(CN_WINDOW_DRIVE_RECEIVER) > -1 ); - if( bIsControl && (sLastControlName!=CN_WINDOW_DRIVE_RECEIVER) ) - { - !WriteLine( "" ); - isKnownControl = true; - sLastControlName = CN_WINDOW_DRIVE_RECEIVER; - Call("/esp/controls/win_sc_sensor.fn::CreateWindowDriveReceiver()"); - } - } - else - { - oEName = oE.Name(); - bSV = true; - } - } - } - ! create device maintenance channel information - if (ictCH == ictMaintenance) { - WriteLine( '
' ); - Call("/esp/controls/maintenance.fn::CreateDeviceMaintenanceChannel()"); - isKnownControl = true; - } - if (!isKnownControl) - { - WriteLine( '
' ); - object ch = dom.GetObject(chnId); - - ! This if branch is not necessary anymore. It's only for compatibility reasons - if (ch.HssType() == "ROTARY_CONTROL_TRANSCEIVER") { - if (ch.Label() == "HmIP-WRCR") { - WriteLine( "" ); - Call("/esp/datapointconfigurator.fn::CreateNoFunction()"); - } else { - WriteLine( "" ); - Call("/esp/datapointconfigurator.fn::CreateUnknown()"); - } - } else { - WriteLine( "" ); - Call("/esp/datapointconfigurator.fn::CreateUnknown()"); - } - } - if ( (isKnownControl) && (bSV) && (oEName.Find("HmIP-RF.") == -1) && (oEName.Find("CUxD.CUX") == -1) ) - { - WriteLine( '
'); - WriteLine( "" ); - WriteLine('' ); - Call("/esp/datapointconfigurator.fn::CreateSysVars()"); - } - WriteLine( '' ); - WriteLine( '
' ); - } - - ! write update script - if( ctrlReqUpdate ) - { - cId = chnId; - WriteLine(""); - } - - !WriteLine(""); - - return; -} - -function ::StringCut() -{ - if(((sName.Find(" ") == -1) || (sName.Find(" ") >= 9)) && (sName.Length()>9) && (sName.Find("${") == -1)) - { - string sI = ""; - integer iCurrCut = 0; - integer iLastCut = 0; - string sWorkingName = ""; - - foreach(sI,system.GenerateEnum(0,sName.Length())) - { - iCurrCut = iCurrCut +1; - - if( (iCurrCut % iLength) == 0 ) - { - sWorkingName = sWorkingName#sName.Substr(iLastCut,iLength)#'
'; - iLastCut = iCurrCut; - } - } - sWorkingName = sWorkingName#sName.Substr(iLastCut,sName.Length())#' '; - sName = sWorkingName; - } -} - -function ::CreateEventInterface() -{ - object objEvent = cObj.DPByControl("EVENT_INTERFACE.TRIGGER"); - if( objEvent ) - { - WriteLine(""); - WriteLine(""); - WriteLine(""); - WriteLine(""); - WriteLine(""); - WriteLine(""); - WriteLine("
"); - WriteLine("
"); - WriteLine(""); - WriteLine("
"); - WriteLine("
Betätigen
"); - WriteLine(""); - WriteLine(" "); - - WriteLine(""); - } - return; -} - -function ::CreateChannelNotActive() -{ - WriteLine(""); - WriteLine(""); - WriteLine(""); - WriteLine(""); - WriteLine(""); - WriteLine("
"); - WriteLine("
"); - WriteLine("${controlChannelNotActive}"); - WriteLine("
"); - WriteLine("
"); - WriteLine(""); - return; -} - -function ::CreateNoFunction() -{ - - string _style = ""; - if (style != "-") { - _style = style; - } - - WriteLine(""); - WriteLine(""); - WriteLine(""); - WriteLine(""); - WriteLine(""); - WriteLine("
"); - WriteLine("
"); - WriteLine("${controlChannelHasNoFunction}"); - WriteLine("
"); - WriteLine("
"); - WriteLine(""); -} - -function ::CreateUnknown() -{ - boolean bStatusOnly = (system.GetVar("iStatusOnly") == 0); - string showParam = true; - - WriteLine( '' ); - WriteLine( '' ); - WriteLine( ''); - integer i = 0; - string sEnum = ""; - - if( (cObj.IsTypeOf( OT_VARDP )) || (cObj.IsTypeOf( OT_ALARMDP)) ) - { - sEnum = cObj.ID().ToString(); - } - else - { - sEnum = cObj.DPs().EnumEnabledVisibleIDs(); - } - - string sKnownControls = "NONE.SWITCH.DIMMER.BLIND.WINDOW.LOCK.BUTTON.RC19_DISPLAY.DOOR_SENSOR.RHS.TEMP.ANALOG_OUTPUT."; - string s; - foreach( s, sEnum ) - { - object oDP = dom.GetObject( s ); - - if( oDP) - { - - ! Some parameters shouldn't be visible - Call("/esp/datapointconfigurator.fn::HideCertainParameters()"); - if (showParam == true) { - boolean bIsKnownControl = false; - string sCName = oDP.MetaData("CONTROL"); - if( sCName ) - { - integer iPosPoint = sCName.Find('.'); - if( iPosPoint != -1 ) - { - string sCtrlName = sCName.Substr(0,iPosPoint); - integer iPosCtrl = sKnownControls.Find( sCtrlName ); - if( iPosCtrl != -1 ) - { - bIsKnownControl = true; - } - } - !# Parameter is not visible - if( sCName.Find("INVISIBLE") > -1) - { - WriteLine( "" ); - isInvisible = true; - } else { - isInvisible = false; - } - } - if( (!bIsKnownControl) && (!isInvisible) ) - { - var value = oDP.Value(); - - boolean bIsSysVar = ((oDP.IsTypeOf( OT_VARDP )) || (oDP.IsTypeOf( OT_ALARMDP ))); - boolean bIsHssDp = ( oDP.IsTypeOf( OT_HSSDP ) ); - boolean bChannel = ( cObj.IsTypeOf( OT_CHANNEL ) ); - string sTitle = ""; - string sKey = ""; - boolean bHideValue = false; - if( bChannel ) - { - if( bIsHssDp ) - { - string sLongKey = cObj.HssType()#"|"#oDP.HSSID(); - string sShortKey = oDP.HSSID(); - if( (oDP.ValueType() == ivtInteger) && (oDP.ValueSubType() == istEnum) ) - { - ! Current HmIP devices don`t work properly with web.webGetValueFromList - ! Therefore this is deactivated - if ( (oEName.Find("HmIP-RF.") == -1) ) { - sLongKey = sLongKey#"="#web.webGetValueFromList( oDP.ValueList(), value ); - sShortKey = sShortKey#"="#web.webGetValueFromList( oDP.ValueList(), value ); - } else { - sLongKey = sLongKey#"="#value; - sShortKey = sShortKey#"="#value; - } - - bHideValue = true; - } - if( (oDP.ValueType() == ivtBinary ) && ((oDP.ValueSubType() == istGeneric)||(oDP.ValueSubType() == istBool)||(oDP.ValueSubType() == istSwitch)) ) - { - string sPVal = ""; - if( oDP.Value() ) - { - sPVal = "TRUE"; - } - else - { - sPVal = "FALSE"; - } - sLongKey = sLongKey#"="#sPVal; - sShortKey = sShortKey#"="#sPVal; - bHideValue = true; - } - sTitle = web.webKeyFromStringTable( sLongKey ); - if( !sTitle.Length() ) - { - sTitle = web.webKeyFromStringTable( sShortKey ); - if( !sTitle.Length() ) - { - sTitle = "["#sShortKey#"]"; - } - } - } - else - { - sTitle = oDP.Name(); - } - } - else - { - sTitle = oDP.Name(); - } - - string sValueUnit = oDP.ValueUnit(); - string sSpace = " "; - if( sValueUnit == "degree" ) { sValueUnit = "°"; } - if( sValueUnit == "100%" ) - { - value = value * 100; - sValueUnit = "%"; - } - - string sValue = "?"; - - boolean bBoolean = ( value.Type() == "boolean" ); - boolean bReal = ( value.Type() == "real" ); - - if( bBoolean && bChannel ) - { - string sVLKey = ""; - if( value == false ) { sVLKey = "=FALSE"; } - if( value == true ) { sVLKey = "=TRUE"; } - sValue = web.webKeyFromStringTable( sKey#sVLKey ); - if( !sValue.Length() ) - { - sValue = value.ToString(0); - if( !sTitle.Length() ) - { - sTitle = sKey; - } - } - else - { - sTitle = ""; - } - } - else - { - if( !sTitle.Length() ) - { - sTitle = sKey; - } - } - - if( bReal ) - { - sValue = value.ToString(2); - - ! Show the illumination without decimal places - if ( (oEName.Find("HmIP-RF.") != -1) && (sShortKey == "ILLUMINATION") ) { - sValue = value.ToString(0); - } - ! Show the temperature with one decimal place - if ( (oEName.Find("HmIP-RF.") != -1) && (sShortKey == "ACTUAL_TEMPERATURE") ) { - sValue = value.ToString(1); - } - } - - if( (!bBoolean) && (!bReal) ) - { - sValue = value.ToString(0); - } - - if( !value.ToString().Length() ) - { - sValue = "0"; - } - - if( bHideValue ) - { - if( ( oDP.Operations() & OPERATION_WRITE ) == 0 ) - { - sValue = sTitle; - sTitle = ""; - } - } - - ! if( !(i%2) ) { WriteLine( '' ); } - boolean bExistControl = true; - if( (bStatusOnly) && (!bIsSysVar) && (sLastControlName != "")) - { - bExistControl = false; - } - if( bExistControl ) - { - WriteLine( '' ); - } - if( (i%2) ) { WriteLine( '' ); } - i = i + 1; - } - } - } - } - WriteLine(''); - WriteLine('
' ); - - WriteLine( '
' ); - if(sTitle == "") { - WriteLine( ''#sTitle#'' ); - } - else { - WriteLine( ''#sTitle#':' ); - } - boolean tbRead = ( ( oDP.Operations() & OPERATION_READ ) != 0 ); - boolean tbEvent = ( ( oDP.Operations() & OPERATION_EVENT ) != 0 ); - boolean tbWrite = ( ( oDP.Operations() & OPERATION_WRITE ) != 0 ); - boolean bBoolean = false; - - if (cObj.IsTypeOf(OT_VARDP) || cObj.IsTypeOf(OT_ALARMDP)) { - tbWrite = false; - } - - WriteLine( '' ); - - if( !tbWrite ) - { - string sValueh = ""; - if (oDP.HssType() == "WIND_DIRECTION") - { - Call("/esp/datapointconfigurator.fn::ConvWindDir()"); - } - WriteLine(sValueh#" "#sValue#sSpace#sValueUnit ); - } - else - { - if( !bBoolean ) - { - if( (bStatusOnly) && (!bIsSysVar) && (sLastControlName == "")) - { - string sDivider = ""; - if( oDP.ValueUnit() == "100%" ) { sDivider = "/100"; } - WriteLine( ""#sSpace#sValueUnit ); - } - else - { - string sSysVarVal = ""; - object cObjTmp = oDP; - integer iVT = oDP.ValueType(); - integer iST = oDP.ValueSubType(); - boolean bLogic = ( (iVT==ivtBinary) && (iST==istBool) ); - boolean bList = ( (iVT==ivtInteger) && (iST==istEnum) ); - boolean bNumber = ( (iVT==ivtFloat) && (iST==istGeneric) ); - boolean bAlarm = ( (iVT==ivtBinary) && (iST==istAlarm) ); - boolean bString = ( (iVT==ivtString) && (iST==istChar8859)); - Call( "/esp/system.fn::getSysVarValAsString()" ); - WriteLine( sSysVarVal ); - } - } - else - { - - if( system.GetVar("iStatusOnly") == 0 ) - { - string sClassName; - - sClassName = "CLASS02516"; - if( oDP.Value() == true ) { sClassName = "CLASS02517"; } - WriteLine("  An    "); - - sClassName = "CLASS02516"; - if( (oDP.Value() == false) || (oDP.Value() == "") ) { sClassName = "CLASS02517"; } - WriteLine(" Aus "); - } - else - { - if (oDP.Value()) - { - WriteLine(oDP.ValueName1()); - } - else - { - WriteLine(oDP.ValueName0()); - } - } - } - } - WriteLine(""); - WriteLine( '
' ); - WriteLine( '
'); - WriteLine(''); - WriteLine(''); - return; -} - - -function ::ConvWindDir() { - -! --- Konvertierung der Gradanzeige in Himmelsrichtungen --- - - integer iValue = sValue.ToInteger() ; - - sValueh = "no value"; - - if ( (iValue >= 346) || (iValue <= 15) ) - { - sValueh = "N"; - return; - } - if ( (iValue >= 16) && (iValue <= 75) ) - { - sValueh = "NO"; - return; - } - if ( (iValue >= 76) && (iValue <= 105) ) - { - sValueh = "O"; - return; - } - if ( (iValue >= 106) && (iValue <= 165) ) - { - sValueh = "SO"; - return; - } - if ( (iValue >= 166) && (iValue <= 195) ) - { - sValueh = "S"; - return; - } - if ( (iValue >= 196) && (iValue <= 255) ) - { - sValueh = "SW"; - return; - } - if ( (iValue >= 256) && (iValue <= 285) ) - { - sValueh = "W"; - return; - } - if ( (iValue >= 286) && (iValue <= 345) ) - { - sValueh = "NW"; - return; - } - - return; -} - -function ::CreateSysVar() -{ - WriteLine( '' ); - WriteLine( '
' ); - - string sSysVarVal = ''; - object cObjTmp = cObj; - Call( "/esp/system.fn::getSysVarValAsString()" ); - - WriteLine( ''#sSysVarVal#'' ); - WriteLine( '
' ); - WriteLine( '' ); - return; -} - -function ::CreateSysVars() -{ - WriteLine( '' ); - WriteLine( '' ); - WriteLine( ''); - integer i = 0; - string s; - foreach(s,cObj.DPs().EnumIDs()) - { - object oSV = dom.GetObject( s ); - if( oSV ) - { - if( oSV.IsTypeOf( OT_VARDP ) || oSV.IsTypeOf( OT_ALARMDP ) ) - { -! if( !(i%2) ) { WriteLine( '' ); } - WriteLine( '' ); - if( (i%2) ) { WriteLine( '' ); } - i = i + 1; - } - } - } - WriteLine( '' ); - WriteLine( '
' ); - WriteLine( '
' ); - WriteLine( ''#oSV.Name()#':' ); - - string sSysVarVal = ""; - object cObjTmp = oSV; - integer iVT = cObjTmp.ValueType(); - integer iST = cObjTmp.ValueSubType(); - boolean bLogic = ( (iVT==ivtBinary) && (iST==istBool) ); - boolean bList = ( (iVT==ivtInteger) && (iST==istEnum) ); - boolean bNumber = ( (iVT==ivtFloat) && (iST==istGeneric) ); - boolean bAlarm = ( (iVT==ivtBinary) && (iST==istAlarm) ); - boolean bString = ( (iVT==ivtString) && (iST==istChar8859)); - boolean bSysVar = ( bLogic || bList || bNumber || bAlarm || bString); - Call( "/esp/system.fn::getSysVarValAsString()" ); - - WriteLine( ''#sSysVarVal#'' ); - WriteLine( '
' ); - WriteLine( '
' ); - WriteLine( '' ); - - return; -} - -function ::HideCertainParameters() { - string tmpHCP; - string param2Exclude = "IDENTIFY_DURATION,IDENTIFICATION_MODE_KEY_VISUAL,IDENTIFICATION_MODE_LCD_BACKLIGHT,IDENTIFY_TARGET_LEVEL,STATUS_FLAG_ERROR,STATUS_FLAG_LOW_BAT,STATUS_FLAG_PLAYING_FILE_ACTIVE,STATUS_FLAG_PLAYLIST_ACTIVE,ERROR_CODE_STATUS"; - - showParam = true; - ! Check if datapoint is no sysvar - if (! oDP.IsTypeOf( OT_VARDP )) { - foreach (tmpHCP, param2Exclude.Split(",")) { - if (oDP.HSSID().Find(tmpHCP) != -1) { - showParam = false; - return; - } - } - } - return; -}